fixed prop typing
This commit is contained in:
12
FlexLove.lua
12
FlexLove.lua
@@ -469,19 +469,19 @@ function Gui.update(dt)
|
|||||||
end
|
end
|
||||||
|
|
||||||
Gui._activeEventElement = nil
|
Gui._activeEventElement = nil
|
||||||
|
|
||||||
-- In immediate mode, save state after update so that cursor blink timer changes persist
|
-- In immediate mode, save state after update so that cursor blink timer changes persist
|
||||||
if Gui._immediateMode and Gui._currentFrameElements then
|
if Gui._immediateMode and Gui._currentFrameElements then
|
||||||
for _, element in ipairs(Gui._currentFrameElements) do
|
for _, element in ipairs(Gui._currentFrameElements) do
|
||||||
if element.id and element.id ~= "" and element.editable and element._focused then
|
if element.id and element.id ~= "" and element.editable and element._focused then
|
||||||
local state = StateManager.getState(element.id, {})
|
local state = StateManager.getState(element.id, {})
|
||||||
|
|
||||||
-- Save cursor blink state (updated during element:update())
|
-- Save cursor blink state (updated during element:update())
|
||||||
state._cursorBlinkTimer = element._cursorBlinkTimer
|
state._cursorBlinkTimer = element._cursorBlinkTimer
|
||||||
state._cursorVisible = element._cursorVisible
|
state._cursorVisible = element._cursorVisible
|
||||||
state._cursorBlinkPaused = element._cursorBlinkPaused
|
state._cursorBlinkPaused = element._cursorBlinkPaused
|
||||||
state._cursorBlinkPauseTimer = element._cursorBlinkPauseTimer
|
state._cursorBlinkPauseTimer = element._cursorBlinkPauseTimer
|
||||||
|
|
||||||
StateManager.setState(element.id, state)
|
StateManager.setState(element.id, state)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -582,12 +582,8 @@ function Gui.destroy()
|
|||||||
Gui._focusedElement = nil
|
Gui._focusedElement = nil
|
||||||
end
|
end
|
||||||
|
|
||||||
-- ====================
|
|
||||||
-- Immediate Mode API
|
|
||||||
-- ====================
|
|
||||||
|
|
||||||
--- Create a new element (supports both immediate and retained mode)
|
--- Create a new element (supports both immediate and retained mode)
|
||||||
---@param props table
|
---@param props ElementProps
|
||||||
---@return Element
|
---@return Element
|
||||||
function Gui.new(props)
|
function Gui.new(props)
|
||||||
props = props or {}
|
props = props or {}
|
||||||
|
|||||||
Reference in New Issue
Block a user