1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-28 23:06:24 +02:00

Further UI improvements

This commit is contained in:
Dydzio 2023-02-14 22:22:11 +01:00
parent be9c71934c
commit daa2b63dde
5 changed files with 82 additions and 64 deletions

View File

@ -36,7 +36,7 @@
"vcmi.settingsMainWindow.otherTab.help" : "Switches to Other Settings tab - these options do not fit into other categories for various reasons",
"vcmi.systemOptions.fullscreenButton.hover" : "Fullscreen",
"vcmi.systemOptions.fullscreenButton.help" : "{Fullscreen}\n\n If selected, VCMI will run in fullscreen mode, othervice VCMI will run in window",
"vcmi.systemOptions.fullscreenButton.help" : "{Fullscreen}\n\n If selected, VCMI will run in fullscreen mode, otherwise VCMI will run in window",
"vcmi.systemOptions.resolutionButton.hover" : "Resolution",
"vcmi.systemOptions.resolutionButton.help" : "{Select resolution}\n\n Change in-game screen resolution. Game restart required to apply new resolution.",
"vcmi.systemOptions.resolutionMenu.hover" : "Select resolution",
@ -46,21 +46,31 @@
"vcmi.systemOptions.framerateButton.help" : "{Show FPS}\n\n Toggle on/off showing Frames Per Second counter in corner of game window.",
"vcmi.adventureOptions.numericQuantities.hover" : "Numeric creatures quantities",
"vcmi.adventureOptions.numericQuantities.help" : "{Numeric creatures quantities}\n\n Shows inaccurate enemy creatures quantities in numeric A-B format",
"vcmi.adventureOptions.numericQuantities.help" : "{Numeric creatures quantities}\n\n Shows inaccurate enemy creatures quantities in numeric A-B format.",
"vcmi.adventureOptions.forceMovementInfo.hover" : "Always show move info in status bar",
"vcmi.adventureOptions.forceMovementInfo.help" : "{Always show move info in status bar}\n\n Replaces default status bar info with movement points data without need to hold ALT button",
"vcmi.adventureOptions.forceMovementInfo.help" : "{Always show move info in status bar}\n\n Replaces default status bar info with movement points data without need to hold ALT button.",
"vcmi.adventureOptions.showGrid.hover" : "Show grid",
"vcmi.adventureOptions.showGrid.help" : "{Show grid}\n\n Shows grid overlay, showing borders between adventure map tiles",
"vcmi.adventureOptions.showGrid.help" : "{Show grid}\n\n Shows grid overlay, showing borders between adventure map tiles.",
"vcmi.adventureOptions.mapScrollSpeed4.hover": "4",
"vcmi.adventureOptions.mapScrollSpeed4.help": "Set map scrolling speed to very fast",
"vcmi.adventureOptions.mapScrollSpeed5.hover": "5",
"vcmi.adventureOptions.mapScrollSpeed5.help": "Set map scrolling speed to extremely fast",
"vcmi.battleOptions.showQueue.hover": "Show queue",
"vcmi.battleOptions.showQueue.help": "{Show queue}\n\n Show queue that displays movement order of creature stacks",
"vcmi.battleOptions.showQueue.help": "{Show queue}\n\n Show queue that displays movement order of creature stacks.",
"vcmi.battleOptions.queueSizeLabel.hover": "Queue size",
"vcmi.battleOptions.queueSizeAutoButton.hover": "Automatic",
"vcmi.battleOptions.queueSizeAutoButton.hover": "AUTO",
"vcmi.battleOptions.queueSizeAutoButton.help": "Sets queue size depending on game resolution",
"vcmi.battleOptions.queueSizeSmallButton.hover": "Small",
"vcmi.battleOptions.queueSizeSmallButton.hover": "SMALL",
"vcmi.battleOptions.queueSizeSmallButton.help": "Sets queue size to small",
"vcmi.battleOptions.queueSizeBigButton.hover": "Big",
"vcmi.battleOptions.queueSizeBigButton.hover": "BIG",
"vcmi.battleOptions.queueSizeBigButton.help": "Sets queue size to big",
"vcmi.battleOptions.animationsSpeed4.hover": "4",
"vcmi.battleOptions.animationsSpeed4.help": "Sets animation speed to very fast",
"vcmi.battleOptions.animationsSpeed5.hover": "5",
"vcmi.battleOptions.animationsSpeed5.help": "Sets animation speed to super fast",
"vcmi.battleOptions.animationsSpeed6.hover": "6",
"vcmi.battleOptions.animationsSpeed6.help": "Sets animation speed to extremely fast",
"vcmi.townHall.missingBase" : "Base building %s must be built first",
"vcmi.townHall.noCreaturesToRecruit" : "There are no creatures to recruit!",

