Commit Graph

4 Commits

Author SHA1 Message Date
Calic
9ed60d3877 feat: close button (X) in panel title bar
Renders an X glyph in the top-right of every panel's title bar; left-
click on it calls M.close(). Hit-test in _dispatch_event runs before
the widget-forward path so the click is consumed by the panel-frame
even when a widget would otherwise handle it. Pairs with the existing
ESC-close-pattern that lives at module level.
2026-06-14 02:39:04 +02:00
Calic
b7b0ecb9f4 fix: support multiple bind_default_trigger calls
Previously trigger_action_name + trigger_widget_id were module-local
scalars, so the second bind_default_trigger call overwrote the first
(and reused the action name 'panel_toggle' so lib-core.input's binding
was also clobbered). Switched to a triggers array; each binding gets
a unique input action 'panel_toggle_<widget_id>' so multiple widgets
can be toggled by their own keys independently.
2026-06-14 02:22:51 +02:00
Calic
a445b895ee fix: hoist local M = {} above closures to resolve M.get_theme
_dispatch_event captures M at closure-definition time; with M declared
further down the file, the capture resolved to global M (nil), causing
'attempt to index a nil value (global M)' every frame the panel was open
and a mouse event was dispatched. Hoisting the table declaration above
the dispatch helpers fixes the resolution at compile time.
2026-06-14 00:05:24 +02:00
Calic
64aa1c8777 initial: panel v0.1.0 — generic panel framework 2026-06-13 23:16:00 +02:00