couple of bugfixes

-fixed screen flickering
-fixed menubar (now works as intended)
-reworked sliders (behaviour more like scrollbars)
-visual fix to dropdowns
This commit is contained in:
Robert Jelic
2022-06-06 17:06:56 +02:00
parent 8bbe7a67df
commit b0b104ee82
23 changed files with 356 additions and 315 deletions

View File

@@ -6,6 +6,7 @@ local function Timer(name)
local repeats = 0
local timerObj
local eventSystem = BasaltEvents()
local timerIsActive = false
local object = {
name = name,
@@ -28,15 +29,24 @@ local function Timer(name)
end;
start = function(self)
if(timerIsActive)then
os.cancelTimer(timerObj)
end
repeats = savedRepeats
timerObj = os.startTimer(timer)
timerIsActive = true
return self
end;
isActive = function(self)
return timerIsActive
end;
cancel = function(self)
if (timerObj ~= nil) then
os.cancelTimer(timerObj)
end
timerIsActive = false
return self
end;
@@ -46,7 +56,7 @@ local function Timer(name)
end;
eventHandler = function(self, event, tObj)
if (event == "timer") and (tObj == timerObj) then
if event == "timer" and tObj == timerObj and timerIsActive then
eventSystem:sendEvent("timed_event", self)
if (repeats >= 1) then
repeats = repeats - 1