mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-29 23:07:48 +02:00
Gui cleanup4 (#446)
* use smart pointers for almost all widget fields * use SDL2 texture for cursor * a lot af small tweaks and formatting * removed CompImage class, it is actually useless as long as regular SDLImage support margins * CGuiHandler: use smart pointers for [push|pop]Int
This commit is contained in:
committed by
ArseniyShestakov
parent
7c8b74a806
commit
75f8c8b29a
@@ -394,14 +394,14 @@ void CBonusSelection::goBack()
|
||||
}
|
||||
else
|
||||
{
|
||||
GH.popIntTotally(this);
|
||||
close();
|
||||
}
|
||||
// TODO: we can actually only pop bonus selection interface for custom campaigns
|
||||
// Though this would require clearing CLobbyScreen::bonusSel pointer when poping this interface
|
||||
/*
|
||||
else
|
||||
{
|
||||
GH.popIntTotally(this);
|
||||
close();
|
||||
CSH->state = EClientState::LOBBY;
|
||||
}
|
||||
*/
|
||||
@@ -420,7 +420,7 @@ void CBonusSelection::startMap()
|
||||
const CCampaignScenario & scenario = getCampaign()->camp->scenarios[CSH->campaignMap];
|
||||
if(scenario.prolog.hasPrologEpilog)
|
||||
{
|
||||
GH.pushInt(new CPrologEpilogVideo(scenario.prolog, exitCb));
|
||||
GH.pushIntT<CPrologEpilogVideo>(scenario.prolog, exitCb);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -430,7 +430,7 @@ void CBonusSelection::startMap()
|
||||
|
||||
if(LOCPLINT) // we're currently ingame, so ask for starting new map and end game
|
||||
{
|
||||
GH.popInt(this);
|
||||
close();
|
||||
LOCPLINT->showYesNoDialog(CGI->generaltexth->allTexts[67], [=]()
|
||||
{
|
||||
showPrologVideo();
|
||||
@@ -444,7 +444,7 @@ void CBonusSelection::startMap()
|
||||
|
||||
void CBonusSelection::restartMap()
|
||||
{
|
||||
GH.popInt(this);
|
||||
close();
|
||||
LOCPLINT->showYesNoDialog(CGI->generaltexth->allTexts[67], [=]()
|
||||
{
|
||||
CSH->startCampaignScenario();
|
||||
|
||||
Reference in New Issue
Block a user