diff options
Diffstat (limited to 'src/ui.c')
-rw-r--r-- | src/ui.c | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -6,6 +6,7 @@ #include "ui.h" #include "cdraw.h" #include "types.h" +#include "action.h" #include "canvas.h" #include "tools.h" #include "debug.h" @@ -37,6 +38,8 @@ static const SDL_Rect ui_buttons_rect[] = { {56, 54, 28, 28}, /* Zoom out */ {84, 54, 28, 28}, /* Clown */ {56, 82, 28, 28}, /* Color Picker */ + {84, 82, 28, 28}, /* Undo */ + {84, 110, 28, 28}, /* Redo */ }; struct UIPanel { @@ -272,6 +275,12 @@ ui_mousel_down(int x, int y) break; case TOOL_TYPE_EMPTY: break; + case TOOL_TYPE_UNDO: + user_canvas_undo(NULL); + break; + case TOOL_TYPE_REDO: + user_canvas_redo(NULL); + break; default: tool_change(col); break; @@ -369,7 +378,7 @@ ui_focus_panel_change(int x, int y) if (main_ui->focus_panel != NULL) { switch (main_ui->focus_panel->type) { case UI_PANELTYPE_CANVAS: - is_drawing = 0; + canvas_mousel_up(cur_canvas); main_ui->focus_panel = u; ui_redraw_panel(UI_PANELTYPE_CANVAS); break; |