1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-24 03:47:18 +02:00

Draft version of backpack button + new setting for original H3 UI mode

This commit is contained in:
Dydzio 2023-08-20 17:45:43 +02:00
parent f24910e5d2
commit cab6fb76aa
7 changed files with 31 additions and 6 deletions

View File

@ -0,0 +1,8 @@
{
"basepath" : "buttons/",
"images" :
[
{ "frame" : 0, "file" : "backpackNormal.png"},
{ "frame" : 1, "file" : "backpackPressed.png"}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

@ -173,6 +173,8 @@
"vcmi.heroWindow.openCommander.hover" : "Open commander info window", "vcmi.heroWindow.openCommander.hover" : "Open commander info window",
"vcmi.heroWindow.openCommander.help" : "Shows details about the commander of this hero", "vcmi.heroWindow.openCommander.help" : "Shows details about the commander of this hero",
"vcmi.heroWindow.openBackpack.hover" : "Open artifact backpack window",
"vcmi.heroWindow.openBackpack.help" : "Opens window that allows easier artifact backpack management",
"vcmi.commanderWindow.artifactMessage" : "Do you want to return this artifact to the hero?", "vcmi.commanderWindow.artifactMessage" : "Do you want to return this artifact to the hero?",

View File

@ -173,6 +173,8 @@
"vcmi.heroWindow.openCommander.hover" : "Otwórz okno dowódcy", "vcmi.heroWindow.openCommander.hover" : "Otwórz okno dowódcy",
"vcmi.heroWindow.openCommander.help" : "Wyświetla informacje o dowódcy przynależącym do tego bohatera", "vcmi.heroWindow.openCommander.help" : "Wyświetla informacje o dowódcy przynależącym do tego bohatera",
"vcmi.heroWindow.openBackpack.hover" : "Otwórz okno sakwy",
"vcmi.heroWindow.openBackpack.help" : "Otwiera okno pozwalające łatwiej zarządzać artefaktami w sakwie",
"vcmi.commanderWindow.artifactMessage" : "Czy chcesz zwrócić ten artefakt bohaterowi?", "vcmi.commanderWindow.artifactMessage" : "Czy chcesz zwrócić ten artefakt bohaterowi?",

View File

@ -84,11 +84,19 @@ CHeroWindow::CHeroWindow(const CGHeroInstance * hero)
quitButton = std::make_shared<CButton>(Point(609, 516), "hsbtns.def", CButton::tooltip(heroscrn[17]), [=](){ close(); }, EShortcut::GLOBAL_RETURN); quitButton = std::make_shared<CButton>(Point(609, 516), "hsbtns.def", CButton::tooltip(heroscrn[17]), [=](){ close(); }, EShortcut::GLOBAL_RETURN);
dismissLabel = std::make_shared<CTextBox>(CGI->generaltexth->jktexts[8], Rect(370, 430, 65, 35), 0, FONT_SMALL, ETextAlignment::TOPLEFT, Colors::WHITE); if(settings["general"]["enableUiEnhancements"].Bool())
dismissButton = std::make_shared<CButton>(Point(454, 429), "hsbtns2.def", CButton::tooltip(heroscrn[28]), [=](){ dismissCurrent(); }, EShortcut::HERO_DISMISS); {
questlogButton = std::make_shared<CButton>(Point(314, 429), "hsbtns4.def", CButton::tooltip(heroscrn[0]), [=](){ LOCPLINT->showQuestLog(); }, EShortcut::ADVENTURE_QUEST_LOG);
questlogLabel = std::make_shared<CTextBox>(CGI->generaltexth->jktexts[9], Rect(510, 430, 65, 35), 0, FONT_SMALL, ETextAlignment::TOPLEFT, Colors::WHITE); backpackButton = std::make_shared<CButton>(Point(424, 429), "buttons/backpack", CButton::tooltipLocalized("vcmi.heroWindow.Backpack"), [=](){ createBackpackWindow(); }, EShortcut::HERO_BACKPACK);
questlogButton = std::make_shared<CButton>(Point(314, 429), "hsbtns4.def", CButton::tooltip(heroscrn[0]), [=](){ LOCPLINT->showQuestLog(); }, EShortcut::ADVENTURE_QUEST_LOG); dismissButton = std::make_shared<CButton>(Point(534, 429), "hsbtns2.def", CButton::tooltip(heroscrn[28]), [=](){ dismissCurrent(); }, EShortcut::HERO_DISMISS);
}
else
{
dismissLabel = std::make_shared<CTextBox>(CGI->generaltexth->jktexts[8], Rect(370, 430, 65, 35), 0, FONT_SMALL, ETextAlignment::TOPLEFT, Colors::WHITE);
questlogLabel = std::make_shared<CTextBox>(CGI->generaltexth->jktexts[9], Rect(510, 430, 65, 35), 0, FONT_SMALL, ETextAlignment::TOPLEFT, Colors::WHITE);
dismissButton = std::make_shared<CButton>(Point(454, 429), "hsbtns2.def", CButton::tooltip(heroscrn[28]), [=](){ dismissCurrent(); }, EShortcut::HERO_DISMISS);
questlogButton = std::make_shared<CButton>(Point(314, 429), "hsbtns4.def", CButton::tooltip(heroscrn[0]), [=](){ LOCPLINT->showQuestLog(); }, EShortcut::ADVENTURE_QUEST_LOG);
}
formations = std::make_shared<CToggleGroup>(0); formations = std::make_shared<CToggleGroup>(0);
formations->addToggle(0, std::make_shared<CToggleButton>(Point(481, 483), "hsbtns6.def", std::make_pair(heroscrn[23], heroscrn[29]), 0, EShortcut::HERO_TIGHT_FORMATION)); formations->addToggle(0, std::make_shared<CToggleButton>(Point(481, 483), "hsbtns6.def", std::make_pair(heroscrn[23], heroscrn[29]), 0, EShortcut::HERO_TIGHT_FORMATION));

View File

@ -38,7 +38,8 @@
"autosaveCountLimit", "autosaveCountLimit",
"useSavePrefix", "useSavePrefix",
"savePrefix", "savePrefix",
"startTurnAutosave" "startTurnAutosave",
"enableUiEnhancements"
], ],
"properties" : { "properties" : {
"playerName" : { "playerName" : {
@ -126,6 +127,10 @@
"startTurnAutosave" : { "startTurnAutosave" : {
"type": "boolean", "type": "boolean",
"default": false "default": false
},
"enableUiEnhancements" : {
"type": "boolean",
"default": true
} }
} }
}, },