annotate NewUI/MainMenu.cpp @ 1827:0c75c3e7e436

cleaned up part of party.cpp, renamed byte_AE3368 to playerAlreadyPicked + 3 vars after it, moved them to party.cpp, some player.cpp bugfixes
author Grumpy7
date Fri, 11 Oct 2013 05:49:39 +0200
parents bd899dfd976c
children a5637690ffbb
rev   line source
1815
bd899dfd976c MainMenuWindow
Nomad
parents:
diff changeset
1 #include "MainMenu.h"
bd899dfd976c MainMenuWindow
Nomad
parents:
diff changeset
2
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 {
bd899dfd976c MainMenuWindow
Nomad
parents:
diff changeset
31 return true;
bd899dfd976c MainMenuWindow
Nomad
parents:
diff changeset
32 }
bd899dfd976c MainMenuWindow
Nomad
parents:
diff changeset
33
bd899dfd976c MainMenuWindow
Nomad
parents:
diff changeset
34 MainMenuWindow *MainMenuWindow::Create()
bd899dfd976c MainMenuWindow
Nomad
parents:
diff changeset
35 {
bd899dfd976c MainMenuWindow
Nomad
parents:
diff changeset
36 auto window = new MainMenuWindow;
bd899dfd976c MainMenuWindow
Nomad
parents:
diff changeset
37 if (window)
bd899dfd976c MainMenuWindow
Nomad
parents:
diff changeset
38 if (!window->Initialize())
bd899dfd976c MainMenuWindow
Nomad
parents:
diff changeset
39 {
bd899dfd976c MainMenuWindow
Nomad
parents:
diff changeset
40 delete window;
bd899dfd976c MainMenuWindow
Nomad
parents:
diff changeset
41 window = nullptr;
bd899dfd976c MainMenuWindow
Nomad
parents:
diff changeset
42 }
bd899dfd976c MainMenuWindow
Nomad
parents:
diff changeset
43 return window;
bd899dfd976c MainMenuWindow
Nomad
parents:
diff changeset
44 }