refactor: pass relative click position to button click handlers
This a big refactor just to clean-up type definitions used by Button and Menu. The goals is to pass the click position as a cursor object.
This commit is contained in:
parent
35ccf7f1df
commit
ce87dcfa2b
21 changed files with 148 additions and 118 deletions
|
|
@ -52,7 +52,7 @@ pub fn add_menu_entry(palette: *Type, entry: *Entry, matches: ?[]const usize) !v
|
|||
palette.items += 1;
|
||||
}
|
||||
|
||||
fn select(menu: **Type.MenuState, button: *Type.ButtonState) void {
|
||||
fn select(menu: **Type.MenuType, button: *Type.ButtonType, _: Type.Cursor) void {
|
||||
var unused: []const u8 = undefined;
|
||||
var command_id: command.ID = undefined;
|
||||
var iter = button.opts.label;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue