Skyscraper
2.0
src
frontend
startscreen.h
Go to the documentation of this file.
1
/*
2
Skyscraper 2.1 - Startup Screen
3
Copyright (C)2003-2024 Ryan Thoryk
4
https://www.skyscrapersim.net
5
https://sourceforge.net/projects/skyscraper/
6
Contact - ryan@skyscrapersim.net
7
8
This program is free software; you can redistribute it and/or
9
modify it under the terms of the GNU General Public License
10
as published by the Free Software Foundation; either version 2
11
of the License, or (at your option) any later version.
12
13
This program is distributed in the hope that it will be useful,
14
but WITHOUT ANY WARRANTY; without even the implied warranty of
15
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
GNU General Public License for more details.
17
18
You should have received a copy of the GNU General Public License
19
along with this program; if not, write to the Free Software
20
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21
*/
22
23
namespace
Skyscraper
24
{
25
26
class
StartScreen
27
{
28
public
:
29
30
StartScreen
(
Skyscraper
*
frontend
);
31
~StartScreen
();
32
bool
DrawBackground
();
33
bool
GetMenuInput
();
34
void
DeleteButtons
();
35
36
private
:
37
38
//button locations
39
struct
buttondata
40
{
41
Real
x
;
42
Real
y
;
43
Real
size_x
;
44
Real
size_y
;
45
std::string
filename
;
46
std::string
filename_selected
;
47
std::string
filename_pressed
;
48
Real
offset_x
;
49
Real
offset_y
;
50
bool
drawn_selected
,
drawn_pressed
;
51
int
active_button
;
52
Ogre::SceneNode*
node
;
53
Ogre::Rectangle2D*
rect
;
54
};
55
buttondata
*
buttons
;
56
int
buttoncount
;
57
58
Ogre::Rectangle2D*
background_rect
;
59
Ogre::SceneNode*
background_node
;
60
std::string
background_image
;
61
62
bool
DrawImage
(
const
std::string &filename,
buttondata
*button,
Real
x,
Real
y,
bool
center,
const
std::string &filename_selected =
""
,
const
std::string &filename_pressed =
""
);
63
void
Click
(
int
index);
64
65
Skyscraper
*
frontend
;
66
VM
*
vm
;
67
68
};
69
70
}
Skyscraper::StartScreen
Definition
startscreen.h:27
Skyscraper::StartScreen::vm
VM * vm
Definition
startscreen.h:66
Skyscraper::StartScreen::DeleteButtons
void DeleteButtons()
Definition
startscreen.cpp:485
Skyscraper::StartScreen::DrawBackground
bool DrawBackground()
Definition
startscreen.cpp:53
Skyscraper::StartScreen::DrawImage
bool DrawImage(const std::string &filename, buttondata *button, Real x, Real y, bool center, const std::string &filename_selected="", const std::string &filename_pressed="")
Definition
startscreen.cpp:152
Skyscraper::StartScreen::GetMenuInput
bool GetMenuInput()
Definition
startscreen.cpp:393
Skyscraper::StartScreen::background_rect
Ogre::Rectangle2D * background_rect
Definition
startscreen.h:58
Skyscraper::StartScreen::StartScreen
StartScreen(Skyscraper *frontend)
Definition
startscreen.cpp:38
Skyscraper::StartScreen::background_image
std::string background_image
Definition
startscreen.h:60
Skyscraper::StartScreen::~StartScreen
~StartScreen()
Definition
startscreen.cpp:48
Skyscraper::StartScreen::Click
void Click(int index)
Definition
startscreen.cpp:453
Skyscraper::StartScreen::frontend
Skyscraper * frontend
Definition
startscreen.h:65
Skyscraper::StartScreen::background_node
Ogre::SceneNode * background_node
Definition
startscreen.h:59
Skyscraper::StartScreen::buttoncount
int buttoncount
Definition
startscreen.h:56
Skyscraper::StartScreen::buttons
buttondata * buttons
Definition
startscreen.h:55
Skyscraper::VM
Definition
vm.h:71
Real
Ogre::Real Real
Definition
globals.h:57
Skyscraper
Definition
native.cpp:50
Skyscraper::StartScreen::buttondata
Definition
startscreen.h:40
Skyscraper::StartScreen::buttondata::active_button
int active_button
Definition
startscreen.h:51
Skyscraper::StartScreen::buttondata::offset_x
Real offset_x
Definition
startscreen.h:48
Skyscraper::StartScreen::buttondata::filename
std::string filename
Definition
startscreen.h:45
Skyscraper::StartScreen::buttondata::offset_y
Real offset_y
Definition
startscreen.h:49
Skyscraper::StartScreen::buttondata::y
Real y
Definition
startscreen.h:42
Skyscraper::StartScreen::buttondata::node
Ogre::SceneNode * node
Definition
startscreen.h:52
Skyscraper::StartScreen::buttondata::filename_pressed
std::string filename_pressed
Definition
startscreen.h:47
Skyscraper::StartScreen::buttondata::drawn_selected
bool drawn_selected
Definition
startscreen.h:50
Skyscraper::StartScreen::buttondata::filename_selected
std::string filename_selected
Definition
startscreen.h:46
Skyscraper::StartScreen::buttondata::x
Real x
Definition
startscreen.h:41
Skyscraper::StartScreen::buttondata::size_x
Real size_x
Definition
startscreen.h:43
Skyscraper::StartScreen::buttondata::size_y
Real size_y
Definition
startscreen.h:44
Skyscraper::StartScreen::buttondata::drawn_pressed
bool drawn_pressed
Definition
startscreen.h:50
Skyscraper::StartScreen::buttondata::rect
Ogre::Rectangle2D * rect
Definition
startscreen.h:53
Generated by
1.11.0