Skyscraper
2.0
src
sbs
indicator.h
Go to the documentation of this file.
1
/*
2
Scalable Building Simulator - Indicator Object
3
The Skyscraper Project - Version 2.0
4
Copyright (C)2004-2024 Ryan Thoryk
5
https://www.skyscrapersim.net
6
https://sourceforge.net/projects/skyscraper/
7
Contact - ryan@skyscrapersim.net
8
9
This program is free software; you can redistribute it and/or
10
modify it under the terms of the GNU General Public License
11
as published by the Free Software Foundation; either version 2
12
of the License, or (at your option) any later version.
13
14
This program is distributed in the hope that it will be useful,
15
but WITHOUT ANY WARRANTY; without even the implied warranty of
16
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
GNU General Public License for more details.
18
19
You should have received a copy of the GNU General Public License
20
along with this program; if not, write to the Free Software
21
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22
*/
23
24
#ifndef _SBS_INDICATOR_H
25
#define _SBS_INDICATOR_H
26
27
namespace
SBS
{
28
29
class
SBSIMPEXP
Indicator
:
public
Object
30
{
31
public
:
32
33
std::string
Prefix
;
//texture name prefix
34
std::string
Blank
;
//blank texture name
35
36
//functions
37
Indicator
(
Object
*parent,
const
std::string &sound,
const
std::string &texture_prefix,
const
std::string &blank_texture,
const
std::string &direction,
Real
CenterX,
Real
CenterZ,
Real
width,
Real
height,
Real
voffset,
Real
timer_duration);
38
~Indicator
();
39
void
Enabled(
bool
value);
40
void
Update(
const
std::string &text,
bool
play_sound =
true
);
41
bool
IsEnabled
() {
return
is_enabled; }
42
void
Off();
43
bool
PlaySound();
44
void
Loop();
45
46
private
:
47
MeshObject
*
Mesh
;
//mesh object
48
bool
is_enabled
;
49
50
class
Timer
;
//internal timer class
51
52
Sound
*
sound
;
//sound object
53
std::string
soundfile
;
54
std::string
active_text
;
55
56
//timer object
57
Timer
*
timer
;
58
Real
timer_duration
;
59
};
60
61
}
62
63
#endif
SBS::Indicator::Timer
Definition
indicator.cpp:36
SBS::Indicator
Definition
indicator.h:30
SBS::Indicator::timer
Timer * timer
Definition
indicator.h:57
SBS::Indicator::timer_duration
Real timer_duration
Definition
indicator.h:58
SBS::Indicator::soundfile
std::string soundfile
Definition
indicator.h:53
SBS::Indicator::Mesh
MeshObject * Mesh
Definition
indicator.h:47
SBS::Indicator::active_text
std::string active_text
Definition
indicator.h:54
SBS::Indicator::Blank
std::string Blank
Definition
indicator.h:34
SBS::Indicator::Prefix
std::string Prefix
Definition
indicator.h:33
SBS::Indicator::IsEnabled
bool IsEnabled()
Definition
indicator.h:41
SBS::Indicator::sound
Sound * sound
Definition
indicator.h:52
SBS::Indicator::is_enabled
bool is_enabled
Definition
indicator.h:48
SBS::MeshObject
Definition
mesh.h:44
SBS::Object
Definition
object.h:56
SBS::Sound
Definition
sound.h:30
Real
Ogre::Real Real
Definition
globals.h:57
SBSIMPEXP
#define SBSIMPEXP
Definition
globals.h:53
SBS
Definition
skyscraper.h:45
Generated by
1.11.0