View File

@ -281,6 +281,13 @@ std::shared_ptr<CToggleButton> InterfaceObjectConfigurable::buildToggleButton(co
auto image = config["image"].String();
auto help = readHintText(config["help"]);
auto button = std::make_shared<CToggleButton>(position, image, help);
if(!config["items"].isNull())
{
for(const auto & item : config["items"].Vector())
{
button->addOverlay(buildWidget(item));
}
}
if(!config["selected"].isNull())
button->setSelected(config["selected"].Bool());
if(!config["imageOrder"].isNull())

View File

@ -142,44 +142,45 @@
"image": "sysob11",
"help": "core.help.359",
"position": {"x": 128, "y": 0}
},
{
"index": 6,
"type": "toggleButton",
"image": "buttons/square",
"help": "TODO",
"position": {"x": 192, "y": 0},
"items":
[
{
"name": "mapScrollSpeed4",
"type": "label",
"font": "big",
"alignment": "center",
"color": "yellow",
"text": "4"
}
]
},
{
"index": 8,
"type": "toggleButton",
"image": "buttons/square",
"help": "TODO",
"position": {"x": 224, "y": 0},
"items":
[
{
"name": "mapScrollSpeed5",
"type": "label",
"font": "big",
"alignment": "center",
"color": "yellow",
"text": "5"
}
]
}
//not really functional yet...
// {
// "index": 6,
// "type": "toggleButton",
// "image": "buttons/square",
// "help": "vcmi.adventureOptions.mapScrollSpeed4",
// "position": {"x": 192, "y": 0},
// "items":
// [
// {
// "name": "mapScrollSpeed4",
// "type": "label",
// "font": "big",
// "alignment": "center",
// "color": "yellow",
// "text": "vcmi.adventureOptions.mapScrollSpeed4.hover"
// }
// ]
// },
// {
// "index": 8,
// "type": "toggleButton",
// "image": "buttons/square",
// "help": "vcmi.adventureOptions.mapScrollSpeed5",
// "position": {"x": 224, "y": 0},
// "items":
// [
// {
// "name": "mapScrollSpeed5",
// "type": "label",
// "font": "big",
// "alignment": "center",
// "color": "yellow",
// "text": "vcmi.adventureOptions.mapScrollSpeed5.hover"
// }
// ]
// }
],
"callback": "mapScrollSpeedChanged"
},

View File

