diff options
Diffstat (limited to 'include/mgui')
-rw-r--r-- | include/mgui/mgui.h | 8 | ||||
-rw-r--r-- | include/mgui/richtext.h | 3 | ||||
-rw-r--r-- | include/mgui/scrollview.h | 6 |
3 files changed, 11 insertions, 6 deletions
diff --git a/include/mgui/mgui.h b/include/mgui/mgui.h index cb018d5..024a062 100644 --- a/include/mgui/mgui.h +++ b/include/mgui/mgui.h @@ -5,14 +5,14 @@ typedef struct mgui_widget mgui_widget; typedef struct mgl_event mgl_event; typedef struct mgl_window mgl_window; -void mgui_init(); -void mgui_deinit(); +void mgui_init(void); +void mgui_deinit(void); void mgui_on_event(mgui_widget *root_widget, mgl_window *window, mgl_event *event); /* This should only be called once every frame */ void mgui_draw(mgui_widget *root_widget, mgl_window *window); /* Clamped to 1.0 second */ -double mgui_get_seconds_since_last_update(); +double mgui_get_seconds_since_last_update(void); /* Clamped to 1.0 second */ -double mgui_get_frame_time_seconds(); +double mgui_get_frame_time_seconds(void); #endif /* MGUI_H */ diff --git a/include/mgui/richtext.h b/include/mgui/richtext.h index f3b07a5..98b46c6 100644 --- a/include/mgui/richtext.h +++ b/include/mgui/richtext.h @@ -21,7 +21,8 @@ typedef struct { mgl_vec2i position; mgl_vec2i render_size; int width; - mgui_richtext_vertex_data vertex_data[2]; + mgui_richtext_vertex_data vertex_data[2]; /* size should match NUM_VERTEX_DATA */ + /* TODO: Turn bools into flags */ bool dirty; bool vertices_dirty; } mgui_richtext; diff --git a/include/mgui/scrollview.h b/include/mgui/scrollview.h index dded990..76ae6d5 100644 --- a/include/mgui/scrollview.h +++ b/include/mgui/scrollview.h @@ -9,9 +9,13 @@ typedef struct { mgl_vec2i position; mgl_vec2i scroll; mgl_vec2f mouse_scroll; + mgl_vec2f scrollbar_pos; + mgl_vec2f scrollbar_size; + mgl_vec2f scrollbar_move_prev_pos; + bool moving_scrollbar; } mgui_scrollview; -mgui_scrollview* mgui_scrollview_create(); +mgui_scrollview* mgui_scrollview_create(void); void mgui_scrollview_destroy(mgui_scrollview *scrollview); mgui_widget* mgui_scrollview_to_widget(mgui_scrollview *list); mgui_scrollview* mgui_widget_to_scrollview(mgui_widget *widget); |