Windower / Fenestra

The open-source development version of Windower.
Other
19 stars 14 forks source link

Edit box erroneously keeps edit state across reloads. #17

Open Imisnew2 opened 2 years ago

Imisnew2 commented 2 years ago

If you perform the following actions /load thisaddon > /reload thisaddon > /reload thisaddon, then the edit state from the before the addon was reloaded will persist once you start typing in the box again.

local ui = require('core.ui')

local edit_state = ui.edit_state()
edit_state.text = 'Edit me!'

ui.display(function()
    ui.window(window_state, function(layout)
        layout:size(200,100):edit(edit_state)
        layout:size(200,100):label(edit_state.text)
    end)
end)