gui_new_node();
{
- gui_text( "Settings", 3 );
+ gui_text( "SETTINGS", 2 );
}
gui_end();
// Colour scheme selection
ui_global_ctx.cursor[1] += 30;
- gui_text( "Colour Scheme", 2 );
+ gui_text( "Colour Scheme", 1 );
ui_global_ctx.cursor[1] += 25;
gui_new_node();
if( colour_set_id > 0 )
colour_set_id --;
}
- gui_text( "<", 2 );
+ gui_text( "<", 1 );
gui_end_right();
ui_global_ctx.cursor[2] = 150;
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 ], 2 );
+ gui_text( (const char *[]){ "Normal", "Extra1", "Extra2" }[ colour_set_id ], 1 );
}
gui_end_right();
if( colour_set_id < vg_list_size( colour_sets )-1 )
colour_set_id ++;
}
- gui_text( ">", 2 );
+ gui_text( ">", 1 );
gui_end_down();
}
gui_end_down();
// TODO: remove code dupe
ui_global_ctx.cursor[1] += 16;
- gui_text( "Tile Theme", 2 );
+ gui_text( "Tile Theme", 1 );
ui_global_ctx.cursor[1] += 20;
gui_new_node();
if( world_theme_id > 0 )
world_theme_id --;
}
- gui_text( "<", 2 );
+ gui_text( "<", 1 );
gui_end_right();
ui_global_ctx.cursor[2] = 150;
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, 2 );
+ gui_text( world_themes[ world_theme_id ].name, 1 );
}
gui_end_right();
if( world_theme_id < vg_list_size( world_themes )-1 )
world_theme_id ++;
}
- gui_text( ">", 2 );
+ gui_text( ">", 1 );
gui_end_down();
}
gui_end_down();
vg_info( " miniaudio MIT0 miniaud.io\n" );
vg_info( " QOI MIT phoboslab.org\n" );
vg_info( " STB library MIT nothings.org\n" );
- vg_info( " Weiholmir JustFredrik\n" );
vg_info( " Ubuntu Regular ubuntu.com\n" );
return 0;
}
+++ /dev/null
-/* Font buffer generated from source file: 'restricted/Weiholmir_GameMaker_sheet.png' */
-0x61b001,0x198e1818,0x600061b1,0x47f99818,0x30302060,0x93ed031b,0x8303020,0x60014fe7,
-0xf803030,0x6003e1,0x661b0030,0x30000001,0x4fccdb00,0x30300060,0x10ccf,0x186000,
-0x1,0x8e0c78f0,0x54600000,0x19b1c6c,0xd8386000,0x31b0c,0xc1839f8,0x1c0071b,
-0xc183054,0x60c00006,0x1b0c3018,0x60c003,0xc1b0c60,0xd8000040,0x30c0e1e,0x7cf06cf8,
-0xe3e3870c,0x1800006c,0xc18066cd,0x8c180c00,0x6cc180c6,0xcd80003c,0xf07c71e0,0xc3878000,
-0x70000c19,0xb186c18c,0x183cf00c,0xd9b186c1,0x8c180c00,0xcf0e183,0x87000800,0xf1e3,
-0x87871e3c,0x787860da,0x1346cd9b,0x3060d878,0x1ad366cd,0x9b3060c0,0x1c7ad3e7,0x8c1b3870,
-0xc07862e3,0x66cd9b30,0x60d86002,0xb66cd9b,0x3060c800,0x61f36787,0x1e3c6078,0x6c61f366,
-0x18d99c78,0x706c6033,0x661dddb6,0x6cd86c60,0x33c61ddd,0xb66cd87c,0x61b3861f,0xdfb678d8,
-0x6c61b3c6,0x1adbb660,0xf86c61b3,0x6618dbb6,0x60706c60,0xe36798d9,0x9c601878,0x71fb66d8,
-0xdb337cf0,0x6cd86366,0xd8db330c,0xc06cc063,0x66dace1e,0x1cc07870,0x6366dfc4,0xc38c078,
-0x186366dd,0xce0c70c0,0x6cd86363,0x9ddb0c60,0xc06c7061,0xc118db0c,0x7cf060f0,0x40060018,
-0xc0060,0x30a00300,0x18000c00,0x30300000,0x79e1c3c,0x70383000,0xd9b36,0x6cd81830,
-0xd9b,0x306cf80c,0x3000000f,0x9b366cc0,0xcf003e0,0x69e1c3c,0x70180180,0x18c0c00,
-0x3471,0x81818c0c,0x30,0xd9e1800d,0x8c767870,0x30d9b001,0x8d8c7f6c,0xd87871b1,
-0x818f0c6b,0x6cd8301d,0xb1858d8c,0x6b6cd830,0x79b1838d,0x8c6b6c70,0x3,0,
-0,0x3000000,0x7c71,0xb3c78d9b,0x636cd86c,0xd9f7030d,0x9b6b6cd8,0x78d9c3c3,
-0xd8e6b38,0x78607180,0xe30d8e3e,0x6c186019,0x83c18704,0x366c7000,0x30c18000,0xfc,
-0x60c0c0,0x6000000,0xfc7c60c0,0xc6460000,0xfc1cc0,0xc0698600,0xfc38,0x60c0c006,
-0xfc,0x7060c0c0,0x6000000,0xfc7c30c1,0x80000000,0xfc0000,0,0,
-0,0,
\ No newline at end of file
int enabled;
int scale;
}
-vg_console = { .scale = 2 };
+vg_console = { .scale = 1 };
// Declerations
// ------------
0,0,0,0,0,0,0,0,
0,0,0,0,0,0xc0,0x300,0,
0,0,0x3000000,0,0,0x1c0,0x1800380,0,
-0,0,0x3000000,0,0,0x180,0x1800180,0,
-0x3c003c0,0x1c001c0,0x3000660,0xc300c30,0xc300660,0x7e00180,0x1800180,0,
-0x7e007e0,0x3c003c0,0x3000660,0xc300c30,0xe700660,0x7e00380,0x18001c0,0x7300000,
-0x6600660,0x3000300,0x3c00660,0x6600c30,0x7e00660,0xe00700,0x18000e0,0xfb00000,
-0x6600660,0x3000380,0x3c00660,0x6600c30,0x3c00660,0x1c00700,0x18000e0,0xdf00000,
-0x6600660,0x30001c0,0x3000660,0x6600db0,0x3c00660,0x3800380,0x18001c0,0xce00000,
-0x6600660,0x30000c0,0x3000660,0x3c00db0,0x7e007e0,0x7000180,0x1800180,0,
-0x7e007e0,0x30003c0,0x3c007e0,0x3c00ff0,0xe7003e0,0x7e00180,0x1800180,0,
-0x7c003e0,0x3000380,0x1c003c0,0x1800660,0xc300060,0x7e001c0,0x1800380,0,
+0,0,0x3000000,0,0,0x180,0x1800180,0x1ce0,
+0x3c003c0,0x1c001c0,0x3000660,0xc300c30,0xc300660,0x7e00180,0x1800180,0x3ff0,
+0x7e007e0,0x3c003c0,0x3000660,0xc300c30,0xe700660,0x7e00380,0x18001c0,0x7303ff0,
+0x6600660,0x3000300,0x3c00660,0x6600c30,0x7e00660,0xe00700,0x18000e0,0xfb03ff0,
+0x6600660,0x3000380,0x3c00660,0x6600c30,0x3c00660,0x1c00700,0x18000e0,0xdf03ff0,
+0x6600660,0x30001c0,0x3000660,0x6600db0,0x3c00660,0x3800380,0x18001c0,0xce01fe0,
+0x6600660,0x30000c0,0x3000660,0x3c00db0,0x7e007e0,0x7000180,0x1800180,0x1fe0,
+0x7e007e0,0x30003c0,0x3c007e0,0x3c00ff0,0xe7003e0,0x7e00180,0x1800180,0xfc0,
+0x7c003e0,0x3000380,0x1c003c0,0x1800660,0xc300060,0x7e001c0,0x1800380,0x300,
0x6000060,0,0,0,0x7e0,0xc0,0x300,0,
0x6000060,0,0,0,0x3c0,0,0,0,
0,0,0,0,0,0,0,0,
// ===========================================================================================================
// Opengl
-int ui_glyph_override = 0;
-ui_px ui_glyph_spacing_x = 9;
-GLuint ui_glyph_texture = 0;
+static ui_px ui_glyph_spacing_x = 9;
+static GLuint ui_glyph_texture = 0;
ui_colourset ui_default_colours = {
.main = 0xff00ff00,
free( ctx->indices );
}
-static void ui_override_font( GLuint new_tex, ui_px space_x )
-{
- if( ui_glyph_texture )
- glDeleteTextures( 1, &ui_glyph_texture );
-
- ui_glyph_texture = new_tex;
- ui_glyph_override = 1;
- ui_glyph_spacing_x = space_x;
-}
-
static void ui_default_init(void)
{
// Load default font
- if( !ui_glyph_override )
- {
- u32 compressed[] = {
- #include "vg/vg_pxfont.h"
- };
-
- u32 pixels = 0, total = 256*256, data = 0;
- u8 *image = malloc( total );
-
- while( pixels < total )
- {
- for( int b = 31; b >= 0; b-- )
- {
- image[ pixels ++ ] = (compressed[data] & (0x1 << b))? 0xff: 0x00;
-
- if( pixels >= total )
- {
- total = 0;
- break;
- }
- }
- data++;
- }
-
- glGenTextures( 1, &ui_glyph_texture );
- glBindTexture( GL_TEXTURE_2D, ui_glyph_texture );
-
- glTexImage2D( GL_TEXTURE_2D, 0, GL_R8, 256, 256, 0, GL_RED, GL_UNSIGNED_BYTE, image );
-
- vg_tex2d_clamp();
- vg_tex2d_nearest();
-
- free( image );
- }
+ u32 compressed[] = {
+ #include "vg/vg_pxfont.h"
+ };
+
+ u32 pixels = 0, total = 256*256, data = 0;
+ u8 *image = malloc( total );
+
+ while( pixels < total )
+ {
+ for( int b = 31; b >= 0; b-- )
+ {
+ image[ pixels ++ ] = (compressed[data] & (0x1 << b))? 0xff: 0x00;
+
+ if( pixels >= total )
+ {
+ total = 0;
+ break;
+ }
+ }
+ data++;
+ }
+
+ glGenTextures( 1, &ui_glyph_texture );
+ glBindTexture( GL_TEXTURE_2D, ui_glyph_texture );
+
+ glTexImage2D( GL_TEXTURE_2D, 0, GL_R8, 256, 256, 0, GL_RED, GL_UNSIGNED_BYTE, image );
+
+ vg_tex2d_clamp();
+ vg_tex2d_nearest();
+
+ free( image );
// Setup OpenGL memory
SHADER_INIT( shader_ui );
static void ui_default_free(void)
{
- if( !ui_glyph_override )
- glDeleteTextures( 1, &ui_glyph_texture );
+ glDeleteTextures( 1, &ui_glyph_texture );
ui_context_free( &ui_global_ctx );
}