j
[carveJwlIkooP6JGAAIwe30JlM.git] / skaterift_imgui_dev.c
index 6247b82d9fe42d0f9420da5386c9b8ae8a91a4e0..2a3d282366b76c0304a23447cc16c15ee1dce1b4 100644 (file)
@@ -83,6 +83,14 @@ VG_STATIC void vg_render(void){
    vg_lines_drawall();
 }
 
+static struct ui_enum_opt dropdown_options[] = {
+   { 0, "Zero" },
+   { 3, "Three" },
+   { -1, "Minus One" }
+};
+static i32 dropdown_value = 8;
+static i32 checkbox_value = 0;
+
 VG_STATIC void vg_gui(void){
    if( !skaterift_loaded ) return;
 
@@ -98,12 +106,9 @@ VG_STATIC void vg_gui(void){
    vg_ui.wants_mouse = 1;
 
    ui_rect panel;
-   if( vgi_window( window, "Test window", k_vgi_window_standard, panel ) ){
-      
-   }
-   else{
-      /* window close */
-   }
+   ui_panel( window, panel );
+   ui_enum( panel, "Select enum:", dropdown_options, 3, &dropdown_value );
+   ui_checkbox( panel, "Toggly:", &checkbox_value );
 
 #if 0
    ui_fill( window, ui_colour( k_ui_bg+1 ) );
@@ -117,7 +122,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 );
-   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 );
    }