• R/O
  • SSH
  • HTTPS

gdx64: Commit


Commit MetaInfo

Revisión281 (tree)
Tiempo2020-01-21 06:57:23
Autorhgtterry

Log Message

GD19 Ogre 1.9 File View Commands 200120

Cambiar Resumen

Diferencia

--- GD19_OSDN/GD19_FileView_V2.cpp (revision 280)
+++ GD19_OSDN/GD19_FileView_V2.cpp (revision 281)
@@ -198,12 +198,12 @@
198198 {
199199 if (ImGui::Selectable("Add"))
200200 {
201- App->Say("Add");
201+ PopUp_AddObject();
202202 }
203203
204204 if (ImGui::Selectable("Rename"))
205205 {
206- App->Say("Rename");
206+ PopUp_Rename(selected_Object);
207207 }
208208
209209 ImGui::EndPopup();
@@ -840,3 +840,45 @@
840840
841841 return 1;
842842 }
843+
844+// *************************************************************************
845+// * PopUp_AddObject Terry Bernie *
846+// *************************************************************************
847+void GD19_FileView_V2::PopUp_AddObject()
848+{
849+
850+ App->Cl_Dialogs->YesNo("Add Object", "Do you want to add a new Object now");
851+ bool Doit = App->Cl_Dialogs->Canceled;
852+ if (Doit == 0)
853+ {
854+ App->Cl_Mesh_Viewer->Mesh_Viewer_Mode = Enums::Mesh_Viewer_Objects; // Objects
855+ App->Cl_Mesh_Viewer->StartMeshViewer();
856+ App->Cl_Object_Props->Is_Player = 0; // Mark as Object selected
857+ }
858+}
859+
860+
861+// *************************************************************************
862+// * PopUp_Rename Terry Bernie *
863+// *************************************************************************
864+void GD19_FileView_V2::PopUp_Rename(int Selected_Object)
865+{
866+ int Index = App->Cl_Properties->Current_Selected_Object; // Get Selected Object Index
867+
868+ strcpy(App->Cl_Dialogs->btext, "Change Object Name");
869+ strcpy(App->Cl_Dialogs->Chr_Text, App->Cl_Scene_Data->Cl_Object[Index]->Name);
870+
871+ App->Cl_Dialogs->Dialog_Text(Enums::Check_Names_Objects);
872+
873+ if (App->Cl_Dialogs->Canceled == 1)
874+ {
875+ return;
876+ }
877+
878+ strcpy(App->Cl_Scene_Data->Cl_Object[Index]->Name, App->Cl_Dialogs->Chr_Text);
879+
880+ App->Cl_FileView->ChangeItem_Name(NULL, App->Cl_Dialogs->Chr_Text);
881+ App->Cl_Properties->Update_ListView_Objects();
882+
883+ Object_Names_Vec[Selected_Object] = App->Cl_Scene_Data->Cl_Object[Index]->Name;
884+}
--- GD19_OSDN/GD19_FileView_V2.h (revision 280)
+++ GD19_OSDN/GD19_FileView_V2.h (revision 281)
@@ -19,6 +19,9 @@
1919 int GetJustIndex_ByName(char* Name);
2020
2121 bool Select_ObjectFV(int Index);
22+
23+ void PopUp_AddObject();
24+ void PopUp_Rename(int Selected_Object);
2225
2326 bool OpenObjects;
2427 bool SelectObject;
Show on old repository browser