void vg_ui(void)
{
+ // Drawing world name
+ gui_text( (ui_px [2]){ vg_window_x / 2, 4 }, "THIS IS A WORLD NAME", 2, k_text_align_center );
+ gui_text( (ui_px [2]){ vg_window_x / 2, 28 }, "And here is its cool description yo", 1, k_text_align_center );
+
if( world.st.state == k_game_state_settings )
{
gui_group_id( 35 );
gui_new_node();
{
- gui_text( "SETTINGS", 2 );
+ gui_text( ui_global_ctx.cursor, "SETTINGS", 2, 0 );
}
gui_end();
// Colour scheme selection
ui_global_ctx.cursor[1] += 30;
- gui_text( "Colour Scheme", 1 );
+ gui_text( ui_global_ctx.cursor, "Colour Scheme", 1, 0 );
ui_global_ctx.cursor[1] += 25;
gui_new_node();
if( colour_set_id > 0 )
colour_set_id --;
}
- gui_text( "<", 1 );
+ gui_text( ui_global_ctx.cursor, "<", 1, 0 );
gui_end_right();
ui_global_ctx.cursor[2] = 150;
gui_new_node();
{
gui_fill_rect( ui_global_ctx.cursor, 0x33ffffff );
- ui_global_ctx.cursor[0] += 45;
- ui_global_ctx.cursor[1] += 6;
- gui_text( (const char *[]){ "Normal", "Extra1", "Extra2" }[ colour_set_id ], 1 );
+ gui_text(
+ (ui_px [2]){ ui_global_ctx.cursor[0] + 75, ui_global_ctx.cursor[1] + 6 },
+ (const char *[]){ "Normal", "Extra1", "Extra2" }[ colour_set_id ],
+ 1, k_text_align_center
+ );
}
gui_end_right();
if( colour_set_id < vg_list_size( colour_sets )-1 )
colour_set_id ++;
}
- gui_text( ">", 1 );
+ gui_text( ui_global_ctx.cursor, ">", 1, 0 );
gui_end_down();
}
gui_end_down();
// TODO: remove code dupe
ui_global_ctx.cursor[1] += 16;
- gui_text( "Tile Theme", 1 );
+ gui_text( ui_global_ctx.cursor, "Tile Theme", 1, 0 );
ui_global_ctx.cursor[1] += 20;
gui_new_node();
if( world_theme_id > 0 )
world_theme_id --;
}
- gui_text( "<", 1 );
+ gui_text( ui_global_ctx.cursor, "<", 1, 0 );
gui_end_right();
ui_global_ctx.cursor[2] = 150;
gui_new_node();
{
gui_fill_rect( ui_global_ctx.cursor, 0x33ffffff );
- ui_global_ctx.cursor[0] += 45;
- ui_global_ctx.cursor[1] += 6;
- gui_text( world_themes[ world_theme_id ].name, 1 );
+ gui_text(
+ (ui_px [2]){ ui_global_ctx.cursor[0] + 75, ui_global_ctx.cursor[1] + 6 },
+ world_themes[ world_theme_id ].name, 1, k_text_align_center
+ );
}
gui_end_right();
if( world_theme_id < vg_list_size( world_themes )-1 )
world_theme_id ++;
}
- gui_text( ">", 1 );
+ gui_text( ui_global_ctx.cursor, ">", 1, 0 );
gui_end_down();
}
gui_end_down();