Mercurial > mm7
annotate NewUI/MainMenu.cpp @ 2492:85a12b497698
BelongsToSupertype() clear
author | Ritor1 |
---|---|
date | Mon, 15 Sep 2014 17:30:19 +0600 |
parents | f4af3b203f65 |
children | 68cdef6879a0 |
rev | line source |
---|---|
2415 | 1 #define _CRTDBG_MAP_ALLOC |
2 #include <stdlib.h> | |
3 #include <crtdbg.h> | |
4 | |
2253
aff7a7b072b7
adding _CRT_SECURE_NO_WARNINGS to get rid of a few hundrer annoying warnings + adding count parameter to swprintf
Grumpy7
parents:
1980
diff
changeset
|
5 #define _CRT_SECURE_NO_WARNINGS |
aff7a7b072b7
adding _CRT_SECURE_NO_WARNINGS to get rid of a few hundrer annoying warnings + adding count parameter to swprintf
Grumpy7
parents:
1980
diff
changeset
|
6 #include "MainMenu.h" |
1835 | 7 #include "..\LOD.h" |
1815 | 8 |
9 bool MainMenuWindow::OnMouseLeftClick(int x, int y) | |
10 { | |
11 if (UIControl::OnMouseLeftClick(x, y)) | |
12 return true; | |
13 return false; | |
14 } | |
15 | |
16 bool MainMenuWindow::OnMouseRightClick(int x, int y) | |
17 { | |
18 if (UIControl::OnMouseRightClick(x, y)) | |
19 return true; | |
20 return false; | |
21 } | |
22 | |
23 bool MainMenuWindow::OnKey(int key) | |
24 { | |
25 if (UIControl::OnKey(key)) | |
26 return true; | |
27 return false; | |
28 } | |
29 | |
30 | |
31 void MainMenuWindow::Show() {} | |
32 bool MainMenuWindow::Focused() {return false;} | |
33 | |
34 bool MainMenuWindow::Initialize() | |
35 { | |
1980 | 36 RGBTexture* background_texture = new RGBTexture; |
1847 | 37 background_texture->Load("mm6title.pcx", 0); |
1815 | 38 return true; |
39 } | |
40 | |
41 MainMenuWindow *MainMenuWindow::Create() | |
42 { | |
1980 | 43 MainMenuWindow* window = new MainMenuWindow; |
1815 | 44 if (window) |
45 if (!window->Initialize()) | |
46 { | |
47 delete window; | |
48 window = nullptr; | |
49 } | |
50 return window; | |
51 } |