Fixed FPS, which had stopped working (since it no longer recognised the mouse.x and mouse.y component of the string).
This was SVN commit r2579.
This commit is contained in:
parent
f1eeadb2c6
commit
76f3524190
@ -73,9 +73,12 @@ font.misc = verdana16
|
||||
; Colour of the sky (in "r g b" format). (Will be removed once there's proper sky support).
|
||||
;skycolor = "255 0 0"
|
||||
|
||||
; Maximum number of players in a session (default 6).
|
||||
max_players = 8
|
||||
|
||||
; GENERAL PREFERENCES:
|
||||
|
||||
sound.mastergain = 0.1
|
||||
sound.mastergain = 0.5
|
||||
|
||||
; selection.outline.quality = 9; ( higher => very slightly slower, better quality)
|
||||
; view.scroll.speed = 60
|
||||
|
@ -90,19 +90,15 @@
|
||||
hotkey="fps.toggle"
|
||||
font="verdana16"
|
||||
textcolor="100 100 0"
|
||||
size="18 0 200 35"
|
||||
size="18 18 200 35"
|
||||
z="199"
|
||||
>
|
||||
<action on="Load"><![CDATA[
|
||||
setInterval (updateFPS, 1, 200);
|
||||
]]></action>
|
||||
<action on="Press"><![CDATA[
|
||||
guiToggle (this.name);
|
||||
]]></action>
|
||||
<action on="Tick"><![CDATA[
|
||||
if (this.hidden == "false"){
|
||||
g_mouse_x = mouse.x;
|
||||
g_mouse_y = mouse.y;
|
||||
getGUIObjectByName(this.name).caption = "FPS: " + getFPS() + " " + g_mouse_x + " " + g_mouse_y;
|
||||
}
|
||||
]]></action>
|
||||
</object>
|
||||
|
||||
<!--
|
||||
|
@ -123,3 +123,11 @@ function messageBox (mbWidth, mbHeight, mbMessage, mbTitle, mbMode, mbButtonCapt
|
||||
|
||||
}
|
||||
|
||||
// ====================================================================
|
||||
|
||||
function updateFPS()
|
||||
{
|
||||
getGUIObjectByName("fpsCounter").caption = "FPS: " + getFPS();
|
||||
}
|
||||
|
||||
// ====================================================================
|
Loading…
Reference in New Issue
Block a user