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