1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-25 00:37:24 +02:00

Adjust tab positioning

This commit is contained in:
Dydzio
2023-02-19 12:18:54 +01:00
parent 7f03223634
commit 9eccc29e16
5 changed files with 63 additions and 59 deletions

View File

@ -71,7 +71,7 @@ SettingsMainWindow::SettingsMainWindow(BattleInterface * parentBattleUi) : Inter
defaultTabIndex = settings["general"]["lastSettingsTab"].Integer(); defaultTabIndex = settings["general"]["lastSettingsTab"].Integer();
parentBattleInterface = parentBattleUi; parentBattleInterface = parentBattleUi;
tabContentArea = std::make_shared<CTabbedInt>(std::bind(&SettingsMainWindow::createTab, this, _1), Point(0, 40), defaultTabIndex); tabContentArea = std::make_shared<CTabbedInt>(std::bind(&SettingsMainWindow::createTab, this, _1), Point(0, 0), defaultTabIndex);
std::shared_ptr<CToggleGroup> mainTabs = widget<CToggleGroup>("settingsTabs"); std::shared_ptr<CToggleGroup> mainTabs = widget<CToggleGroup>("settingsTabs");
mainTabs->setSelected(defaultTabIndex); mainTabs->setSelected(defaultTabIndex);

View File

