Add a setting for the minimap flare lifetime.
Tested by: marder, Langbart Differential Revision: https://code.wildfiregames.com/D4135 This was SVN commit r25775.
This commit is contained in:
parent
abe7211e15
commit
b3458d408a
@ -419,6 +419,7 @@ timeelapsedcounter = false ; Show the game duration in the top right corn
|
||||
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
|
||||
|
@ -549,6 +549,14 @@
|
||||
"min": 0.1,
|
||||
"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",
|
||||
|
@ -11,6 +11,17 @@ class MiniMap
|
||||
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)
|
||||
|
@ -144,8 +144,8 @@ CMiniMap::CMiniMap(CGUI& pGUI) :
|
||||
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;
|
||||
|
@ -79,9 +79,9 @@ private:
|
||||
|
||||
CGUISimpleSetting<u32> m_FlareTextureCount;
|
||||
CGUISimpleSetting<u32> m_FlareRenderSize;
|
||||
CGUISimpleSetting<u32> m_FlareAnimationSpeed;
|
||||
CGUISimpleSetting<bool> m_FlareInterleave;
|
||||
CGUISimpleSetting<u32> m_FlareLifetimeSeconds;
|
||||
CGUISimpleSetting<float> m_FlareAnimationSpeed;
|
||||
CGUISimpleSetting<float> m_FlareLifetimeSeconds;
|
||||
|
||||
// Whether to draw a black square around and under the minimap.
|
||||
CGUISimpleSetting<bool> m_Mask;
|
||||
|
Loading…
Reference in New Issue
Block a user