Index: ps/trunk/binaries/data/config/default.cfg =================================================================== --- ps/trunk/binaries/data/config/default.cfg +++ ps/trunk/binaries/data/config/default.cfg @@ -419,6 +419,7 @@ ceasefirecounter = false ; Show the remaining ceasefire time in the top right corner batchtrainingsize = 5 ; Number of units to be trained per batch by default (when pressing the hotkey) scrollbatchratio = 1 ; Number of times you have to scroll to increase/decrease the batchsize by 1 +flarelifetime = 6 ; How long the flare markers on the minimap are displayed in seconds woundedunithotkeythreshold = 33 ; The wounded unit hotkey considers the selected units as wounded if their health percentage falls below this number attackrange = true ; Display attack range overlays of selected defensive structures aurasrange = true ; Display aura range overlays of selected units and structures Index: ps/trunk/binaries/data/mods/public/gui/options/options.json =================================================================== --- ps/trunk/binaries/data/mods/public/gui/options/options.json +++ ps/trunk/binaries/data/mods/public/gui/options/options.json @@ -550,6 +550,14 @@ "max": 30 }, { + "type": "slider", + "label": "Flare display duration", + "tooltip": "How long the flare markers on the minimap are displayed in seconds.", + "config": "gui.session.flarelifetime", + "min": 0, + "max": 60 + }, + { "type": "boolean", "label": "Chat notification attack", "tooltip": "Show a chat notification if you are attacked by another player.", Index: ps/trunk/binaries/data/mods/public/gui/session/minimap/MiniMap.js =================================================================== --- ps/trunk/binaries/data/mods/public/gui/session/minimap/MiniMap.js +++ ps/trunk/binaries/data/mods/public/gui/session/minimap/MiniMap.js @@ -11,6 +11,17 @@ this.miniMap.onMouseEnter = this.onMouseEnter.bind(this); this.miniMap.onMouseLeave = this.onMouseLeave.bind(this); this.mouseIsOverMiniMap = false; + this.updateFlareLifetime(); + registerConfigChangeHandler(changes => { + if (changes.has("gui.session.flarelifetime")) + this.updateFlareLifetime(); + }); + + } + + updateFlareLifetime() + { + this.miniMap.flare_lifetime_seconds = Math.max(0, +Engine.ConfigDB_GetValue("user", "gui.session.flarelifetime")); } onWorldClick(target, button) Index: ps/trunk/source/gui/ObjectTypes/CMiniMap.h =================================================================== --- ps/trunk/source/gui/ObjectTypes/CMiniMap.h +++ ps/trunk/source/gui/ObjectTypes/CMiniMap.h @@ -79,9 +79,9 @@ CGUISimpleSetting m_FlareTextureCount; CGUISimpleSetting m_FlareRenderSize; - CGUISimpleSetting m_FlareAnimationSpeed; CGUISimpleSetting m_FlareInterleave; - CGUISimpleSetting m_FlareLifetimeSeconds; + CGUISimpleSetting m_FlareAnimationSpeed; + CGUISimpleSetting m_FlareLifetimeSeconds; // Whether to draw a black square around and under the minimap. CGUISimpleSetting m_Mask; Index: ps/trunk/source/gui/ObjectTypes/CMiniMap.cpp =================================================================== --- ps/trunk/source/gui/ObjectTypes/CMiniMap.cpp +++ ps/trunk/source/gui/ObjectTypes/CMiniMap.cpp @@ -144,8 +144,8 @@ m_EntitiesDrawn(0), m_IndexArray(GL_STATIC_DRAW), m_VertexArray(GL_DYNAMIC_DRAW), m_Mask(this, "mask", false), m_NextBlinkTime(0.0), m_PingDuration(25.0), m_BlinkState(false), m_FlareTextureCount(this, "flare_texture_count", 0), m_FlareRenderSize(this, "flare_render_size", 0), - m_FlareAnimationSpeed(this, "flare_animation_speed", 0), m_FlareInterleave(this, "flare_interleave", false), - m_FlareLifetimeSeconds(this, "flare_lifetime_seconds", 0) + m_FlareInterleave(this, "flare_interleave", false), m_FlareAnimationSpeed(this, "flare_animation_speed", 0.0f), + m_FlareLifetimeSeconds(this, "flare_lifetime_seconds", 0.0f) { m_Clicking = false; m_MouseHovering = false;