@ -189,7 +189,7 @@
"index": 6,
"type": "toggleButton",
"image": "buttons/square",
"help": "TODO",
"help": "vcmi.battleOptions.animationsSpeed4",
"position": {"x": 192, "y": 0},
"items":
[
@ -199,7 +199,7 @@
"font": "big",
"alignment": "center",
"color": "yellow",
"text": "4"
"text": "vcmi.battleOptions.animationsSpeed4.hover"
}
]
},
@ -207,7 +207,7 @@
"index": 12,
"type": "toggleButton",
"image": "buttons/square",
"help": "TODO",
"help": "vcmi.battleOptions.animationsSpeed5",
"position": {"x": 229, "y": 0},
"items":
[
@ -217,7 +217,7 @@
"font": "big",
"alignment": "center",
"color": "yellow",
"text": "5"
"text": "vcmi.battleOptions.animationsSpeed5.hover"
}
]
},
@ -225,7 +225,7 @@
"index": 24,
"type": "toggleButton",
"image": "buttons/square",
"help": "TODO",
"help": "vcmi.battleOptions.animationsSpeed6",
"position": {"x": 266, "y": 0},
"items":
[
@ -235,7 +235,7 @@
"font": "big",
"alignment": "center",
"color": "yellow",
"text": "6"
"text": "vcmi.battleOptions.animationsSpeed6.hover"
}
]
}
@ -267,7 +267,7 @@
"type": "label",
"font": "medium",
"alignment": "left",
"color": "white",
"color": "yellow",
"text": "vcmi.battleOptions.queueSizeLabel.hover",
"position": {"x": 60, "y": 399}
},
@ -282,7 +282,7 @@
"index": 0, //auto
"type": "toggleButton",
"image": "buttons/triplewide",
"help": "TODO",
"help": "vcmi.battleOptions.queueSizeAutoButton",
"position": {"x": 0, "y": 0},
"items":
[
@ -292,7 +292,7 @@
"font": "big",
"alignment": "center",
"color": "yellow",
"text": "AUTO"
"text": "vcmi.battleOptions.queueSizeAutoButton.hover"
}
]
},
@ -300,7 +300,7 @@
"index": 1, //small
"type": "toggleButton",
"image": "buttons/triplewide",
"help": "TODO",
"help": "vcmi.battleOptions.queueSizeSmallButton",
"position": {"x": 113, "y": 0},
"items":
[
@ -310,7 +310,7 @@
"font": "big",
"alignment": "center",
"color": "yellow",
"text": "SMALL"
"text": "vcmi.battleOptions.queueSizeSmallButton.hover"
}
]
},
@ -318,7 +318,7 @@
"index": 2, //large
"type": "toggleButton",
"image": "buttons/triplewide",
"help": "TODO",
"help": "vcmi.battleOptions.queueSizeBigButton",
"position": {"x": 226, "y": 0},
"items":
[
@ -328,7 +328,7 @@
"font": "big",
"alignment": "center",
"color": "yellow",
"text": "BIG"
"text": "vcmi.battleOptions.queueSizeBigButton.hover"
}
]
}

View File

@ -91,7 +91,7 @@
{
"name": "loadButton",
"type": "button",
"position": {"x": 346, "y": 298},
"position": {"x": 386, "y": 378},
"image": "SOLOAD.DEF",
"imageOrder": [1, 0, 2, 3],
"help": "core.help.321",
@ -102,7 +102,7 @@
{
"name": "saveButton",
"type": "button",
"position": {"x": 457, "y": 298},
"position": {"x": 497, "y": 378},
"image": "SOSAVE.DEF",
"imageOrder": [1, 0, 2, 3],
"help": "core.help.322",
@ -113,7 +113,7 @@
{
"name": "restartButton",
"type": "button",
"position": {"x": 346, "y": 357},
"position": {"x": 386, "y": 437},
"image": "SORSTRT.DEF",
"imageOrder": [1, 0, 2, 3],
"help": "core.help.323",
@ -124,7 +124,7 @@
{
"name": "mainMenuButton",
"type": "button",
"position": {"x": 457, "y": 357},
"position": {"x": 497, "y": 437},
"image": "SOMAIN.DEF",
"imageOrder": [1, 0, 2, 3],
"help": "core.help.320",
@ -135,7 +135,7 @@
{
"name": "quitButton",
"type": "button",
"position": {"x": 346, "y": 415},
"position": {"x": 386, "y": 495},
"image": "soquit.def",
"imageOrder": [1, 0, 2, 3],
"help": "core.help.324",
@ -146,7 +146,7 @@
{
"name": "closeSettingsButton",
"type": "button",
"position": {"x": 457, "y": 415},
"position": {"x": 497, "y": 495},
"image": "soretrn.def",
"imageOrder": [1, 0, 2, 3],
"help": "core.help.325",