annotate NewUI/MainMenu.cpp @ 1962:39a68477ead3

pActorBuffs[18] to pActorBuffs[ACTOR_BUFF_HEROISM]
author Grumpy7
date Fri, 25 Oct 2013 11:21:37 -0700
parents b6252811663d
children c1c74df0a33e
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 {
1835
Ritor1
parents: 1815
diff changeset
31 auto 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 {
bd899dfd976c MainMenuWindow
Nomad
parents:
diff changeset
38 auto window = new MainMenuWindow;
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 }