annotate NewUI/MainMenu.cpp @ 2492:85a12b497698

BelongsToSupertype() clear
author Ritor1
date Mon, 15 Sep 2014 17:30:19 +0600
parents f4af3b203f65
children 68cdef6879a0
rev   line source
2415
f4af3b203f65 LOD.cpp cleaned and search memory corrupt
Ritor1
parents: 2253
diff changeset
1 #define _CRTDBG_MAP_ALLOC
f4af3b203f65 LOD.cpp cleaned and search memory corrupt
Ritor1
parents: 2253
diff changeset
2 #include <stdlib.h>
f4af3b203f65 LOD.cpp cleaned and search memory corrupt
Ritor1
parents: 2253
diff changeset
3 #include <crtdbg.h>
f4af3b203f65 LOD.cpp cleaned and search memory corrupt
Ritor1
parents: 2253
diff changeset
4
2253
aff7a7b072b7 adding _CRT_SECURE_NO_WARNINGS to get rid of a few hundrer annoying warnings + adding count parameter to swprintf
Grumpy7
parents: 1980
diff changeset
5 #define _CRT_SECURE_NO_WARNINGS
aff7a7b072b7 adding _CRT_SECURE_NO_WARNINGS to get rid of a few hundrer annoying warnings + adding count parameter to swprintf
Grumpy7
parents: 1980
diff changeset
6 #include "MainMenu.h"
1835
Ritor1
parents: 1815
diff changeset
7 #include "..\LOD.h"
1815
bd899dfd976c MainMenuWindow
Nomad
parents:
diff changeset
8
bd899dfd976c MainMenuWindow
Nomad
parents:
diff changeset
9 bool MainMenuWindow::OnMouseLeftClick(int x, int y)
bd899dfd976c MainMenuWindow
Nomad
parents:
diff changeset
10 {
bd899dfd976c MainMenuWindow
Nomad
parents:
diff changeset
11 if (UIControl::OnMouseLeftClick(x, y))
bd899dfd976c MainMenuWindow
Nomad
parents:
diff changeset
12 return true;
bd899dfd976c MainMenuWindow
Nomad
parents:
diff changeset
13 return false;
bd899dfd976c MainMenuWindow
Nomad
parents:
diff changeset
14 }
bd899dfd976c MainMenuWindow
Nomad
parents:
diff changeset
15
bd899dfd976c MainMenuWindow
Nomad
parents:
diff changeset
16 bool MainMenuWindow::OnMouseRightClick(int x, int y)
bd899dfd976c MainMenuWindow
Nomad
parents:
diff changeset
17 {
bd899dfd976c MainMenuWindow
Nomad
parents:
diff changeset
18 if (UIControl::OnMouseRightClick(x, y))
bd899dfd976c MainMenuWindow
Nomad
parents:
diff changeset
19 return true;
bd899dfd976c MainMenuWindow
Nomad
parents:
diff changeset
20 return false;
bd899dfd976c MainMenuWindow
Nomad
parents:
diff changeset
21 }
bd899dfd976c MainMenuWindow
Nomad
parents:
diff changeset
22
bd899dfd976c MainMenuWindow
Nomad
parents:
diff changeset
23 bool MainMenuWindow::OnKey(int key)
bd899dfd976c MainMenuWindow
Nomad
parents:
diff changeset
24 {
bd899dfd976c MainMenuWindow
Nomad
parents:
diff changeset
25 if (UIControl::OnKey(key))
bd899dfd976c MainMenuWindow
Nomad
parents:
diff changeset
26 return true;
bd899dfd976c MainMenuWindow
Nomad
parents:
diff changeset
27 return false;
bd899dfd976c MainMenuWindow
Nomad
parents:
diff changeset
28 }
bd899dfd976c MainMenuWindow
Nomad
parents:
diff changeset
29
bd899dfd976c MainMenuWindow
Nomad
parents:
diff changeset
30
bd899dfd976c MainMenuWindow
Nomad
parents:
diff changeset
31 void MainMenuWindow::Show() {}
bd899dfd976c MainMenuWindow
Nomad
parents:
diff changeset
32 bool MainMenuWindow::Focused() {return false;}
bd899dfd976c MainMenuWindow
Nomad
parents:
diff changeset
33
bd899dfd976c MainMenuWindow
Nomad
parents:
diff changeset
34 bool MainMenuWindow::Initialize()
bd899dfd976c MainMenuWindow
Nomad
parents:
diff changeset
35 {
1980
c1c74df0a33e changing most of auto types to their actual types
Grumpy7
parents: 1847
diff changeset
36 RGBTexture* background_texture = new RGBTexture;
1847
b6252811663d Texture error in MainMenuWindow
Nomad
parents: 1835
diff changeset
37 background_texture->Load("mm6title.pcx", 0);
1815
bd899dfd976c MainMenuWindow
Nomad
parents:
diff changeset
38 return true;
bd899dfd976c MainMenuWindow
Nomad
parents:
diff changeset
39 }
bd899dfd976c MainMenuWindow
Nomad
parents:
diff changeset
40
bd899dfd976c MainMenuWindow
Nomad
parents:
diff changeset
41 MainMenuWindow *MainMenuWindow::Create()
bd899dfd976c MainMenuWindow
Nomad
parents:
diff changeset
42 {
1980
c1c74df0a33e changing most of auto types to their actual types
Grumpy7
parents: 1847
diff changeset
43 MainMenuWindow* window = new MainMenuWindow;
1815
bd899dfd976c MainMenuWindow
Nomad
parents:
diff changeset
44 if (window)
bd899dfd976c MainMenuWindow
Nomad
parents:
diff changeset
45 if (!window->Initialize())
bd899dfd976c MainMenuWindow
Nomad
parents:
diff changeset
46 {
bd899dfd976c MainMenuWindow
Nomad
parents:
diff changeset
47 delete window;
bd899dfd976c MainMenuWindow
Nomad
parents:
diff changeset
48 window = nullptr;
bd899dfd976c MainMenuWindow
Nomad
parents:
diff changeset
49 }
bd899dfd976c MainMenuWindow
Nomad
parents:
diff changeset
50 return window;
bd899dfd976c MainMenuWindow
Nomad
parents:
diff changeset
51 }