Skyscraper 2.0
|
#include <indicator.h>
Classes | |
class | Timer |
Public Member Functions | |
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) | |
~Indicator () | |
void | Enabled (bool value) |
void | Update (const std::string &text, bool play_sound=true) |
bool | IsEnabled () |
void | Off () |
bool | PlaySound () |
void | Loop () |
![]() | |
Object (Object *parent) | |
virtual | ~Object () |
void | SetValues (const std::string &type, const std::string &name, bool is_permanent, bool is_movable=true) |
bool | IsPermanent () |
bool | IsMovable () |
const std::string & | GetType () |
int | GetNumber () |
void | AddChild (Object *object) |
Object * | GetChild (int index) |
int | GetChildrenCount () |
void | RemoveChild (Object *object) |
SceneNode * | GetSceneNode () |
void | ShowBoundingBox (bool value) |
virtual void | Move (const Vector3 &vector, Real speed=1.0) |
virtual void | Move (Real X, Real Y, Real Z, Real speed=1.0) |
virtual void | SetPosition (const Vector3 &position) |
void | SetPositionRelative (const Vector3 &position) |
virtual void | SetPosition (Real X, Real Y, Real Z) |
void | SetPositionRelative (Real X, Real Y, Real Z) |
virtual void | SetPositionY (Real value) |
virtual Vector3 | GetPosition (bool relative=false) |
virtual void | Rotate (const Vector3 &vector, Real speed=1.0) |
virtual void | Rotate (Real X, Real Y, Real Z, Real speed=1.0) |
virtual void | SetRotation (const Vector3 &rotation) |
virtual void | SetRotation (Real X, Real Y, Real Z) |
virtual Vector3 | GetRotation () |
Quaternion | GetOrientation (bool relative=false) |
void | SetOrientation (const Quaternion &q, bool relative=false) |
virtual void | OnMove (bool parent) |
virtual void | OnRotate (bool parent) |
virtual void | OnClick (Vector3 &position, bool shift, bool ctrl, bool alt, bool right) |
virtual void | OnUnclick (bool right) |
virtual void | OnHit () |
void | NotifyMove (bool parent=false) |
void | NotifyRotate (bool parent=false) |
virtual void | ResetState () |
void | ChangeParent (Object *new_parent) |
bool | IsGlobal () |
void | Init (bool children=true) |
virtual void | OnInit () |
void | RegisterLoop (Object *object) |
void | UnregisterLoop (Object *object) |
std::string | GetNameBase () |
template<typename T > | |
bool | IsType () |
template<typename T > | |
T * | ConvertTo () |
![]() | |
ObjectBase (Object *parent) | |
virtual | ~ObjectBase () |
Object * | GetParent () |
SBS * | GetRoot () |
void | SetName (const std::string &name) |
const std::string & | GetName () |
std::string | GetNameBase () |
virtual void | Report (const std::string &message) |
virtual bool | ReportError (const std::string &message) |
Public Attributes | |
std::string | Prefix |
std::string | Blank |
![]() | |
std::string | command |
std::string | command_processed |
std::string | context |
int | linenum |
std::string | includefile |
bool | parent_deleting |
Private Attributes | |
MeshObject * | Mesh |
bool | is_enabled |
Sound * | sound |
std::string | soundfile |
std::string | active_text |
Timer * | timer |
Real | timer_duration |
Additional Inherited Members | |
![]() | |
void | EnableLoop (bool value) |
void | LoopChildren () |
bool | SelfDestruct () |
![]() | |
SBS * | sbs |
Definition at line 29 of file indicator.h.
SBS::Indicator::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 ) |
Definition at line 46 of file indicator.cpp.
References SBS::SBS::AddWallMain(), Blank, SBS::MeshObject::CreateWallObject(), SBS::SBS::DrawWalls(), SBS::Object::EnableLoop(), SBS::SBS::GetConfigFloat(), is_enabled, Mesh, SBS::Object::Move(), Prefix, SBS::SBS::ResetWalls(), SBS::ObjectBase::sbs, SBS::SetCase(), SBS::Object::SetValues(), sound, soundfile, timer, timer_duration, and SBS::TrimString().
SBS::Indicator::~Indicator | ( | ) |
Definition at line 105 of file indicator.cpp.
References Mesh, SBS::Object::parent_deleting, and sound.
|
virtual |
Reimplemented from SBS::Object.
Definition at line 133 of file indicator.cpp.
References SBS::MeshObject::Enabled(), is_enabled, and Mesh.
|
inline |
Definition at line 41 of file indicator.h.
|
virtual |
Reimplemented from SBS::Object.
Definition at line 220 of file indicator.cpp.
References SBS::SBS::GetPower(), Off(), and SBS::ObjectBase::sbs.
void SBS::Indicator::Off | ( | ) |
Definition at line 171 of file indicator.cpp.
References active_text, Blank, SBS::MeshObject::ChangeTexture(), and Mesh.
Referenced by Loop(), and SBS::Indicator::Timer::Notify().
bool SBS::Indicator::PlaySound | ( | ) |
Definition at line 186 of file indicator.cpp.
References active_text, SBS::Sound::Load(), SBS::Sound::Play(), SBS::ReplaceAll(), SBS::ObjectBase::Report(), SBS::ObjectBase::sbs, SBS::Sound::SetLoopState(), sound, soundfile, SBS::Sound::Stop(), SBS::TrimString(), and SBS::SBS::Verbose.
Referenced by Update().
void SBS::Indicator::Update | ( | const std::string & | text, |
bool | play_sound = true ) |
Definition at line 144 of file indicator.cpp.
References active_text, Blank, SBS::MeshObject::ChangeTexture(), SBS::TextureManager::EnableLighting(), SBS::SBS::GetTextureManager(), Mesh, PlaySound(), Prefix, SBS::ObjectBase::sbs, SBS::TimerObject::Start(), timer, and timer_duration.
Referenced by SBS::CallStation::UpdateIndicator(), and SBS::ElevatorCar::UpdateKeypadIndicator().
|
private |
Definition at line 54 of file indicator.h.
Referenced by Off(), PlaySound(), and Update().
std::string SBS::Indicator::Blank |
Definition at line 34 of file indicator.h.
Referenced by Indicator(), Off(), and Update().
|
private |
Definition at line 48 of file indicator.h.
Referenced by Enabled(), and Indicator().
|
private |
Definition at line 47 of file indicator.h.
Referenced by Enabled(), Indicator(), Off(), Update(), and ~Indicator().
std::string SBS::Indicator::Prefix |
Definition at line 33 of file indicator.h.
Referenced by Indicator(), and Update().
|
private |
Definition at line 52 of file indicator.h.
Referenced by Indicator(), PlaySound(), and ~Indicator().
|
private |
Definition at line 53 of file indicator.h.
Referenced by Indicator(), and PlaySound().
|
private |
Definition at line 57 of file indicator.h.
Referenced by Indicator(), and Update().
|
private |
Definition at line 58 of file indicator.h.
Referenced by Indicator(), and Update().