britzl / gooey

Defold GUI system
MIT License
150 stars 22 forks source link

Input widget's "deselected_now" property always false #70

Closed whiteboxdev closed 2 years ago

whiteboxdev commented 2 years ago
local function input_callback(input)
    if input.pressed_now then
        gui.set_color(input.node, dcolors.palette.c2)
    elseif input.deselected_now then
        gui.set_color(input.node, dcolors.palette.c3)
    end
end

Input widget's input.deselected_now property is always false. Tested by selecting the widget, entering text, then deselecting the widget. Input bindings match Gooey's expectations correctly.

On line 136 of /gooey/internal/input.lua, local deselected_now = false is never referenced again, so it is never changed to true.