From: hgn Date: Fri, 6 Oct 2023 08:31:21 +0000 (+0100) Subject: fix menu rendering regression X-Git-Url: https://harrygodden.com/git/?a=commitdiff_plain;h=ca8312dce81ff4011ace1bff61799a33d625d45c;hp=df9f72d2912a5424d37dfdb02f76aba8f1ed4df1;p=carveJwlIkooP6JGAAIwe30JlM.git fix menu rendering regression --- diff --git a/blender_export.py b/blender_export.py index 239bfd0..db6e97c 100644 --- a/blender_export.py +++ b/blender_export.py @@ -1328,7 +1328,7 @@ def sr_compile_menus( collection ): sr_compile_mesh_internal( obj ) #} - if item.type == 1 or item.type == 2:#{ + if item.type == 1 or item.type == 2 or item.type == 7:#{ item_button = item._anonymous_union.button item_button.pstr = sr_compile_string( obj_data.string ) item_button.stack_behaviour = int( obj_data.stack_behaviour ) @@ -3174,7 +3174,8 @@ class SR_OBJECT_ENT_MENU_ITEM(bpy.types.PropertyGroup): ('3','toggle', ''), ('4','slider',''), ('5','page',''), - ('6','binding','')]) + ('6','binding',''), + ('7','visual(no colourize)','')]) @staticmethod def sr_inspector( layout, data ): @@ -3183,7 +3184,7 @@ class SR_OBJECT_ENT_MENU_ITEM(bpy.types.PropertyGroup): box = layout.box() box.prop( data, 'tipo' ) - if data.tipo == '0':#{ + if data.tipo == '0' or data.tipo == '7':#{ box.prop( data, 'string', text='Name' ) return #} diff --git a/entity.h b/entity.h index 103e1a2..4046452 100644 --- a/entity.h +++ b/entity.h @@ -300,6 +300,7 @@ enum ent_menuitem_type{ k_ent_menuitem_type_slider = 4, k_ent_menuitem_type_page = 5, k_ent_menuitem_type_binding = 6, + k_ent_menuitem_type_visual_nocol = 7, k_ent_menuitem_type_disabled = 90 }; diff --git a/menu.h b/menu.h index 0985706..86f5736 100644 --- 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; - 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<type != k_ent_menuitem_type_page) && (item->type != k_ent_menuitem_type_visual) && + (item->type != k_ent_menuitem_type_visual_nocol) && (item->groups & (0x1<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{ diff --git a/models_src/rs_menu.mdl b/models_src/rs_menu.mdl index 9a91088..eb04eb0 100644 Binary files a/models_src/rs_menu.mdl and b/models_src/rs_menu.mdl differ