mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-25 22:42:04 +02:00
use settings instead of persistentStorage
This commit is contained in:
@@ -211,7 +211,7 @@ void MapView::onViewMapActivated()
|
|||||||
{
|
{
|
||||||
controller->activateAdventureContext();
|
controller->activateAdventureContext();
|
||||||
|
|
||||||
int zoom = persistentStorage["tileZoom"].Integer();
|
int zoom = settings["adventure"]["tileZoom"].Integer();
|
||||||
if(zoom)
|
if(zoom)
|
||||||
controller->setTileSize(Point(zoom, zoom));
|
controller->setTileSize(Point(zoom, zoom));
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -140,7 +140,7 @@ void MapViewController::modifyTileSize(int stepsChange, bool useDeadZone)
|
|||||||
|
|
||||||
if (adventureContext)
|
if (adventureContext)
|
||||||
{
|
{
|
||||||
Settings tileZoom = persistentStorage.write["tileZoom"];
|
Settings tileZoom = settings.write["adventure"]["tileZoom"];
|
||||||
tileZoom->Integer() = actualZoom.x;
|
tileZoom->Integer() = actualZoom.x;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -475,7 +475,7 @@ CKingdomInterface::CKingdomInterface()
|
|||||||
statusbar = CGStatusBar::create(std::make_shared<CPicture>(ImagePath::builtin("KSTATBAR"), 10,pos.h - 45));
|
statusbar = CGStatusBar::create(std::make_shared<CPicture>(ImagePath::builtin("KSTATBAR"), 10,pos.h - 45));
|
||||||
resdatabar = std::make_shared<CResDataBar>(ImagePath::builtin("KRESBAR"), 7, 111+footerPos, 29, 3, 76, 81);
|
resdatabar = std::make_shared<CResDataBar>(ImagePath::builtin("KRESBAR"), 7, 111+footerPos, 29, 3, 76, 81);
|
||||||
|
|
||||||
activateTab(persistentStorage["gui"]["lastKindomInterface"].Integer());
|
activateTab(settings["general"]["lastKindomInterface"].Integer());
|
||||||
}
|
}
|
||||||
|
|
||||||
void CKingdomInterface::generateObjectsList(const std::vector<const CGObjectInstance * > &ownedObjects)
|
void CKingdomInterface::generateObjectsList(const std::vector<const CGObjectInstance * > &ownedObjects)
|
||||||
@@ -640,7 +640,7 @@ void CKingdomInterface::generateButtons()
|
|||||||
|
|
||||||
void CKingdomInterface::activateTab(size_t which)
|
void CKingdomInterface::activateTab(size_t which)
|
||||||
{
|
{
|
||||||
Settings s = persistentStorage.write["gui"]["lastKindomInterface"];
|
Settings s = settings.write["general"]["lastKindomInterface"];
|
||||||
s->Integer() = which;
|
s->Integer() = which;
|
||||||
|
|
||||||
btnHeroes->block(which == 0);
|
btnHeroes->block(which == 0);
|
||||||
|
|||||||
@@ -43,7 +43,8 @@
|
|||||||
"startTurnAutosave",
|
"startTurnAutosave",
|
||||||
"enableUiEnhancements",
|
"enableUiEnhancements",
|
||||||
"audioMuteFocus",
|
"audioMuteFocus",
|
||||||
"enableOverlay"
|
"enableOverlay",
|
||||||
|
"lastKindomInterface"
|
||||||
],
|
],
|
||||||
"properties" : {
|
"properties" : {
|
||||||
"playerName" : {
|
"playerName" : {
|
||||||
@@ -151,6 +152,10 @@
|
|||||||
"enableOverlay" : {
|
"enableOverlay" : {
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"default": true
|
"default": true
|
||||||
|
},
|
||||||
|
"lastKindomInterface" : {
|
||||||
|
"type" : "number",
|
||||||
|
"default" : 0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -372,7 +377,7 @@
|
|||||||
"type" : "object",
|
"type" : "object",
|
||||||
"additionalProperties" : false,
|
"additionalProperties" : false,
|
||||||
"default" : {},
|
"default" : {},
|
||||||
"required" : [ "heroMoveTime", "enemyMoveTime", "scrollSpeedPixels", "heroReminder", "quickCombat", "objectAnimation", "terrainAnimation", "forceQuickCombat", "borderScroll", "leftButtonDrag", "rightButtonDrag", "smoothDragging", "backgroundDimLevel", "hideBackground", "backgroundDimSmallWindows" ],
|
"required" : [ "heroMoveTime", "enemyMoveTime", "scrollSpeedPixels", "heroReminder", "quickCombat", "objectAnimation", "terrainAnimation", "forceQuickCombat", "borderScroll", "leftButtonDrag", "rightButtonDrag", "smoothDragging", "backgroundDimLevel", "hideBackground", "backgroundDimSmallWindows", "tileZoom" ],
|
||||||
"properties" : {
|
"properties" : {
|
||||||
"heroMoveTime" : {
|
"heroMoveTime" : {
|
||||||
"type" : "number",
|
"type" : "number",
|
||||||
@@ -436,6 +441,10 @@
|
|||||||
"backgroundDimSmallWindows" : {
|
"backgroundDimSmallWindows" : {
|
||||||
"type" : "boolean",
|
"type" : "boolean",
|
||||||
"default" : false
|
"default" : false
|
||||||
|
},
|
||||||
|
"tileZoom" : {
|
||||||
|
"type" : "number",
|
||||||
|
"default" : 32
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user