mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-24 03:47:18 +02:00
make it also usable on android
This commit is contained in:
parent
8ae4a4ab8a
commit
aa6cbdf13b
@ -11,6 +11,7 @@
|
||||
|
||||
#include "AdventureOptionsTab.h"
|
||||
|
||||
#include "../../eventsSDL/InputHandler.h"
|
||||
#include "../../../lib/filesystem/ResourcePath.h"
|
||||
#include "../../gui/CGuiHandler.h"
|
||||
#include "../../widgets/Buttons.h"
|
||||
@ -36,6 +37,9 @@ AdventureOptionsTab::AdventureOptionsTab()
|
||||
OBJECT_CONSTRUCTION;
|
||||
setRedrawParent(true);
|
||||
|
||||
addConditional("touchscreen", GH.input().getCurrentInputMode() == InputMode::TOUCH);
|
||||
addConditional("keyboardMouse", GH.input().getCurrentInputMode() == InputMode::KEYBOARD_AND_MOUSE);
|
||||
addConditional("controller", GH.input().getCurrentInputMode() == InputMode::CONTROLLER);
|
||||
#ifdef VCMI_MOBILE
|
||||
addConditional("mobile", true);
|
||||
addConditional("desktop", false);
|
||||
|
@ -97,7 +97,9 @@ GeneralOptionsTab::GeneralOptionsTab()
|
||||
OBJECT_CONSTRUCTION;
|
||||
setRedrawParent(true);
|
||||
|
||||
addConditional("touchscreen", GH.input().hasTouchInputDevice());
|
||||
addConditional("touchscreen", GH.input().getCurrentInputMode() == InputMode::TOUCH);
|
||||
addConditional("keyboardMouse", GH.input().getCurrentInputMode() == InputMode::KEYBOARD_AND_MOUSE);
|
||||
addConditional("controller", GH.input().getCurrentInputMode() == InputMode::CONTROLLER);
|
||||
#ifdef VCMI_MOBILE
|
||||
addConditional("mobile", true);
|
||||
addConditional("desktop", false);
|
||||
|
@ -196,3 +196,8 @@ void SettingsMainWindow::onScreenResize()
|
||||
if (tab)
|
||||
tab->updateResolutionSelector();
|
||||
}
|
||||
|
||||
void SettingsMainWindow::inputModeChanged(InputMode mode)
|
||||
{
|
||||
tabContentArea->reset();
|
||||
}
|
||||
|
@ -42,5 +42,6 @@ public:
|
||||
|
||||
void showAll(Canvas & to) override;
|
||||
void onScreenResize() override;
|
||||
void inputModeChanged(InputMode mode) override;
|
||||
};
|
||||
|
||||
|
@ -364,7 +364,7 @@
|
||||
},
|
||||
{
|
||||
"text": "vcmi.adventureOptions.leftButtonDrag.hover",
|
||||
"created" : "desktop"
|
||||
"created" : "keyboardMouse"
|
||||
},
|
||||
{
|
||||
"text": "vcmi.adventureOptions.smoothDragging.hover"
|
||||
@ -379,7 +379,7 @@
|
||||
[
|
||||
{
|
||||
"text": "vcmi.adventureOptions.rightButtonDrag.hover",
|
||||
"created" : "desktop"
|
||||
"created" : "keyboardMouse"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -423,7 +423,7 @@
|
||||
"name": "leftButtonDragCheckbox",
|
||||
"help": "vcmi.adventureOptions.leftButtonDrag",
|
||||
"callback": "leftButtonDragChanged",
|
||||
"created" : "desktop"
|
||||
"created" : "keyboardMouse"
|
||||
},
|
||||
{
|
||||
"name": "smoothDraggingCheckbox",
|
||||
@ -442,7 +442,7 @@
|
||||
"name": "rightButtonDragCheckbox",
|
||||
"help": "vcmi.adventureOptions.rightButtonDrag",
|
||||
"callback": "rightButtonDragChanged",
|
||||
"created" : "desktop"
|
||||
"created" : "keyboardMouse"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user