|
@@ -8,14 +8,12 @@
|
|
|
*
|
|
|
*/
|
|
|
#include "StdInc.h"
|
|
|
-
|
|
|
#include "BattleOptionsTab.h"
|
|
|
-#include "CConfigHandler.h"
|
|
|
|
|
|
#include "../../battle/BattleInterface.h"
|
|
|
-#include "../../battle/BattleActionsController.h"
|
|
|
#include "../../gui/CGuiHandler.h"
|
|
|
#include "../../eventsSDL/InputHandler.h"
|
|
|
+#include "../../../lib/CConfigHandler.h"
|
|
|
#include "../../../lib/filesystem/ResourceID.h"
|
|
|
#include "../../../lib/CGeneralTextHandler.h"
|
|
|
#include "../../widgets/Buttons.h"
|
|
@@ -26,7 +24,7 @@ BattleOptionsTab::BattleOptionsTab(BattleInterface * owner)
|
|
|
OBJ_CONSTRUCTION_CAPTURING_ALL_NO_DISPOSE;
|
|
|
type |= REDRAW_PARENT;
|
|
|
|
|
|
- addConditional("touchscreen", GH.input().hasTouchInputDevice());
|
|
|
+ //addConditional("touchscreen", GH.input().hasTouchInputDevice());
|
|
|
|
|
|
const JsonNode config(ResourceID("config/widgets/settings/battleOptionsTab.json"));
|
|
|
addCallback("viewGridChanged", [this, owner](bool value)
|
|
@@ -61,10 +59,6 @@ BattleOptionsTab::BattleOptionsTab(BattleInterface * owner)
|
|
|
{
|
|
|
skipBattleIntroMusicChangedCallback(value);
|
|
|
});
|
|
|
- addCallback("touchscreenModeChanged", [this, owner](bool value)
|
|
|
- {
|
|
|
- touchscreenModeChangedCallback(value, owner);
|
|
|
- });
|
|
|
build(config);
|
|
|
|
|
|
std::shared_ptr<CToggleGroup> animationSpeedToggle = widget<CToggleGroup>("animationSpeedPicker");
|
|
@@ -84,10 +78,6 @@ BattleOptionsTab::BattleOptionsTab(BattleInterface * owner)
|
|
|
|
|
|
std::shared_ptr<CToggleButton> mouseShadowCheckbox = widget<CToggleButton>("mouseShadowCheckbox");
|
|
|
mouseShadowCheckbox->setSelected(settings["battle"]["mouseShadow"].Bool());
|
|
|
-
|
|
|
- std::shared_ptr<CToggleButton> touchscreenModeCheckbox = widget<CToggleButton>("touchscreenModeCheckbox");
|
|
|
- if (touchscreenModeCheckbox)
|
|
|
- touchscreenModeCheckbox->setSelected(settings["battle"]["touchscreenMode"].Bool());
|
|
|
|
|
|
std::shared_ptr<CToggleButton> skipBattleIntroMusicCheckbox = widget<CToggleButton>("skipBattleIntroMusicCheckbox");
|
|
|
skipBattleIntroMusicCheckbox->setSelected(settings["gameTweaks"]["skipBattleIntroMusic"].Bool());
|
|
@@ -168,12 +158,6 @@ void BattleOptionsTab::mouseShadowChangedCallback(bool value)
|
|
|
shadow->Bool() = value;
|
|
|
}
|
|
|
|
|
|
-void BattleOptionsTab::touchscreenModeChangedCallback(bool value, BattleInterface * parentBattleInterface)
|
|
|
-{
|
|
|
- Settings touchcreenMode = settings.write["battle"]["touchscreenMode"];
|
|
|
- touchcreenMode->Bool() = value;
|
|
|
-}
|
|
|
-
|
|
|
void BattleOptionsTab::animationSpeedChangedCallback(int value)
|
|
|
{
|
|
|
Settings speed = settings.write["battle"]["speedFactor"];
|