annotate NewUI/MainMenu.cpp @ 1996:f7e8c4d4a01b

sound id fix
author zipi
date Sun, 03 Nov 2013 14:29:45 +0000
parents c1c74df0a33e
children aff7a7b072b7
rev   line source
1835
Ritor1
parents: 1815
diff changeset
1 #include "MainMenu.h"è
Ritor1
parents: 1815
diff changeset
2 #include "..\LOD.h"
1815
bd899dfd976c MainMenuWindow
Nomad
parents:
diff changeset
3
bd899dfd976c MainMenuWindow
Nomad
parents:
diff changeset
4 bool MainMenuWindow::OnMouseLeftClick(int x, int y)
bd899dfd976c MainMenuWindow
Nomad
parents:
diff changeset
5 {
bd899dfd976c MainMenuWindow
Nomad
parents:
diff changeset
6 if (UIControl::OnMouseLeftClick(x, y))
bd899dfd976c MainMenuWindow
Nomad
parents:
diff changeset
7 return true;
bd899dfd976c MainMenuWindow
Nomad
parents:
diff changeset
8 return false;
bd899dfd976c MainMenuWindow
Nomad
parents:
diff changeset
9 }
bd899dfd976c MainMenuWindow
Nomad
parents:
diff changeset
10
bd899dfd976c MainMenuWindow
Nomad
parents:
diff changeset
11 bool MainMenuWindow::OnMouseRightClick(int x, int y)
bd899dfd976c MainMenuWindow
Nomad
parents:
diff changeset
12 {
bd899dfd976c MainMenuWindow
Nomad
parents:
diff changeset
13 if (UIControl::OnMouseRightClick(x, y))
bd899dfd976c MainMenuWindow
Nomad
parents:
diff changeset
14 return true;
bd899dfd976c MainMenuWindow
Nomad
parents:
diff changeset
15 return false;
bd899dfd976c MainMenuWindow
Nomad
parents:
diff changeset
16 }
bd899dfd976c MainMenuWindow
Nomad
parents:
diff changeset
17
bd899dfd976c MainMenuWindow
Nomad
parents:
diff changeset
18 bool MainMenuWindow::OnKey(int key)
bd899dfd976c MainMenuWindow
Nomad
parents:
diff changeset
19 {
bd899dfd976c MainMenuWindow
Nomad
parents:
diff changeset
20 if (UIControl::OnKey(key))
bd899dfd976c MainMenuWindow
Nomad
parents:
diff changeset
21 return true;
bd899dfd976c MainMenuWindow
Nomad
parents:
diff changeset
22 return false;
bd899dfd976c MainMenuWindow
Nomad
parents:
diff changeset
23 }
bd899dfd976c MainMenuWindow
Nomad
parents:
diff changeset
24
bd899dfd976c MainMenuWindow
Nomad
parents:
diff changeset
25
bd899dfd976c MainMenuWindow
Nomad
parents:
diff changeset
26 void MainMenuWindow::Show() {}
bd899dfd976c MainMenuWindow
Nomad
parents:
diff changeset
27 bool MainMenuWindow::Focused() {return false;}
bd899dfd976c MainMenuWindow
Nomad
parents:
diff changeset
28
bd899dfd976c MainMenuWindow
Nomad
parents:
diff changeset
29 bool MainMenuWindow::Initialize()
bd899dfd976c MainMenuWindow
Nomad
parents:
diff changeset
30 {
1980
c1c74df0a33e changing most of auto types to their actual types
Grumpy7
parents: 1847
diff changeset
31 RGBTexture* background_texture = new RGBTexture;
1847
b6252811663d Texture error in MainMenuWindow
Nomad
parents: 1835
diff changeset
32 background_texture->Load("mm6title.pcx", 0);
1815
bd899dfd976c MainMenuWindow
Nomad
parents:
diff changeset
33 return true;
bd899dfd976c MainMenuWindow
Nomad
parents:
diff changeset
34 }
bd899dfd976c MainMenuWindow
Nomad
parents:
diff changeset
35
bd899dfd976c MainMenuWindow
Nomad
parents:
diff changeset
36 MainMenuWindow *MainMenuWindow::Create()
bd899dfd976c MainMenuWindow
Nomad
parents:
diff changeset
37 {
1980
c1c74df0a33e changing most of auto types to their actual types
Grumpy7
parents: 1847
diff changeset
38 MainMenuWindow* window = new MainMenuWindow;
1815
bd899dfd976c MainMenuWindow
Nomad
parents:
diff changeset
39 if (window)
bd899dfd976c MainMenuWindow
Nomad
parents:
diff changeset
40 if (!window->Initialize())
bd899dfd976c MainMenuWindow
Nomad
parents:
diff changeset
41 {
bd899dfd976c MainMenuWindow
Nomad
parents:
diff changeset
42 delete window;
bd899dfd976c MainMenuWindow
Nomad
parents:
diff changeset
43 window = nullptr;
bd899dfd976c MainMenuWindow
Nomad
parents:
diff changeset
44 }
bd899dfd976c MainMenuWindow
Nomad
parents:
diff changeset
45 return window;
bd899dfd976c MainMenuWindow
Nomad
parents:
diff changeset
46 }