aboutsummaryrefslogtreecommitdiff
path: root/src/ui.c
diff options
context:
space:
mode:
authorKrow Savcik <krow@savcik.xyz>2024-07-13 13:33:57 +0300
committerKrow Savcik <krow@savcik.xyz>2024-07-13 13:33:57 +0300
commit6e8119be3bdd4ac54cdb08667c39f4a1d3047270 (patch)
treeaa267a1ee884f470f470c13f9316edc2eb603ad6 /src/ui.c
parent075354a70a4a93f474fdf083e2cd99826c95ee1a (diff)
feature: layers's name are editable now
Diffstat (limited to 'src/ui.c')
-rw-r--r--src/ui.c26
1 files changed, 26 insertions, 0 deletions
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)
{