diff options
author | Leo Tenenbaum <pommicket@gmail.com> | 2021-01-27 16:51:27 -0500 |
---|---|---|
committer | Leo Tenenbaum <pommicket@gmail.com> | 2021-01-27 16:51:27 -0500 |
commit | f02fa3b6e1f6c3b1c1325b999f101b5ca6e02558 (patch) | |
tree | 19372b99cef17f6312454688d5e115c10aff3ac9 /ui.c | |
parent | 710ea4ef8ca812aa4f0334f93c25fd9995a8e364 (diff) |
started warn on overwrite
Diffstat (limited to 'ui.c')
-rw-r--r-- | ui.c | 29 |
1 files changed, 28 insertions, 1 deletions
@@ -306,7 +306,7 @@ static char *file_selector_update(Ted *ted, FileSelector *fs) { free(search_term); return str_dup(path); } else { - if (fs->selected && fs->selected < fs->n_entries) { + if (fs->selected < fs->n_entries) { FileEntry *entry = &fs->entries[fs->selected]; switch (entry->type) { case FS_FILE: @@ -461,3 +461,30 @@ static void file_selector_render(Ted *ted, FileSelector *fs) { } } +typedef enum { + POPUP_NONE, + POPUP_YES, + POPUP_NO, + POPUP_CANCEL +} PopupOption; + +static PopupOption popup_update(Ted *ted) { + (void)ted; + return POPUP_NONE; +} + +static void popup_render(Ted *ted, char const *title, char const *body) { + float window_width = ted->window_width; + float window_height = ted->window_height; + Rect r = rect_centered(V2(window_width * 0.5f, window_height * 0.5f), V2(300, 200)); + Settings const *settings = &ted->settings; + u32 const *colors = settings->colors; + + glBegin(GL_QUADS); + gl_color_rgba(colors[COLOR_MENU_BG]); + rect_render(r); + glEnd(); + + (void)title; + (void)body; +} |