diff --git a/src/engine/game/gui/ingame/character.cpp b/src/engine/game/gui/ingame/character.cpp index 2234cba2..250dcf36 100644 --- a/src/engine/game/gui/ingame/character.cpp +++ b/src/engine/game/gui/ingame/character.cpp @@ -19,11 +19,12 @@ #include -#include "../../../gui/scenebuilder.h" #include "../../../graphics/model/models.h" +#include "../../../gui/scenebuilder.h" #include "../../d20/classes.h" #include "../../game.h" +#include "../../gameidutil.h" #include "../colorutil.h" @@ -39,7 +40,7 @@ namespace reone { namespace game { -CharacterMenu::CharacterMenu(Game *game) : GameGUI(game) { +CharacterMenu::CharacterMenu(Game *game, InGameMenu &inGameMenu) : GameGUI(game), _inGameMenu(inGameMenu) { _resRef = getResRef("character"); initForGame(); @@ -48,30 +49,103 @@ CharacterMenu::CharacterMenu(Game *game) : GameGUI(game) { void CharacterMenu::load() { GUI::load(); + bindControls(); - hideControl("BTN_CHARLEFT"); - hideControl("BTN_CHARRIGHT"); - hideControl("LBL_GOOD0"); - hideControl("LBL_GOOD1"); - hideControl("LBL_GOOD2"); - hideControl("LBL_GOOD3"); - hideControl("LBL_GOOD4"); - hideControl("LBL_GOOD5"); - hideControl("LBL_GOOD6"); - hideControl("LBL_GOOD7"); - hideControl("LBL_GOOD8"); - hideControl("LBL_GOOD9"); - hideControl("LBL_GOOD10"); - hideControl("LBL_MORE"); + _binding.btnAuto->setDisabled(true); + if (!isTSL(_game->gameId())) { + _binding.btnCharLeft->setVisible(false); + _binding.btnCharRight->setVisible(false); - disableControl("BTN_AUTO"); - disableControl("BTN_SCRIPTS"); + for (auto &control : _binding.lblGood) { + control->setVisible(false); + } + + _binding.lblMore->setVisible(false); + _binding.btnScripts->setDisabled(true); + } +} + +void CharacterMenu::bindControls() { + _binding.lbl3dChar = getControlPtr