Eduardo Bart bd2faabe99 graphics optimization feature inspirated by diablo3 engine
* the rendering now consits of two panes
- the background pane (for animated stuff like the map)
- the foreground pane (for steady stuff, like UI)
each pane has it own max FPS and works idependently
this may increase graphics performance on many platforms
2012-06-01 16:39:09 -03:00

88 lines
1.7 KiB
Plaintext

TopButton < UIButton
size: 26 26
image-source: images/top_button.png
image-clip: 0 0 26 26
image-border: 3
image-color: #ffffffff
icon-color: #ffffffff
$hover !disabled:
image-color: #ffffff99
image-clip: 26 0 26 26
$pressed:
image-clip: 52 0 26 26
$disabled:
image-color: #ffffff44
icon-color: #ffffff44
TopToggleButton < UIButton
size: 26 26
image-source: images/top_game_button.png
image-clip: 26 0 26 26
image-color: #ffffff22
image-border: 3
icon-color: #ffffffff
$on:
image-clip: 0 0 26 26
image-color: #ffffffff
icon-color: #ffffffff
TopMenuButtonsPanel < Panel
layout:
type: horizontalBox
spacing: 4
fit-children: true
padding: 6 4
TopPanel < Panel
height: 36
image-source: images/top_panel.png
image-repeated: true
focusable: false
TopPanel
id: topMenu
anchors.top: parent.top
anchors.left: parent.left
anchors.right: parent.right
TopMenuButtonsPanel
id: leftButtonsPanel
anchors.top: parent.top
anchors.bottom: parent.bottom
anchors.left: parent.left
TopMenuButtonsPanel
id: gameButtonsPanel
anchors.top: parent.top
anchors.bottom: parent.bottom
anchors.left: prev.right
visible: false
TopMenuButtonsPanel
id: rightButtonsPanel
anchors.top: parent.top
anchors.bottom: parent.bottom
anchors.right: parent.right
UILabel
size: 68 16
text-align: right
color: white
id: frameCounter
anchors.top: parent.top
anchors.right: prev.left
margin-top: 8
margin-right: 5
@onSetup: |
local updateFunc
updateFunc = function()
self:setText('FPS: ' .. g_app.getBackgroundPaneFps())
scheduleEvent(updateFunc, 250)
end
updateFunc()