mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-25 22:42:04 +02:00
Added GameInstance class
- available as global GAME - integrates LOCPLINT (CPlayerInterface) - integrates CGI->mh (CMapHandler) - integrates CSH (CServerHandler)
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
#include "../battle/BattleInterfaceClasses.h"
|
||||
#include "../eventsSDL/InputHandler.h"
|
||||
#include "../GameEngine.h"
|
||||
#include "../GameInstance.h"
|
||||
#include "../gui/MouseButton.h"
|
||||
#include "../gui/Shortcut.h"
|
||||
#include "../gui/InterfaceObjectConfigurable.h"
|
||||
@@ -100,7 +101,7 @@ void ButtonBase::setImage(const AnimationPath & defName, bool playerColoredButto
|
||||
pos = image->pos;
|
||||
|
||||
if (playerColoredButton)
|
||||
image->setPlayerColor(LOCPLINT->playerID);
|
||||
image->setPlayerColor(GAME->interface()->playerID);
|
||||
}
|
||||
|
||||
const JsonNode & ButtonBase::getCurrentConfig() const
|
||||
@@ -135,7 +136,7 @@ void ButtonBase::setConfigurable(const JsonPath & jsonName, bool playerColoredBu
|
||||
pos = configurable->pos;
|
||||
|
||||
if (playerColoredButton)
|
||||
image->setPlayerColor(LOCPLINT->playerID);
|
||||
image->setPlayerColor(GAME->interface()->playerID);
|
||||
}
|
||||
|
||||
void CButton::addHoverText(EButtonState state, const std::string & text)
|
||||
|
||||
Reference in New Issue
Block a user