its a menu, fuck off
[carveJwlIkooP6JGAAIwe30JlM.git] / blender_export.py
index cb3b9907ea337adc4e3ff9ee6c1c5901d3e2ae90..b7068fe5d47c5fadd50f7dcb59a7c967ec652269 100644 (file)
@@ -372,7 +372,8 @@ class ent_menuitem_button(Structure):
 class ent_menuitem_checkmark(Structure):
 #{
    _fields_ = [("id_check",c_uint32),
-               ("pstr_data",c_uint32)]
+               ("pstr_data",c_uint32),
+               ("offset",c_float*3)]
 #}
 
 class ent_menuitem_page(Structure):
@@ -393,10 +394,12 @@ class ent_menuitem_anon_union(Union):
 class ent_menuitem(Structure):
 #{
    _fields_ = [("type",c_uint32), ("groups",c_uint32),
-               ("id_links",c_uint32*4),
+               ("id_links",c_uint32*4), 
+               ("factive",c_float), ("fvisible",c_float),
                #-- TODO: Refactor this into a simple mesh structure
                ("transform",mdl_transform),
                ("submesh_start",c_uint32),("submesh_count",c_uint32),
+               ("_u64",c_uint64),
                #-- end
                ("_anonymous_union", ent_menuitem_anon_union)]
 #}
@@ -1149,7 +1152,7 @@ def sr_compile_fonts( collection ):
 
 def sr_compile_menus( collection ):
 #{
-   print( "[SR] Compiling menus" )
+   print( "[SR1] Compiling menus" )
    groups = []
 
    for obj in collection.all_objects:#{
@@ -1182,12 +1185,17 @@ def sr_compile_menus( collection ):
          item_checkmark = item._anonymous_union.checkmark
          item_checkmark.pstr_data = sr_compile_string( obj_data.string )
          item_checkmark.id_check = sr_entity_id( obj_data.checkmark )
+         delta = obj_data.checkmark.location - obj.location
+         item_checkmark.offset[0] =  delta[0]
+         item_checkmark.offset[1] =  delta[2]
+         item_checkmark.offset[2] = -delta[1]
       #}
       elif item.type == 4:#{
          item_slider = item._anonymous_union.slider
          item_slider.id_min = sr_entity_id( obj_data.slider_minloc )
          item_slider.id_max = sr_entity_id( obj_data.slider_maxloc )
          item_slider.id_handle = sr_entity_id( obj_data.slider_handle )
+         item_slider.pstr_data = sr_compile_string( obj_data.string )
       #}
       elif item.type == 5:#{
          item_page = item._anonymous_union.page