mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-07-09 10:17:19 +00:00
Fixed the button flickering bug. It turns out that guiHide/guiUnHide were settings controls to hidden/unhidden each tick, which caused the C++ code to reset mouse interaction properties even if the thing went from unhidden to unhidden. I fixed it by making guiHide and guiUnHide check whether the control is already hidden/unhidden before changing it, though maybe we want different behaviour from the C++ code.
This was SVN commit r3262.
This commit is contained in:
@@ -53,7 +53,7 @@
|
||||
setWaterHeight(getWaterHeight() - 0.25);
|
||||
]]></action>
|
||||
</object>
|
||||
|
||||
|
||||
<!-- GROUP: MINIMAP -->
|
||||
<object name="snMiniMap"
|
||||
hotkey="session.minimap.toggle"
|
||||
@@ -250,7 +250,7 @@
|
||||
]]></action>
|
||||
|
||||
<object name="snStatusPanePortrait"
|
||||
style="portrait"
|
||||
style="portrait"
|
||||
type="button"
|
||||
hotkey="selection.snap"
|
||||
>
|
||||
|
||||
@@ -315,7 +315,7 @@ function snRefresh()
|
||||
{
|
||||
// Reveal Status Orb
|
||||
guiUnHide ("snStatusPane");
|
||||
|
||||
|
||||
// (later, we need to base this on the selected unit's stats changing)
|
||||
refreshStatusPane();
|
||||
|
||||
|
||||
@@ -8,10 +8,11 @@
|
||||
// Hide GUI object.
|
||||
function guiHide (objectName)
|
||||
{
|
||||
var guiObject = getGUIObjectByName (objectName);
|
||||
if (guiObject == "" || guiObject == null || guiObject == undefined || guiObject == "undefined")
|
||||
var guiObject = getGUIObjectByName (objectName);
|
||||
if( guiObject == "" || guiObject == null || guiObject == undefined || guiObject == "undefined" )
|
||||
console.write ("GUI Object not found: " + objectName);
|
||||
guiObject.hidden = true;
|
||||
if( !guiObject.hidden )
|
||||
guiObject.hidden = true;
|
||||
}
|
||||
|
||||
// ====================================================================
|
||||
@@ -19,11 +20,11 @@ function guiHide (objectName)
|
||||
// Reveal GUI object.
|
||||
function guiUnHide (objectName)
|
||||
{
|
||||
var guiObject = getGUIObjectByName (objectName);
|
||||
var guiObject = getGUIObjectByName (objectName);
|
||||
if (guiObject == "" || guiObject == null || guiObject == undefined || guiObject == "undefined")
|
||||
console.write ("GUI Object not found: " + objectName);
|
||||
guiObject.hidden = false;
|
||||
|
||||
if( guiObject.hidden )
|
||||
guiObject.hidden = false;
|
||||
}
|
||||
|
||||
// ====================================================================
|
||||
|
||||
Reference in New Issue
Block a user