mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-23 22:37:55 +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
@@ -79,8 +79,7 @@ std::shared_ptr<CButton> CCampaignScreen::createExitButton(const JsonNode & butt
|
||||
if(!button["help"].isNull() && button["help"].Float() > 0)
|
||||
help = CGI->generaltexth->zelp[button["help"].Float()];
|
||||
|
||||
std::function<void()> close = std::bind(&CGuiHandler::popIntTotally, &GH, this);
|
||||
return std::make_shared<CButton>(Point(button["x"].Float(), button["y"].Float()), button["name"].String(), help, close, button["hotkey"].Float());
|
||||
return std::make_shared<CButton>(Point(button["x"].Float(), button["y"].Float()), button["name"].String(), help, [=](){ close();}, button["hotkey"].Float());
|
||||
}
|
||||
|
||||
CCampaignScreen::CCampaignButton::CCampaignButton(const JsonNode & config)
|
||||
|
||||
Reference in New Issue
Block a user