Просмотр исходного кода

All GUI objects get properly unloaded

Marko Pintera 12 лет назад
Родитель
Сommit
def09316de
2 измененных файлов с 5 добавлено и 5 удалено
  1. 4 4
      CamelotClient/CamelotClient.cpp
  2. 1 1
      CamelotCore/Include/CmGUIElement.h

+ 4 - 4
CamelotClient/CamelotClient.cpp

@@ -64,7 +64,7 @@ int CALLBACK WinMain(
 	GameObjectHandle<DebugCamera> debugCamera = cameraGO->addComponent<DebugCamera>();
 	GameObjectHandle<DebugCamera> debugCamera = cameraGO->addComponent<DebugCamera>();
 
 
 	HGameObject testModelGO = GameObject::create("TestMesh");
 	HGameObject testModelGO = GameObject::create("TestMesh");
-	//HRenderable testRenderable = testModelGO->addComponent<Renderable>();
+	HRenderable testRenderable = testModelGO->addComponent<Renderable>();
 
 
 	HGameObject testTextGO = GameObject::create("TestText");
 	HGameObject testTextGO = GameObject::create("TestText");
 	GameObjectHandle<TestTextSprite> textSprite = testTextGO->addComponent<TestTextSprite>();
 	GameObjectHandle<TestTextSprite> textSprite = testTextGO->addComponent<TestTextSprite>();
@@ -85,7 +85,7 @@ int CALLBACK WinMain(
 		font = Importer::instance().import("C:\\arial.ttf", fontImportOptions);
 		font = Importer::instance().import("C:\\arial.ttf", fontImportOptions);
 	}
 	}
 
 
-	//textSprite->setText(camera, "TESTfAV", font, 12);
+	textSprite->setText(camera, "TESTfAV", font, 12);
 
 
 #if defined DX9
 #if defined DX9
 	///////////////// HLSL 9 SHADERS //////////////////////////
 	///////////////// HLSL 9 SHADERS //////////////////////////
@@ -269,8 +269,8 @@ int CALLBACK WinMain(
 
 
 	//_ASSERT(_CrtCheckMemory());
 	//_ASSERT(_CrtCheckMemory());
 
 
-	//testRenderable->setMesh(dbgMeshRef);
-	//testRenderable->setMaterial(testMaterial);
+	testRenderable->setMesh(dbgMeshRef);
+	testRenderable->setMaterial(testMaterial);
 
 
 	//// Set the new state for the flag
 	//// Set the new state for the flag
 	//_CrtSetDbgFlag( tmpFlag );
 	//_CrtSetDbgFlag( tmpFlag );

+ 1 - 1
CamelotCore/Include/CmGUIElement.h

@@ -9,7 +9,7 @@ namespace CamelotEngine
 	{
 	{
 	public:
 	public:
 		GUIElement(GUIWidget* parent, const GUISkin* skin);
 		GUIElement(GUIWidget* parent, const GUISkin* skin);
-		~GUIElement();
+		virtual ~GUIElement();
 
 
 		/**
 		/**
 		 * @brief	Returns the number of separate render elements in the GUI element.
 		 * @brief	Returns the number of separate render elements in the GUI element.