mirror of
https://github.com/vcmi/vcmi.git
synced 2024-11-28 08:48:48 +02:00
setting + all non popups
This commit is contained in:
parent
1d6469ab36
commit
e650f0100b
@ -170,11 +170,15 @@ void AdventureMapInterface::show(Canvas & to)
|
||||
|
||||
void AdventureMapInterface::dim(Canvas & to)
|
||||
{
|
||||
if(!GH.windows().findWindows<CCastleInterface>().empty() ||
|
||||
!GH.windows().findWindows<CHeroWindow>().empty() ||
|
||||
!GH.windows().findWindows<CKingdomInterface>().empty() ||
|
||||
!GH.windows().findWindows<BattleWindow>().empty())
|
||||
to.drawColor(Rect(0, 0, GH.screenDimensions().x, GH.screenDimensions().y), ColorRGBA(0, 0, 0, 128));
|
||||
for (auto window : GH.windows().findWindows<IShowActivatable>())
|
||||
{
|
||||
std::shared_ptr<AdventureMapInterface> casted = std::dynamic_pointer_cast<AdventureMapInterface>(window);
|
||||
if (!casted && !window->isPopupWindow())
|
||||
{
|
||||
to.drawColor(Rect(0, 0, GH.screenDimensions().x, GH.screenDimensions().y), ColorRGBA(0, 0, 0, std::clamp<int>(settings["adventure"]["backgroundDimLevel"].Integer(), 0, 255)));
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void AdventureMapInterface::tick(uint32_t msPassed)
|
||||
|
@ -226,7 +226,7 @@
|
||||
"type" : "object",
|
||||
"additionalProperties" : false,
|
||||
"default" : {},
|
||||
"required" : [ "heroMoveTime", "enemyMoveTime", "scrollSpeedPixels", "heroReminder", "quickCombat", "objectAnimation", "terrainAnimation", "forceQuickCombat", "borderScroll", "leftButtonDrag", "smoothDragging" ],
|
||||
"required" : [ "heroMoveTime", "enemyMoveTime", "scrollSpeedPixels", "heroReminder", "quickCombat", "objectAnimation", "terrainAnimation", "forceQuickCombat", "borderScroll", "leftButtonDrag", "smoothDragging", "backgroundDimLevel" ],
|
||||
"properties" : {
|
||||
"heroMoveTime" : {
|
||||
"type" : "number",
|
||||
@ -274,7 +274,11 @@
|
||||
"smoothDragging" : {
|
||||
"type" : "boolean",
|
||||
"default" : true
|
||||
}
|
||||
},
|
||||
"backgroundDimLevel" : {
|
||||
"type" : "number",
|
||||
"default" : 128
|
||||
},
|
||||
}
|
||||
},
|
||||
"battle" : {
|
||||
|
Loading…
Reference in New Issue
Block a user