diff EXCLUDE/GLTSF/src/App.cpp @ 4730:6032ada8b9e5

Adding GLTSF (somewhat based on SFML, no actual TSF code yet)
author dewyatt
date Tue, 25 May 2010 18:53:09 -0400
parents
children 0c7c67d4e6ee
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/EXCLUDE/GLTSF/src/App.cpp	Tue May 25 18:53:09 2010 -0400
@@ -0,0 +1,56 @@
+#include "App.hpp"
+
+App::App() : my_Done(false)
+{
+
+}
+
+App::~App()
+{
+	Finalize();
+}
+
+void App::Initialize()
+{
+	Finalize();
+
+	my_Window.Initialize(L"GLTSF", Video_Mode(800, 600, 32), false);
+	my_Window.Set_Listener(this);
+	my_Window.Show();
+}
+
+void App::Finalize()
+{
+	my_Window.Finalize();
+}
+
+void App::Run()
+{
+	Initialize();
+	while (!my_Done)
+	{
+		my_Window.Update();
+		my_Window.Display();
+	}
+}
+
+void App::On_Close()
+{
+	my_Done = true;
+	my_Window.Hide();
+}
+
+void App::On_Key_Down(int Key)
+{
+	switch (Key)
+	{
+	case VK_ESCAPE:
+		On_Close();
+		break;
+	}
+}
+
+void App::On_Key_Up(int Key)
+{
+
+}