瀏覽代碼

Adjust tab positioning

Dydzio 2 年之前
父節點
當前提交
9eccc29e16

+ 1 - 1
client/windows/settings/SettingsMainWindow.cpp

@@ -71,7 +71,7 @@ SettingsMainWindow::SettingsMainWindow(BattleInterface * parentBattleUi) : Inter
 		defaultTabIndex = settings["general"]["lastSettingsTab"].Integer();
 
 	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");
 	mainTabs->setSelected(defaultTabIndex);

+ 4 - 0
client/windows/settings/SettingsMainWindow.h

@@ -16,6 +16,10 @@ class BattleInterface;
 class CTabbedInt;
 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
 {
 private:

+ 17 - 17
config/widgets/settings/adventureOptionsTab.json

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

+ 24 - 24
config/widgets/settings/battleOptionsTab.json

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

+ 17 - 17
config/widgets/settings/generalOptionsTab.json

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