allow buttons to nest as well

[?]
Aug 23, 2022, 6:46 PM
GDJSZLYT73DLC2YKPWUSXCIC6HW3YMHFGQXU66FLHVMRNMI5UCLQC

Dependencies

  • [2] K6DTOGOQ flip return value of button handlers
  • [3] XX7G2FFJ intermingle freehand line drawings with text
  • [4] PW2VGQWN indent
  • [5] BJ46QVIP improve explanation for buttons
  • [6] 6D5MOJS4 allow buttons to interrupt events
  • [*] PP2IIHL6 stop putting button state in a global

Change contents

  • replacement in button.lua at line 3
    [3.117][2.98:193]()
    -- If any applicable button handler returns true, it'll propagate the click to other handlers.
    [3.117]
    [3.2080]
    --
    -- Buttons can nest in principle, though I haven't actually used that yet.
    --
    -- Don't rely on the order in which handlers are run. Within any widget, all
    -- applicable button handlers will run. If _any_ of them returns true, the
    -- event will continue to propagate elsewhere in the widget.
  • edit in button.lua at line 26
    [8.465]
    [8.465]
    local result = false
  • replacement in button.lua at line 30
    [3.66][2.274:307]()
    return not ev.onpress1()
    [3.66]
    [3.88]
    if not ev.onpress1() then
    result = true
    end
  • edit in button.lua at line 36
    [3.2671]
    [3.2671]
    return result