1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-13 01:20:34 +02:00

Renamed LibClasses * VLC to GameLibrary * LIBRARY

This commit is contained in:
Ivan Savenko
2025-02-14 16:23:37 +00:00
parent 156de5b17e
commit 645b95ba02
287 changed files with 2032 additions and 2032 deletions

View File

@ -53,7 +53,7 @@
#include "../../lib/entities/faction/CFaction.h"
#include "../../lib/entities/faction/CTown.h"
#include "../../lib/entities/faction/CTownHandler.h"
#include "../../lib/VCMI_Lib.h"
#include "../../lib/GameLibrary.h"
ISelectionScreenInfo::ISelectionScreenInfo(ESelectionScreen ScreenType)
: screenType(ScreenType)
@ -102,7 +102,7 @@ CSelectionBase::CSelectionBase(ESelectionScreen type)
}
pos = background->center();
card = std::make_shared<InfoCard>();
buttonBack = std::make_shared<CButton>(Point(581, 535), AnimationPath::builtin("SCNRBACK.DEF"), VLC->generaltexth->zelp[105], [=](){ close();}, EShortcut::GLOBAL_CANCEL);
buttonBack = std::make_shared<CButton>(Point(581, 535), AnimationPath::builtin("SCNRBACK.DEF"), LIBRARY->generaltexth->zelp[105], [=](){ close();}, EShortcut::GLOBAL_CANCEL);
}
void CSelectionBase::toggleTab(std::shared_ptr<CIntObject> tab)
@ -149,15 +149,15 @@ InfoCard::InfoCard()
chat = std::make_shared<CChatBox>(Rect(18, 126, 335, 143));
pvpBox = std::make_shared<PvPBox>(Rect(17, 396, 338, 105));
buttonInvitePlayers = std::make_shared<CButton>(Point(20, 365), AnimationPath::builtin("pregameInvitePlayers"), VLC->generaltexth->zelp[105], [](){ GAME->server().getGlobalLobby().activateRoomInviteInterface(); }, EShortcut::LOBBY_INVITE_PLAYERS );
buttonOpenGlobalLobby = std::make_shared<CButton>(Point(188, 365), AnimationPath::builtin("pregameReturnToLobby"), VLC->generaltexth->zelp[105], [](){ GAME->server().getGlobalLobby().activateInterface(); }, EShortcut::MAIN_MENU_LOBBY );
buttonInvitePlayers = std::make_shared<CButton>(Point(20, 365), AnimationPath::builtin("pregameInvitePlayers"), LIBRARY->generaltexth->zelp[105], [](){ GAME->server().getGlobalLobby().activateRoomInviteInterface(); }, EShortcut::LOBBY_INVITE_PLAYERS );
buttonOpenGlobalLobby = std::make_shared<CButton>(Point(188, 365), AnimationPath::builtin("pregameReturnToLobby"), LIBRARY->generaltexth->zelp[105], [](){ GAME->server().getGlobalLobby().activateInterface(); }, EShortcut::MAIN_MENU_LOBBY );
buttonInvitePlayers->setTextOverlay (MetaString::createFromTextID("vcmi.lobby.invite.header").toString(), EFonts::FONT_SMALL, Colors::WHITE);
buttonOpenGlobalLobby->setTextOverlay(MetaString::createFromTextID("vcmi.lobby.backToLobby").toString(), EFonts::FONT_SMALL, Colors::WHITE);
if(SEL->screenType == ESelectionScreen::campaignList)
{
labelCampaignDescription = std::make_shared<CLabel>(26, 132, FONT_SMALL, ETextAlignment::TOPLEFT, Colors::YELLOW, VLC->generaltexth->allTexts[38]);
labelCampaignDescription = std::make_shared<CLabel>(26, 132, FONT_SMALL, ETextAlignment::TOPLEFT, Colors::YELLOW, LIBRARY->generaltexth->allTexts[38]);
}
else
{
@ -176,7 +176,7 @@ InfoCard::InfoCard()
for(int i = 0; i < 5; i++)
{
auto button = std::make_shared<CToggleButton>(Point(110 + i * 32, 450), AnimationPath::builtin(difButns[i]), VLC->generaltexth->zelp[24 + i]);
auto button = std::make_shared<CToggleButton>(Point(110 + i * 32, 450), AnimationPath::builtin(difButns[i]), LIBRARY->generaltexth->zelp[24 + i]);
iconDifficulty->addToggle(i, button);
if(SEL->screenType != ESelectionScreen::newGame)
@ -185,13 +185,13 @@ InfoCard::InfoCard()
}
flagbox = std::make_shared<CFlagBox>(Rect(24, 400, 335, 23));
labelMapDiff = std::make_shared<CLabel>(33, 430, FONT_SMALL, ETextAlignment::TOPLEFT, Colors::YELLOW, VLC->generaltexth->allTexts[494]);
labelPlayerDifficulty = std::make_shared<CLabel>(133, 430, FONT_SMALL, ETextAlignment::TOPLEFT, Colors::YELLOW, VLC->generaltexth->allTexts[492] + ":");
labelRating = std::make_shared<CLabel>(290, 430, FONT_SMALL, ETextAlignment::TOPLEFT, Colors::YELLOW, VLC->generaltexth->allTexts[218] + ":");
labelScenarioName = std::make_shared<CLabel>(26, 22, FONT_SMALL, ETextAlignment::TOPLEFT, Colors::YELLOW, VLC->generaltexth->allTexts[495]);
labelScenarioDescription = std::make_shared<CLabel>(26, 132, FONT_SMALL, ETextAlignment::TOPLEFT, Colors::YELLOW, VLC->generaltexth->allTexts[496]);
labelVictoryCondition = std::make_shared<CLabel>(26, 283, FONT_SMALL, ETextAlignment::TOPLEFT, Colors::YELLOW, VLC->generaltexth->allTexts[497]);
labelLossCondition = std::make_shared<CLabel>(26, 339, FONT_SMALL, ETextAlignment::TOPLEFT, Colors::YELLOW, VLC->generaltexth->allTexts[498]);
labelMapDiff = std::make_shared<CLabel>(33, 430, FONT_SMALL, ETextAlignment::TOPLEFT, Colors::YELLOW, LIBRARY->generaltexth->allTexts[494]);
labelPlayerDifficulty = std::make_shared<CLabel>(133, 430, FONT_SMALL, ETextAlignment::TOPLEFT, Colors::YELLOW, LIBRARY->generaltexth->allTexts[492] + ":");
labelRating = std::make_shared<CLabel>(290, 430, FONT_SMALL, ETextAlignment::TOPLEFT, Colors::YELLOW, LIBRARY->generaltexth->allTexts[218] + ":");
labelScenarioName = std::make_shared<CLabel>(26, 22, FONT_SMALL, ETextAlignment::TOPLEFT, Colors::YELLOW, LIBRARY->generaltexth->allTexts[495]);
labelScenarioDescription = std::make_shared<CLabel>(26, 132, FONT_SMALL, ETextAlignment::TOPLEFT, Colors::YELLOW, LIBRARY->generaltexth->allTexts[496]);
labelVictoryCondition = std::make_shared<CLabel>(26, 283, FONT_SMALL, ETextAlignment::TOPLEFT, Colors::YELLOW, LIBRARY->generaltexth->allTexts[497]);
labelLossCondition = std::make_shared<CLabel>(26, 339, FONT_SMALL, ETextAlignment::TOPLEFT, Colors::YELLOW, LIBRARY->generaltexth->allTexts[498]);
iconsVictoryCondition = std::make_shared<CAnimImage>(AnimationPath::builtin("SCNRVICT"), 0, 0, 24, 302);
iconsLossCondition = std::make_shared<CAnimImage>(AnimationPath::builtin("SCNRLOSS"), 0, 0, 24, 359);
@ -248,7 +248,7 @@ void InfoCard::changeSelection()
iconsLossCondition->setFrame(header->defeatIconIndex);
labelLossConditionText->setText(header->defeatMessage.toString());
flagbox->recreate();
labelDifficulty->setText(VLC->generaltexth->arraytxt[142 + vstd::to_underlying(mapInfo->mapHeader->difficulty)]);
labelDifficulty->setText(LIBRARY->generaltexth->arraytxt[142 + vstd::to_underlying(mapInfo->mapHeader->difficulty)]);
iconDifficulty->setSelected(SEL->getCurrentDifficulty());
if(SEL->screenType == ESelectionScreen::loadGame || SEL->screenType == ESelectionScreen::saveGame)
for(auto & button : iconDifficulty->buttons)
@ -423,35 +423,35 @@ PvPBox::PvPBox(const Rect & rect)
return bannedTowns;
};
buttonFlipCoin = std::make_shared<CButton>(Point(190, 6), AnimationPath::builtin("GSPBUT2.DEF"), CButton::tooltip("", VLC->generaltexth->translate("vcmi.lobby.pvp.coin.help")), [](){
buttonFlipCoin = std::make_shared<CButton>(Point(190, 6), AnimationPath::builtin("GSPBUT2.DEF"), CButton::tooltip("", LIBRARY->generaltexth->translate("vcmi.lobby.pvp.coin.help")), [](){
LobbyPvPAction lpa;
lpa.action = LobbyPvPAction::COIN;
GAME->server().sendLobbyPack(lpa);
}, EShortcut::LOBBY_FLIP_COIN);
buttonFlipCoin->setTextOverlay(VLC->generaltexth->translate("vcmi.lobby.pvp.coin.hover"), EFonts::FONT_SMALL, Colors::WHITE);
buttonFlipCoin->setTextOverlay(LIBRARY->generaltexth->translate("vcmi.lobby.pvp.coin.hover"), EFonts::FONT_SMALL, Colors::WHITE);
buttonRandomTown = std::make_shared<CButton>(Point(190, 31), AnimationPath::builtin("GSPBUT2.DEF"), CButton::tooltip("", VLC->generaltexth->translate("vcmi.lobby.pvp.randomTown.help")), [getBannedTowns](){
buttonRandomTown = std::make_shared<CButton>(Point(190, 31), AnimationPath::builtin("GSPBUT2.DEF"), CButton::tooltip("", LIBRARY->generaltexth->translate("vcmi.lobby.pvp.randomTown.help")), [getBannedTowns](){
LobbyPvPAction lpa;
lpa.action = LobbyPvPAction::RANDOM_TOWN;
lpa.bannedTowns = getBannedTowns();
GAME->server().sendLobbyPack(lpa);
}, EShortcut::LOBBY_RANDOM_TOWN);
buttonRandomTown->setTextOverlay(VLC->generaltexth->translate("vcmi.lobby.pvp.randomTown.hover"), EFonts::FONT_SMALL, Colors::WHITE);
buttonRandomTown->setTextOverlay(LIBRARY->generaltexth->translate("vcmi.lobby.pvp.randomTown.hover"), EFonts::FONT_SMALL, Colors::WHITE);
buttonRandomTownVs = std::make_shared<CButton>(Point(190, 56), AnimationPath::builtin("GSPBUT2.DEF"), CButton::tooltip("", VLC->generaltexth->translate("vcmi.lobby.pvp.randomTownVs.help")), [getBannedTowns](){
buttonRandomTownVs = std::make_shared<CButton>(Point(190, 56), AnimationPath::builtin("GSPBUT2.DEF"), CButton::tooltip("", LIBRARY->generaltexth->translate("vcmi.lobby.pvp.randomTownVs.help")), [getBannedTowns](){
LobbyPvPAction lpa;
lpa.action = LobbyPvPAction::RANDOM_TOWN_VS;
lpa.bannedTowns = getBannedTowns();
GAME->server().sendLobbyPack(lpa);
}, EShortcut::LOBBY_RANDOM_TOWN_VS);
buttonRandomTownVs->setTextOverlay(VLC->generaltexth->translate("vcmi.lobby.pvp.randomTownVs.hover"), EFonts::FONT_SMALL, Colors::WHITE);
buttonRandomTownVs->setTextOverlay(LIBRARY->generaltexth->translate("vcmi.lobby.pvp.randomTownVs.hover"), EFonts::FONT_SMALL, Colors::WHITE);
buttonHandicap = std::make_shared<CButton>(Point(190, 81), AnimationPath::builtin("GSPBUT2.DEF"), CButton::tooltip("", VLC->generaltexth->translate("vcmi.lobby.handicap")), [](){
buttonHandicap = std::make_shared<CButton>(Point(190, 81), AnimationPath::builtin("GSPBUT2.DEF"), CButton::tooltip("", LIBRARY->generaltexth->translate("vcmi.lobby.handicap")), [](){
if(!GAME->server().isHost())
return;
ENGINE->windows().createAndPushWindow<OptionsTab::HandicapWindow>();
}, EShortcut::LOBBY_HANDICAP);
buttonHandicap->setTextOverlay(VLC->generaltexth->translate("vcmi.lobby.handicap"), EFonts::FONT_SMALL, Colors::WHITE);
buttonHandicap->setTextOverlay(LIBRARY->generaltexth->translate("vcmi.lobby.handicap"), EFonts::FONT_SMALL, Colors::WHITE);
}
TownSelector::TownSelector(const Point & loc)
@ -461,7 +461,7 @@ TownSelector::TownSelector(const Point & loc)
setRedrawParent(true);
int count = 0;
for(auto const & factionID : VLC->townh->getDefaultAllowed())
for(auto const & factionID : LIBRARY->townh->getDefaultAllowed())
{
townsEnabled[factionID] = true;
count++;
@ -490,7 +490,7 @@ void TownSelector::updateListItems()
int x = 0;
int y = 0;
for (auto const & factionID : VLC->townh->getDefaultAllowed())
for (auto const & factionID : LIBRARY->townh->getDefaultAllowed())
{
if(y >= line && (y - line) < 3)
{
@ -529,8 +529,8 @@ CFlagBox::CFlagBox(const Rect & rect)
pos.h = rect.h;
OBJECT_CONSTRUCTION;
labelAllies = std::make_shared<CLabel>(0, 0, FONT_SMALL, ETextAlignment::TOPLEFT, Colors::WHITE, VLC->generaltexth->allTexts[390] + ":");
labelEnemies = std::make_shared<CLabel>(133, 0, FONT_SMALL, ETextAlignment::TOPLEFT, Colors::WHITE, VLC->generaltexth->allTexts[391] + ":");
labelAllies = std::make_shared<CLabel>(0, 0, FONT_SMALL, ETextAlignment::TOPLEFT, Colors::WHITE, LIBRARY->generaltexth->allTexts[390] + ":");
labelEnemies = std::make_shared<CLabel>(133, 0, FONT_SMALL, ETextAlignment::TOPLEFT, Colors::WHITE, LIBRARY->generaltexth->allTexts[391] + ":");
}
void CFlagBox::recreate()
@ -567,7 +567,7 @@ CFlagBox::CFlagBoxTooltipBox::CFlagBoxTooltipBox()
{
OBJECT_CONSTRUCTION;
labelTeamAlignment = std::make_shared<CLabel>(128, 30, FONT_MEDIUM, ETextAlignment::CENTER, Colors::YELLOW, VLC->generaltexth->allTexts[657]);
labelTeamAlignment = std::make_shared<CLabel>(128, 30, FONT_MEDIUM, ETextAlignment::CENTER, Colors::YELLOW, LIBRARY->generaltexth->allTexts[657]);
labelGroupTeams = std::make_shared<CLabelGroup>(FONT_SMALL, ETextAlignment::CENTER, Colors::WHITE);
std::vector<std::set<PlayerColor>> teams(PlayerColor::PLAYER_LIMIT_I);
@ -586,7 +586,7 @@ CFlagBox::CFlagBoxTooltipBox::CFlagBoxTooltipBox()
if(team.empty())
continue;
labelGroupTeams->add(128, 65 + 50 * curIdx, boost::str(boost::format(VLC->generaltexth->allTexts[656]) % (curIdx + 1)));
labelGroupTeams->add(128, 65 + 50 * curIdx, boost::str(boost::format(LIBRARY->generaltexth->allTexts[656]) % (curIdx + 1)));
int curx = 128 - 9 * team.size();
for(const auto & player : team)
{