@ -16,6 +16,10 @@ class BattleInterface;
class CTabbedInt; class CTabbedInt;
enum class EUserEvent; enum class EUserEvent;
/// <summary>
///Original H3 settings were replaced with this window in Github PR #1540. New options added are intended to be clientside settings.
///By design, most new options that alter gameplay UI from now on should be added to "gameTweaks" config key.
/// </summary>
class SettingsMainWindow : public InterfaceObjectConfigurable class SettingsMainWindow : public InterfaceObjectConfigurable
{ {
private: private:

View File

@ -10,15 +10,15 @@
"items": "items":
[ [
{ {
"position": {"x": 122, "y": 32}, "position": {"x": 122, "y": 52},
"text": "core.genrltxt.569" "text": "core.genrltxt.569"
}, },
{ {
"position": {"x": 122, "y": 98}, "position": {"x": 122, "y": 118},
"text": "core.genrltxt.570" "text": "core.genrltxt.570"
}, },
{ {
"position": {"x": 122, "y": 164}, "position": {"x": 122, "y": 184},
"text": "core.genrltxt.571" "text": "core.genrltxt.571"
} }
] ]
@ -27,7 +27,7 @@
{ {
"name": "heroMovementSpeedPicker", "name": "heroMovementSpeedPicker",
"type": "toggleGroup", "type": "toggleGroup",
"position": {"x": 28, "y": 45}, "position": {"x": 28, "y": 65},
"items": "items":
[ [
{ {
@ -76,7 +76,7 @@
{ {
"name": "enemyMovementSpeedPicker", "name": "enemyMovementSpeedPicker",
"type": "toggleGroup", "type": "toggleGroup",
"position": {"x": 28, "y": 112}, "position": {"x": 28, "y": 132},
"items": "items":
[ [
{ {
@ -117,7 +117,7 @@
{ {
"name": "mapScrollSpeedPicker", "name": "mapScrollSpeedPicker",
"type": "toggleGroup", "type": "toggleGroup",
"position": {"x": 28, "y": 178}, "position": {"x": 28, "y": 198},
"items": "items":
[ [
{ {
@ -194,27 +194,27 @@
"items": "items":
[ [
{ {
"position": {"x": 64, "y": 258}, "position": {"x": 64, "y": 278},
"text": "core.genrltxt.572" "text": "core.genrltxt.572"
}, },
{ {
"position": {"x": 64, "y": 294}, "position": {"x": 64, "y": 314},
"text": "core.genrltxt.573" "text": "core.genrltxt.573"
}, },
{ {
"position": {"x": 64, "y": 330}, "position": {"x": 64, "y": 350},
"text": "core.genrltxt.574" "text": "core.genrltxt.574"
}, },
{ {
"position": {"x": 64, "y": 366}, "position": {"x": 64, "y": 386},
"text": "vcmi.adventureOptions.numericQuantities.hover" "text": "vcmi.adventureOptions.numericQuantities.hover"
}, },
{ {
"position": {"x": 64, "y": 402}, "position": {"x": 64, "y": 422},
"text": "vcmi.adventureOptions.forceMovementInfo.hover" "text": "vcmi.adventureOptions.forceMovementInfo.hover"
}, },
{ {
"position": {"x": 64, "y": 438}, "position": {"x": 64, "y": 458},
"text": "vcmi.adventureOptions.showGrid.hover" "text": "vcmi.adventureOptions.showGrid.hover"
} }
] ]
@ -225,7 +225,7 @@
"type": "toggleButton", "type": "toggleButton",
"image": "sysopchk.def", "image": "sysopchk.def",
"help": "core.help.361", "help": "core.help.361",
"position": {"x": 28, "y": 292}, "position": {"x": 28, "y": 312},
"callback": "heroReminderChanged" "callback": "heroReminderChanged"
}, },
@ -234,7 +234,7 @@
"type": "toggleButton", "type": "toggleButton",
"image": "sysopchk.def", "image": "sysopchk.def",
"help": "core.help.362", "help": "core.help.362",
"position": {"x": 28, "y": 328}, "position": {"x": 28, "y": 348},
"callback": "quickCombatChanged" "callback": "quickCombatChanged"
}, },
@ -243,7 +243,7 @@
"type": "toggleButton", "type": "toggleButton",
"image": "sysopchk.def", "image": "sysopchk.def",
"help": "vcmi.adventureOptions.numericQuantities", "help": "vcmi.adventureOptions.numericQuantities",
"position": {"x": 28, "y": 364}, "position": {"x": 28, "y": 384},
"callback": "numericQuantitiesChanged" "callback": "numericQuantitiesChanged"
}, },
@ -252,7 +252,7 @@
"type": "toggleButton", "type": "toggleButton",
"image": "sysopchk.def", "image": "sysopchk.def",
"help": "vcmi.adventureOptions.forceMovementInfo", "help": "vcmi.adventureOptions.forceMovementInfo",
"position": {"x": 28, "y": 400}, "position": {"x": 28, "y": 420},
"callback": "forceMovementInfoChanged" "callback": "forceMovementInfoChanged"
}, },
{ {
@ -260,7 +260,7 @@
"type": "toggleButton", "type": "toggleButton",
"image": "sysopchk.def", "image": "sysopchk.def",
"help": "vcmi.adventureOptions.showGrid", "help": "vcmi.adventureOptions.showGrid",
"position": {"x": 28, "y": 436}, "position": {"x": 28, "y": 456},
"callback": "showGridChanged" "callback": "showGridChanged"
} }
] ]

View File

@ -8,7 +8,7 @@
"alignment": "center", "alignment": "center",
"color": "yellow", "color": "yellow",
"text": "core.genrltxt.393", "text": "core.genrltxt.393",
"position": {"x": 122, "y": 194} "position": {"x": 122, "y": 224}
}, },
{ {
"name": "autoCombatOptionsLabel", "name": "autoCombatOptionsLabel",
@ -17,7 +17,7 @@
"alignment": "center", "alignment": "center",
"color": "yellow", "color": "yellow",
"text": "core.genrltxt.396", "text": "core.genrltxt.396",
"position": {"x": 353, "y": 26} "position": {"x": 353, "y": 56}
}, },
{ {
"name": "creatureInfoLabel", "name": "creatureInfoLabel",
@ -26,7 +26,7 @@
"alignment": "center", "alignment": "center",
"color": "yellow", "color": "yellow",
"text": "core.genrltxt.397", "text": "core.genrltxt.397",
"position": {"x": 98, "y": 265} "position": {"x": 98, "y": 295}
}, },
{ {
@ -36,7 +36,7 @@
"alignment": "left", "alignment": "left",
"color": "white", "color": "white",
"text": "core.genrltxt.398", "text": "core.genrltxt.398",
"position": {"x": 283, "y": 46} "position": {"x": 283, "y": 76}
}, },
{ {
"name": "spellsAutoCombatLabel", "name": "spellsAutoCombatLabel",
@ -45,7 +45,7 @@
"alignment": "left", "alignment": "left",
"color": "white", "color": "white",
"text": "core.genrltxt.399", "text": "core.genrltxt.399",
"position": {"x": 283, "y": 76} "position": {"x": 283, "y": 106}
}, },
{ {
"name": "catapultAutoCombatLabel", "name": "catapultAutoCombatLabel",
@ -54,7 +54,7 @@
"alignment": "left", "alignment": "left",
"color": "white", "color": "white",
"text": "core.genrltxt.400", "text": "core.genrltxt.400",
"position": {"x": 283, "y": 106} "position": {"x": 283, "y": 136}
}, },
{ {
"name": "ballistaAutoCombatLabel", "name": "ballistaAutoCombatLabel",
@ -63,7 +63,7 @@
"alignment": "left", "alignment": "left",
"color": "white", "color": "white",
"text": "core.genrltxt.151", "text": "core.genrltxt.151",
"position": {"x": 283, "y": 136} "position": {"x": 283, "y": 166}
}, },
{ {
"name": "aidTentAutoCombatLabel", "name": "aidTentAutoCombatLabel",
@ -72,7 +72,7 @@
"alignment": "left", "alignment": "left",
"color": "white", "color": "white",
"text": "core.genrltxt.401", "text": "core.genrltxt.401",
"position": {"x": 283, "y": 166} "position": {"x": 283, "y": 196}
}, },
{ {
@ -82,7 +82,7 @@
"alignment": "left", "alignment": "left",
"color": "white", "color": "white",
"text": "core.genrltxt.402", "text": "core.genrltxt.402",
"position": {"x": 61, "y": 285} "position": {"x": 61, "y": 315}
}, },
{ {
"name": "creatureInfoOnlySpellsLabel", "name": "creatureInfoOnlySpellsLabel",
@ -91,7 +91,7 @@
"alignment": "left", "alignment": "left",
"color": "white", "color": "white",
"text": "core.genrltxt.403", "text": "core.genrltxt.403",
"position": {"x": 61, "y": 315} "position": {"x": 61, "y": 345}
}, },
{ {
@ -101,7 +101,7 @@
"alignment": "left", "alignment": "left",
"color": "white", "color": "white",
"text": "core.genrltxt.404", "text": "core.genrltxt.404",
"position": {"x": 61, "y": 27} "position": {"x": 61, "y": 57}
}, },
{ {
"name": "showMovementRangeLabel", "name": "showMovementRangeLabel",
@ -110,7 +110,7 @@
"alignment": "left", "alignment": "left",
"color": "white", "color": "white",
"text": "core.genrltxt.405", "text": "core.genrltxt.405",
"position": {"x": 61, "y": 60} "position": {"x": 61, "y": 90}
}, },
{ {
"name": "mouseShadowLabel", "name": "mouseShadowLabel",
@ -119,7 +119,7 @@
"alignment": "left", "alignment": "left",
"color": "white", "color": "white",
"text": "core.genrltxt.406", "text": "core.genrltxt.406",
"position": {"x": 61, "y": 93} "position": {"x": 61, "y": 123}
}, },
{ {
"name": "battleCasualtiesLabel", "name": "battleCasualtiesLabel",
@ -128,7 +128,7 @@
"alignment": "left", "alignment": "left",
"color": "white", "color": "white",
"text": "core.genrltxt.407", "text": "core.genrltxt.407",
"position": {"x": 61, "y": 126} "position": {"x": 61, "y": 156}
}, },
{ {
@ -136,7 +136,7 @@
"type": "toggleButton", "type": "toggleButton",
"image": "sysopchk.def", "image": "sysopchk.def",
"help": "core.help.427", "help": "core.help.427",
"position": {"x": 25, "y": 26}, "position": {"x": 25, "y": 56},
"callback": "viewGridChanged" "callback": "viewGridChanged"
}, },
{ {
@ -144,7 +144,7 @@
"type": "toggleButton", "type": "toggleButton",
"image": "sysopchk.def", "image": "sysopchk.def",
"help": "core.help.428", "help": "core.help.428",
"position": {"x": 25, "y": 59}, "position": {"x": 25, "y": 89},
"callback": "movementShadowChanged" "callback": "movementShadowChanged"
}, },
{ {
@ -152,14 +152,14 @@
"type": "toggleButton", "type": "toggleButton",
"image": "sysopchk.def", "image": "sysopchk.def",
"help": "core.help.429", "help": "core.help.429",
"position": {"x": 25, "y": 92}, "position": {"x": 25, "y": 122},
"callback": "mouseShadowChanged" "callback": "mouseShadowChanged"
}, },
{ {
"name": "animationSpeedPicker", "name": "animationSpeedPicker",
"type": "toggleGroup", "type": "toggleGroup",
"position": {"x": 28, "y": 205}, "position": {"x": 28, "y": 233},
"items": "items":
[ [
{ {
@ -250,7 +250,7 @@
"alignment": "left", "alignment": "left",
"color": "white", "color": "white",
"text": "vcmi.battleOptions.showQueue.hover", "text": "vcmi.battleOptions.showQueue.hover",
"position": {"x": 61, "y": 363} "position": {"x": 61, "y": 393}
}, },
{ {
@ -258,7 +258,7 @@
"type": "toggleButton", "type": "toggleButton",
"image": "sysopchk.def", "image": "sysopchk.def",
"help": "vcmi.battleOptions.showQueue", "help": "vcmi.battleOptions.showQueue",
"position": {"x": 25, "y": 361}, "position": {"x": 25, "y": 391},
"callback": "showQueueChanged" "callback": "showQueueChanged"
}, },
@ -269,13 +269,13 @@
"alignment": "left", "alignment": "left",
"color": "yellow", "color": "yellow",
"text": "vcmi.battleOptions.queueSizeLabel.hover", "text": "vcmi.battleOptions.queueSizeLabel.hover",
"position": {"x": 60, "y": 399} "position": {"x": 60, "y": 429}
}, },
{ {
"name": "queueSizePicker", "name": "queueSizePicker",
"type": "toggleGroup", "type": "toggleGroup",
"position": {"x": 28, "y": 420}, "position": {"x": 28, "y": 450},
"items": "items":
[ [
{ {
@ -343,7 +343,7 @@
"alignment": "left", "alignment": "left",
"color": "white", "color": "white",
"text": "vcmi.battleOptions.skipBattleIntroMusic.hover", "text": "vcmi.battleOptions.skipBattleIntroMusic.hover",
"position": {"x": 61, "y": 472} "position": {"x": 61, "y": 502}
}, },
{ {
@ -351,7 +351,7 @@
"type": "toggleButton", "type": "toggleButton",
"image": "sysopchk.def", "image": "sysopchk.def",
"help": "vcmi.battleOptions.skipBattleIntroMusic", "help": "vcmi.battleOptions.skipBattleIntroMusic",
"position": {"x": 25, "y": 470}, "position": {"x": 25, "y": 500},
"callback": "skipBattleIntroMusicChanged" "callback": "skipBattleIntroMusicChanged"
} }
] ]

View File

@ -10,15 +10,15 @@
"items": "items":
[ [
{ {
"position": {"x": 122, "y": 30}, "position": {"x": 122, "y": 50},
"text": "vcmi.systemOptions.resolutionButton.hover" "text": "vcmi.systemOptions.resolutionButton.hover"
}, },
{ {
"position": {"x": 122, "y": 115}, "position": {"x": 122, "y": 135},
"text": "core.genrltxt.394" "text": "core.genrltxt.394"
}, },
{ {
"position": {"x": 122, "y": 180}, "position": {"x": 122, "y": 200},
"text": "core.genrltxt.395" "text": "core.genrltxt.395"
} }
] ]
@ -27,7 +27,7 @@
{ {
"name": "resolutionButton", "name": "resolutionButton",
"type": "button", "type": "button",
"position": {"x": 28, "y": 43}, "position": {"x": 28, "y": 63},
"image": "buttons/resolution", "image": "buttons/resolution",
"help": "vcmi.systemOptions.resolutionButton", "help": "vcmi.systemOptions.resolutionButton",
"callback": "setGameResolution", "callback": "setGameResolution",
@ -40,13 +40,13 @@
"font": "medium", "font": "medium",
"alignment": "center", "alignment": "center",
"color": "yellow", "color": "yellow",
"position": {"x": 170, "y": 60} "position": {"x": 170, "y": 80}
}, },
{ {
"name": "musicSlider", "name": "musicSlider",
"type": "slider", "type": "slider",
"position": {"x": 29, "y": 127}, "position": {"x": 29, "y": 147},
"size": 190, "size": 190,
"style": "brown", "style": "brown",
"orientation": "horizontal", "orientation": "horizontal",
@ -58,7 +58,7 @@
{ {
"name": "soundVolumeSlider", "name": "soundVolumeSlider",
"type": "slider", "type": "slider",
"position": {"x": 29, "y": 193}, "position": {"x": 29, "y": 213},
"size": 190, "size": 190,
"style": "brown", "style": "brown",
"orientation": "horizontal", "orientation": "horizontal",
@ -76,15 +76,15 @@
"items": "items":
[ [
{ {
"position": {"x": 64, "y": 258}, "position": {"x": 64, "y": 278},
"text": "core.genrltxt.577" "text": "core.genrltxt.577"
}, },
{ {
"position": {"x": 64, "y": 294}, "position": {"x": 64, "y": 314},
"text": "vcmi.systemOptions.fullscreenButton.hover" "text": "vcmi.systemOptions.fullscreenButton.hover"
}, },
{ {
"position": {"x": 64, "y": 330}, "position": {"x": 64, "y": 350},
"text": "vcmi.systemOptions.framerateButton.hover" "text": "vcmi.systemOptions.framerateButton.hover"
} }
] ]
@ -95,7 +95,7 @@
"type": "toggleButton", "type": "toggleButton",
"image": "sysopchk.def", "image": "sysopchk.def",
"help": "core.help.364", "help": "core.help.364",
"position": {"x": 28, "y": 256}, "position": {"x": 28, "y": 276},
"callback": "spellbookAnimationChanged" "callback": "spellbookAnimationChanged"
}, },
@ -104,7 +104,7 @@
"type": "toggleButton", "type": "toggleButton",
"image": "sysopchk.def", "image": "sysopchk.def",
"help": "vcmi.systemOptions.fullscreenButton", "help": "vcmi.systemOptions.fullscreenButton",
"position": {"x": 28, "y": 292}, "position": {"x": 28, "y": 312},
"callback": "fullscreenChanged" "callback": "fullscreenChanged"
}, },
@ -113,7 +113,7 @@
"type": "toggleButton", "type": "toggleButton",
"image": "sysopchk.def", "image": "sysopchk.def",
"help": "vcmi.systemOptions.framerateButton", "help": "vcmi.systemOptions.framerateButton",
"position": {"x": 28, "y": 328}, "position": {"x": 28, "y": 348},
"callback": "framerateChanged" "callback": "framerateChanged"
}, },
@ -124,7 +124,7 @@
"alignment": "left", "alignment": "left",
"color": "white", "color": "white",
"text": "vcmi.otherOptions.availableCreaturesAsDwellingLabel.hover", "text": "vcmi.otherOptions.availableCreaturesAsDwellingLabel.hover",
"position": {"x": 64, "y": 366} "position": {"x": 64, "y": 386}
}, },
{ {
@ -132,7 +132,7 @@
"type": "toggleButton", "type": "toggleButton",
"image": "sysopchk.def", "image": "sysopchk.def",
"help": "vcmi.otherOptions.availableCreaturesAsDwellingLabel", "help": "vcmi.otherOptions.availableCreaturesAsDwellingLabel",
"position": {"x": 28, "y": 364}, "position": {"x": 28, "y": 384},
"callback": "availableCreaturesAsDwellingLabelChanged" "callback": "availableCreaturesAsDwellingLabelChanged"
}, },
@ -143,7 +143,7 @@
"alignment": "left", "alignment": "left",
"color": "white", "color": "white",
"text": "vcmi.otherOptions.compactTownCreatureInfo.hover", "text": "vcmi.otherOptions.compactTownCreatureInfo.hover",
"position": {"x": 64, "y": 402} "position": {"x": 64, "y": 422}
}, },
{ {
@ -151,7 +151,7 @@
"type": "toggleButton", "type": "toggleButton",
"image": "sysopchk.def", "image": "sysopchk.def",
"help": "vcmi.otherOptions.compactTownCreatureInfo", "help": "vcmi.otherOptions.compactTownCreatureInfo",
"position": {"x": 28, "y": 400}, "position": {"x": 28, "y": 420},
"callback": "compactTownCreatureInfoChanged" "callback": "compactTownCreatureInfoChanged"
} }
] ]