mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-23 22:37:55 +02:00
disable text
This commit is contained in:
@@ -149,6 +149,18 @@ void CLobbyScreen::toggleTab(std::shared_ptr<CIntObject> tab)
|
||||
GAME->server().sendGuiAction(LobbyGuiAction::OPEN_EXTRA_OPTIONS);
|
||||
else if(tab == tabBattleOnlyMode)
|
||||
GAME->server().sendGuiAction(LobbyGuiAction::BATTLE_MODE);
|
||||
|
||||
if(tab == tabBattleOnlyMode)
|
||||
{
|
||||
buttonStart->block(true);
|
||||
card->clearSelection();
|
||||
}
|
||||
else
|
||||
{
|
||||
buttonStart->block(GAME->server().mi == nullptr || GAME->server().isGuest());
|
||||
card->changeSelection();
|
||||
}
|
||||
|
||||
CSelectionBase::toggleTab(tab);
|
||||
}
|
||||
|
||||
|
||||
@@ -264,6 +264,7 @@ void InfoCard::changeSelection()
|
||||
labelLossConditionText->setText(header->defeatMessage.toString());
|
||||
flagbox->recreate();
|
||||
labelDifficulty->setText(LIBRARY->generaltexth->arraytxt[142 + vstd::to_underlying(mapInfo->mapHeader->difficulty)]);
|
||||
iconDifficulty->activate();
|
||||
iconDifficulty->setSelected(SEL->getCurrentDifficulty());
|
||||
if(SEL->screenType == ESelectionScreen::loadGame || SEL->screenType == ESelectionScreen::saveGame)
|
||||
for(auto & button : iconDifficulty->buttons)
|
||||
@@ -294,6 +295,24 @@ void InfoCard::changeSelection()
|
||||
}
|
||||
}
|
||||
|
||||
void InfoCard::clearSelection()
|
||||
{
|
||||
labelSaveDate->setText("");
|
||||
mapName->setText("");
|
||||
mapDescription->setText("");
|
||||
|
||||
if(SEL->screenType == ESelectionScreen::campaignList)
|
||||
return;
|
||||
|
||||
labelMapSize->setText("");
|
||||
|
||||
labelVictoryConditionText->setText("");
|
||||
labelLossConditionText->setText("");
|
||||
iconDifficulty->deactivate();
|
||||
labelDifficulty->setText("");
|
||||
labelDifficultyPercent->setText("");
|
||||
}
|
||||
|
||||
void InfoCard::toggleChat()
|
||||
{
|
||||
setChat(!showChat);
|
||||
|
||||
@@ -129,6 +129,7 @@ public:
|
||||
InfoCard();
|
||||
void disableLabelRedraws();
|
||||
void changeSelection();
|
||||
void clearSelection();
|
||||
void toggleChat();
|
||||
void setChat(bool activateChat);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user