1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

Change large spellbook config section to gameTweaks

This commit is contained in:
Dydzio 2023-11-28 22:30:50 +01:00
parent a4d76b2529
commit fc035b1b55
3 changed files with 11 additions and 11 deletions

View File

@ -97,13 +97,13 @@ public:
} spellsorter;
CSpellWindow::CSpellWindow(const CGHeroInstance * _myHero, CPlayerInterface * _myInt, bool openOnBattleSpells):
CWindowObject(PLAYER_COLORED | (settings["general"]["enableLargeSpellbook"].Bool() ? BORDERED : 0)),
CWindowObject(PLAYER_COLORED | (settings["gameTweaks"]["enableLargeSpellbook"].Bool() ? BORDERED : 0)),
battleSpellsOnly(openOnBattleSpells),
selectedTab(4),
currentPage(0),
myHero(_myHero),
myInt(_myInt),
isBigSpellbook(settings["general"]["enableLargeSpellbook"].Bool()),
isBigSpellbook(settings["gameTweaks"]["enableLargeSpellbook"].Bool()),
spellsPerPage(24),
offL(-11),
offR(195),

View File

@ -164,7 +164,7 @@ GeneralOptionsTab::GeneralOptionsTab()
addCallback("enableLargeSpellbookChanged", [](bool value)
{
setBoolSetting("general", "enableLargeSpellbook", value);
setBoolSetting("gameTweaks", "enableLargeSpellbook", value);
});
//moved from "other" tab that is disabled for now to avoid excessible tabs with barely any content
@ -213,7 +213,7 @@ GeneralOptionsTab::GeneralOptionsTab()
std::shared_ptr<CToggleButton> enableLargeSpellbookCheckbox = widget<CToggleButton>("enableLargeSpellbookCheckbox");
if (enableLargeSpellbookCheckbox)
enableLargeSpellbookCheckbox->setSelected(settings["general"]["enableLargeSpellbook"].Bool());
enableLargeSpellbookCheckbox->setSelected(settings["gameTweaks"]["enableLargeSpellbook"].Bool());
std::shared_ptr<CSlider> musicSlider = widget<CSlider>("musicSlider");
musicSlider->scrollTo(CCS->musich->getVolume());

View File

@ -39,8 +39,7 @@
"useSavePrefix",
"savePrefix",
"startTurnAutosave",
"enableUiEnhancements",
"enableLargeSpellbook"
"enableUiEnhancements"
],
"properties" : {
"playerName" : {
@ -132,10 +131,6 @@
"enableUiEnhancements" : {
"type": "boolean",
"default": true
},
"enableLargeSpellbook" : {
"type": "boolean",
"default": false
}
}
},
@ -581,7 +576,8 @@
"compactTownCreatureInfo",
"infoBarPick",
"skipBattleIntroMusic",
"infoBarCreatureManagement"
"infoBarCreatureManagement",
"enableLargeSpellbook"
],
"properties" : {
"showGrid" : {
@ -615,6 +611,10 @@
"infoBarCreatureManagement": {
"type" : "boolean",
"default" : false
},
"enableLargeSpellbook" : {
"type": "boolean",
"default": false
}
}
}