Mercurial > sdl-ios-xcode
comparison 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 |
comparison
equal
deleted
inserted
replaced
4464:fa77a6429698 | 4730:6032ada8b9e5 |
---|---|
1 #include "App.hpp" | |
2 | |
3 App::App() : my_Done(false) | |
4 { | |
5 | |
6 } | |
7 | |
8 App::~App() | |
9 { | |
10 Finalize(); | |
11 } | |
12 | |
13 void App::Initialize() | |
14 { | |
15 Finalize(); | |
16 | |
17 my_Window.Initialize(L"GLTSF", Video_Mode(800, 600, 32), false); | |
18 my_Window.Set_Listener(this); | |
19 my_Window.Show(); | |
20 } | |
21 | |
22 void App::Finalize() | |
23 { | |
24 my_Window.Finalize(); | |
25 } | |
26 | |
27 void App::Run() | |
28 { | |
29 Initialize(); | |
30 while (!my_Done) | |
31 { | |
32 my_Window.Update(); | |
33 my_Window.Display(); | |
34 } | |
35 } | |
36 | |
37 void App::On_Close() | |
38 { | |
39 my_Done = true; | |
40 my_Window.Hide(); | |
41 } | |
42 | |
43 void App::On_Key_Down(int Key) | |
44 { | |
45 switch (Key) | |
46 { | |
47 case VK_ESCAPE: | |
48 On_Close(); | |
49 break; | |
50 } | |
51 } | |
52 | |
53 void App::On_Key_Up(int Key) | |
54 { | |
55 | |
56 } |