projects
/
carveJwlIkooP6JGAAIwe30JlM.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add basic controls to ent_routes
[carveJwlIkooP6JGAAIwe30JlM.git]
/
menu.h
diff --git
a/menu.h
b/menu.h
index 243bebfd70fb742ce7084aca2be32733a4892880..86f573620f5fa10ecabe789d0a8d09b5590bc3c3 100644
(file)
--- a/
menu.h
+++ b/
menu.h
@@
-430,7
+430,8
@@
static void menu_update(void){
ent_menuitem *item = mdl_arritm( &menu.items, i );
if( item->type == k_ent_menuitem_type_page ) continue;
ent_menuitem *item = mdl_arritm( &menu.items, i );
if( item->type == k_ent_menuitem_type_page ) continue;
- if( item->type == k_ent_menuitem_type_visual ) continue;
+ if( (item->type == k_ent_menuitem_type_visual) ||
+ (item->type == k_ent_menuitem_type_visual_nocol) ) continue;
if( item->type == k_ent_menuitem_type_binding ) continue;
if( !(item->groups & (0x1<<menu.page)) ) continue;
if( item->type == k_ent_menuitem_type_binding ) continue;
if( !(item->groups & (0x1<<menu.page)) ) continue;
@@
-489,6
+490,7
@@
static void menu_update(void){
if( (item->type != k_ent_menuitem_type_page) &&
(item->type != k_ent_menuitem_type_visual) &&
if( (item->type != k_ent_menuitem_type_page) &&
(item->type != k_ent_menuitem_type_visual) &&
+ (item->type != k_ent_menuitem_type_visual_nocol) &&
(item->groups & (0x1<<menu.page)) ){
menu.loc = item;
}
(item->groups & (0x1<<menu.page)) ){
menu.loc = item;
}
@@
-560,15
+562,15
@@
static void menu_update(void){
menu_setitem_type( menu.ctr_steam, k_ent_menuitem_type_disabled );
if( vg_input.display_input_method == k_input_method_kbm )
menu_setitem_type( menu.ctr_steam, k_ent_menuitem_type_disabled );
if( vg_input.display_input_method == k_input_method_kbm )
- menu_setitem_type( menu.ctr_kbm, k_ent_menuitem_type_visual );
+ menu_setitem_type( menu.ctr_kbm, k_ent_menuitem_type_visual
_nocol
);
else{
if( vg_input.display_input_type == SDL_CONTROLLER_TYPE_PS3 ||
vg_input.display_input_type == SDL_CONTROLLER_TYPE_PS4 ||
vg_input.display_input_type == SDL_CONTROLLER_TYPE_PS5 ){
else{
if( vg_input.display_input_type == SDL_CONTROLLER_TYPE_PS3 ||
vg_input.display_input_type == SDL_CONTROLLER_TYPE_PS4 ||
vg_input.display_input_type == SDL_CONTROLLER_TYPE_PS5 ){
- menu_setitem_type( menu.ctr_ps, k_ent_menuitem_type_visual );
+ menu_setitem_type( menu.ctr_ps, k_ent_menuitem_type_visual
_nocol
);
}
else {
}
else {
- menu_setitem_type( menu.ctr_xbox, k_ent_menuitem_type_visual );
+ menu_setitem_type( menu.ctr_xbox, k_ent_menuitem_type_visual
_nocol
);
}
/* FIXME: Steam/Deck controller detection? */
}
}
/* FIXME: Steam/Deck controller detection? */
}
@@
-707,7
+709,7
@@
static void menu_render(void){
}
}
}
}
- if( item->type == k_ent_menuitem_type_visual ){
+ if( item->type == k_ent_menuitem_type_visual
_nocol
){
shader_model_menu_uColour( (v4f){1.0f,1.0f,1.0f,1.0f} );
}
else{
shader_model_menu_uColour( (v4f){1.0f,1.0f,1.0f,1.0f} );
}
else{
@@
-761,7
+763,7
@@
static void menu_render(void){
m4x3f local;
m4x3_identity( local );
m4x3f local;
m4x3_identity( local );
- font3d_bind( &gui.font, &menu.view );
+ font3d_bind( &gui.font,
k_font_shader_default, 0, NULL,
&menu.view );
for( u32 i=0; i<text_count; i++ ){
ent_menuitem *item = text_list[ i ];
m4x3f transform;
for( u32 i=0; i<text_count; i++ ){
ent_menuitem *item = text_list[ i ];
m4x3f transform;
@@
-769,13
+771,12
@@
static void menu_render(void){
u32 variant = item->binding.font_variant;
menu_binding_string( buf, item->binding.pstr_bind );
u32 variant = item->binding.font_variant;
menu_binding_string( buf, item->binding.pstr_bind );
- f32 offset = font3d_string_width(
&gui.font,
variant, buf );
+ f32 offset = font3d_string_width( variant, buf );
local[3][0] = -0.5f * offset;
m4x3_mul( transform, local, transform );
local[3][0] = -0.5f * offset;
m4x3_mul( transform, local, transform );
- font3d_simple_draw( &gui.font, variant, k_font_shader_default, buf,
- &menu.view, transform );
+ font3d_simple_draw( variant, buf, &menu.view, transform );
}
}
}
}