2501
|
1 #define _CRTDBG_MAP_ALLOC
|
|
2 #include <stdlib.h>
|
|
3 #include <crtdbg.h>
|
|
4
|
|
5 #define _CRT_SECURE_NO_WARNINGS
|
|
6 #include "MainMenu.h"
|
|
7 #include "..\..\Engine/LOD.h"
|
|
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 {
|
|
36 RGBTexture* background_texture = new RGBTexture;
|
|
37 background_texture->Load("mm6title.pcx", 0);
|
|
38 return true;
|
|
39 }
|
|
40
|
|
41 MainMenuWindow *MainMenuWindow::Create()
|
|
42 {
|
|
43 MainMenuWindow* window = new MainMenuWindow;
|
|
44 if (window)
|
|
45 if (!window->Initialize())
|
|
46 {
|
|
47 delete window;
|
|
48 window = nullptr;
|
|
49 }
|
|
50 return window;
|
|
51 } |