*/}}
Kaynağa Gözat

Use integrated scene panel

YimingWu 1 yıl önce
ebeveyn
işleme
97887c794a
1 değiştirilmiş dosya ile 10 ekleme ve 1 silme
  1. 10 1
      resources/la_templates.c

+ 10 - 1
resources/la_templates.c

@@ -1682,7 +1682,6 @@ void tnsui_BaseObjectProperties(laUiList *uil, laPropPack *This, laPropPack *UNU
         laShowSeparator(gu,gc);
     }laEndCondition(gu,b1);
 }
-
 void tnsuidetached_ObjectProperties(laPanel* p){
     la_MakeDetachedProp(p, "la.detached_view_switch", "detached");
     la_MakeDetachedProp(p, "tns.world.root_objects", "root_object");
@@ -1727,6 +1726,15 @@ void tnsui_ObjectProperties(laUiList *uil, laPropPack *This, laPropPack *Extra,
 #undef ADD_PAGE1
 #undef ADD_PAGE2
 }
+void tnsui_DetachedScenePanel(laPanel* p){
+    la_MakeDetachedProp(p, "la.detached_view_switch", "detached");
+    la_MakeDetachedProp(p, "tns.world.root_objects", "root_object");
+}
+void tnsui_ScenePanel(laUiList *uil, laPropPack *This, laPropPack *DetachedProps, laColumn *UNUSED, int context){
+    laColumn* c=laFirstColumn(uil); 
+    laShow3DCanvasCombo(uil,c,DetachedProps,"root_object",-1,DetachedProps);
+}
+
 
 void la_RegisterBuiltinTemplates(){
     int obj=MAIN.InitArgs.HasWorldObjects;
@@ -1736,6 +1744,7 @@ void la_RegisterBuiltinTemplates(){
     int act=MAIN.InitArgs.HasAction&&obj;
             laRegisterUiTemplate("LAUI_input_mapper","Input Mapper",laui_InputMapper,0,0,"Controlling",0,0,0);
             laRegisterUiTemplate("LAUI_controllers", "Controllers", laui_GameController, lauidetached_GameController, 0,0,0,0,0);
+    if(obj) laRegisterUiTemplate("LAUI_scene", "Scene", tnsui_ScenePanel, tnsui_DetachedScenePanel, 0, 0, 0,25,25);
     if(obj) laRegisterUiTemplate("LAUI_object_properties", "Properties", tnsui_ObjectProperties, tnsuidetached_ObjectProperties, 0, 0, 0,15,25);
     if(act) laRegisterUiTemplate("LAUI_animation_actions", "Actions", laui_AnimationActions, 0, 0, 0, 0,15,25);
     if(act) laRegisterUiTemplate("LAUI_animation_action_channels", "Action Channels", laui_AnimationActionChannels, 0, 0, 0, 0,20,15);