From 6e8119be3bdd4ac54cdb08667c39f4a1d3047270 Mon Sep 17 00:00:00 2001 From: Krow Savcik Date: Sat, 13 Jul 2024 13:33:57 +0300 Subject: feature: layers's name are editable now --- src/ui.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'src/ui.c') diff --git a/src/ui.c b/src/ui.c index 9a49fc4..adc9fc8 100644 --- a/src/ui.c +++ b/src/ui.c @@ -329,6 +329,32 @@ ui_mousel_up(int x, int y) } } +int +ui_mouser_down(int x, int y) +{ + ui_focus_panel_change(x, y); + + if (main_ui->focus_panel == NULL) + return 0; + + switch (main_ui->focus_panel->type) { + case UI_PANELTYPE_TIMELINE: + if (cur_canvas == NULL) + return 0; + x = x - fpan->geom.x - 8; + y = y - fpan->geom.y - 8; + y /= 22; + if (y < 0 || y >= cur_canvas->layer_arr_cnt) break; + if (x > 22 && x <= 162) { + cur_canvas->a = cur_canvas->layer_arr_cnt-y-1; + return 1; + } + break; + } + + return 0; +} + void ui_mouse_move(int x, int y) { -- cgit v1.2.3