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
This commit is contained in:
Eduardo Bart
2012-06-01 16:39:09 -03:00
parent c01b32b032
commit bd2faabe99
43 changed files with 461 additions and 138 deletions

View File

@@ -89,8 +89,8 @@ function UIScrollBar.create()
local scrollbar = UIScrollBar.internalCreate()
scrollbar:setFocusable(false)
scrollbar.value = 0
scrollbar.minimum = 0
scrollbar.maximum = 0
scrollbar.minimum = -999999
scrollbar.maximum = 999999
scrollbar.step = 1
scrollbar.orientation = 'vertical'
scrollbar.pixelsScroll = false
@@ -98,6 +98,8 @@ function UIScrollBar.create()
end
function UIScrollBar:onSetup()
self.setupDone = true
signalcall(self.onValueChange, self, self.value)
addEvent(function()
Mouse.bindAutoPress(self:getChildById('decrementButton'), function() self:decrement() end)
Mouse.bindAutoPress(self:getChildById('incrementButton'), function() self:increment() end)
@@ -163,7 +165,9 @@ function UIScrollBar:setValue(value)
local delta = value - self.value
self.value = value
updateSlider(self)
signalcall(self.onValueChange, self, value, delta)
if self.setupDone then
signalcall(self.onValueChange, self, value, delta)
end
end
function UIScrollBar:setStep(step)