projects
/
carveJwlIkooP6JGAAIwe30JlM.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
update imgui api changes
[carveJwlIkooP6JGAAIwe30JlM.git]
/
skaterift_imgui_dev.c
diff --git
a/skaterift_imgui_dev.c
b/skaterift_imgui_dev.c
index 6247b82d9fe42d0f9420da5386c9b8ae8a91a4e0..53fcccc417e8e11421d06fa66618fccc24055058 100644
(file)
--- a/
skaterift_imgui_dev.c
+++ b/
skaterift_imgui_dev.c
@@
-83,6
+83,13
@@
VG_STATIC void vg_render(void){
vg_lines_drawall();
}
vg_lines_drawall();
}
+static struct ui_enum_opt dropdown_options[] = {
+ { 0, "Zero" },
+ { 3, "Three" },
+ { -1, "Minus One" }
+};
+static i32 dropdown_value = 8;
+
VG_STATIC void vg_gui(void){
if( !skaterift_loaded ) return;
VG_STATIC void vg_gui(void){
if( !skaterift_loaded ) return;
@@
-99,7
+106,10
@@
VG_STATIC void vg_gui(void){
ui_rect panel;
if( vgi_window( window, "Test window", k_vgi_window_standard, panel ) ){
ui_rect panel;
if( vgi_window( window, "Test window", k_vgi_window_standard, panel ) ){
-
+ ui_rect tmp;
+ ui_split( panel, k_ui_axis_h, k_vgi_widget_height*k_vgi_scale,
+ 0, tmp, panel );
+ ui_enum( tmp, "Select enum:", dropdown_options, 3, &dropdown_value );
}
else{
/* window close */
}
else{
/* window close */
@@
-117,7
+127,7
@@
VG_STATIC void vg_gui(void){
ui_rect quit_button;
ui_split( title, k_ui_axis_v, title[2]-title[3], 2, title, quit_button );
ui_rect quit_button;
ui_split( title, k_ui_axis_v, title[2]-title[3], 2, title, quit_button );
- if( ui_button_text( quit_button, "x", 1 ) ){
+ if( ui_button_text( quit_button, "x", 1 )
== 1
){
ui_start_modal( g_an_buffer, UI_MODAL_GOOD );
}
ui_start_modal( g_an_buffer, UI_MODAL_GOOD );
}