diff options
Diffstat (limited to 'src/ui.c')
-rw-r--r-- | src/ui.c | 26 |
1 files changed, 26 insertions, 0 deletions
@@ -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) { |