Skyscraper 2.0
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
27namespace SBS {
28
30{
31public:
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
46private:
47 MeshObject* Mesh; //mesh object
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
59};
60
61}
62
63#endif
Timer * timer
Definition indicator.h:57
Real timer_duration
Definition indicator.h:58
std::string soundfile
Definition indicator.h:53
MeshObject * Mesh
Definition indicator.h:47
std::string active_text
Definition indicator.h:54
std::string Blank
Definition indicator.h:34
std::string Prefix
Definition indicator.h:33
bool IsEnabled()
Definition indicator.h:41
Sound * sound
Definition indicator.h:52
Ogre::Real Real
Definition globals.h:57
#define SBSIMPEXP
Definition globals.h:53