1835
|
1 #include "MainMenu.h"è
|
|
2 #include "..\LOD.h"
|
1815
|
3
|
|
4 bool MainMenuWindow::OnMouseLeftClick(int x, int y)
|
|
5 {
|
|
6 if (UIControl::OnMouseLeftClick(x, y))
|
|
7 return true;
|
|
8 return false;
|
|
9 }
|
|
10
|
|
11 bool MainMenuWindow::OnMouseRightClick(int x, int y)
|
|
12 {
|
|
13 if (UIControl::OnMouseRightClick(x, y))
|
|
14 return true;
|
|
15 return false;
|
|
16 }
|
|
17
|
|
18 bool MainMenuWindow::OnKey(int key)
|
|
19 {
|
|
20 if (UIControl::OnKey(key))
|
|
21 return true;
|
|
22 return false;
|
|
23 }
|
|
24
|
|
25
|
|
26 void MainMenuWindow::Show() {}
|
|
27 bool MainMenuWindow::Focused() {return false;}
|
|
28
|
|
29 bool MainMenuWindow::Initialize()
|
|
30 {
|
1980
|
31 RGBTexture* background_texture = new RGBTexture;
|
1847
|
32 background_texture->Load("mm6title.pcx", 0);
|
1815
|
33 return true;
|
|
34 }
|
|
35
|
|
36 MainMenuWindow *MainMenuWindow::Create()
|
|
37 {
|
1980
|
38 MainMenuWindow* window = new MainMenuWindow;
|
1815
|
39 if (window)
|
|
40 if (!window->Initialize())
|
|
41 {
|
|
42 delete window;
|
|
43 window = nullptr;
|
|
44 }
|
|
45 return window;
|
|
46 } |