|
Skyscraper 2.0
|
#include <buttonpanel.h>


Public Member Functions | |
| ButtonPanel (Object *parent, int index, const std::string &texture, int rows, int columns, const std::string &direction, Real CenterX, Real CenterZ, Real buttonwidth, Real buttonheight, Real spacingX, Real spacingY, Real voffset, Real tw, Real th, bool autosize=true) | |
| ~ButtonPanel () | |
| Control * | AddButton (const std::string &sound, const std::string &texture, const std::string &texture_lit, int row, int column, const std::string &type, Real width, Real height, Real hoffset=0, Real voffset=0) |
| Control * | AddControl (const std::string &sound, int row, int column, Real bwidth, Real bheight, Real hoffset, Real voffset, int selection_position, std::vector< std::string > &action_names, std::vector< std::string > &textures) |
| void | Enabled (bool value) |
| bool | IsEnabled () |
| bool | AddWall (const std::string &name, const std::string &texture, Real thickness, Real x1, Real z1, Real x2, Real z2, Real height1, Real height2, Real voffset1, Real voffset2, Real tw, Real th, bool autosize) |
| void | ChangeLight (int floor, bool value) |
| void | ChangeAllLights (bool value) |
| Control * | GetFloorButton (int floor) |
| Control * | GetControl (int index) |
| Control * | GetControl (const std::string &name) |
| void | RemoveControl (Control *control) |
| int | GetControlCount () |
| void | SetControls (const std::string &action_name) |
Public Member Functions inherited from SBS::Object | |
| 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, bool force=false) |
| virtual void | Move (Real X, Real Y, Real Z, Real speed=1.0, bool force=false) |
| virtual void | SetPosition (const Vector3 &position, bool relative=false, bool force=false) |
| virtual void | SetPosition (Real X, Real Y, Real Z, bool relative=false, bool force=false) |
| virtual void | SetPositionY (Real value, bool force=false) |
| 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 () |
| virtual void | Loop () |
| void | RegisterLoop (Object *object) |
| void | UnregisterLoop (Object *object) |
| std::string | GetNameBase () |
| template<typename T > | |
| bool | IsType () |
| template<typename T > | |
| T * | ConvertTo () |
Public Member Functions inherited from SBS::ObjectBase | |
| 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 | |
| int | Index |
| std::string | Direction |
| Real | Width |
| Real | Height |
| Real | ButtonWidth |
| Real | ButtonHeight |
| Real | SpacingX |
| Real | SpacingY |
| int | Rows |
| int | Columns |
| bool | is_enabled |
Public Attributes inherited from SBS::Object | |
| std::string | command |
| std::string | command_processed |
| std::string | context |
| int | linenum |
| std::string | includefile |
| bool | parent_deleting |
Private Attributes | |
| MeshObject * | mesh |
| Action * | off_action |
| std::vector< Control * > | controls |
| std::vector< Action * > | action_list |
Additional Inherited Members | |
Protected Member Functions inherited from SBS::Object | |
| void | EnableLoop (bool value) |
| void | LoopChildren () |
| bool | SelfDestruct () |
Protected Attributes inherited from SBS::ObjectBase | |
| SBS * | sbs |
Definition at line 29 of file buttonpanel.h.
| SBS::ButtonPanel::ButtonPanel | ( | Object * | parent, |
| int | index, | ||
| const std::string & | texture, | ||
| int | rows, | ||
| int | columns, | ||
| const std::string & | direction, | ||
| Real | CenterX, | ||
| Real | CenterZ, | ||
| Real | buttonwidth, | ||
| Real | buttonheight, | ||
| Real | spacingX, | ||
| Real | spacingY, | ||
| Real | voffset, | ||
| Real | tw, | ||
| Real | th, | ||
| bool | autosize = true ) |
Definition at line 36 of file buttonpanel.cpp.
References AddWall(), ButtonHeight, ButtonWidth, Columns, Direction, SBS::SBS::DrawWalls(), SBS::SBS::GetConfigFloat(), SBS::SBS::GetTextureManager(), Height, Index, is_enabled, mesh, SBS::Object::Move(), off_action, SBS::TextureManager::ResetTextureMapping(), SBS::SBS::ResetWalls(), Rows, SBS::ObjectBase::sbs, SBS::SetCase(), SBS::ObjectBase::SetName(), SBS::Object::SetValues(), SpacingX, SpacingY, SBS::ToString(), SBS::TrimString(), and Width.

| SBS::ButtonPanel::~ButtonPanel | ( | ) |
Definition at line 99 of file buttonpanel.cpp.
References action_list, controls, SBS::SBS::FastDelete, SBS::ObjectBase::GetParent(), SBS::Object::GetType(), mesh, SBS::Object::parent_deleting, SBS::SBS::RemoveAction(), and SBS::ObjectBase::sbs.

| Control * SBS::ButtonPanel::AddButton | ( | const std::string & | sound, |
| const std::string & | texture, | ||
| const std::string & | texture_lit, | ||
| int | row, | ||
| int | column, | ||
| const std::string & | type, | ||
| Real | width, | ||
| Real | height, | ||
| Real | hoffset = 0, | ||
| Real | voffset = 0 ) |
Definition at line 139 of file buttonpanel.cpp.
References AddControl(), SBS::TextureManager::EnableLighting(), SBS::SBS::GetTextureManager(), SBS::IsNumeric(), SBS::ObjectBase::sbs, and SBS::SetCase().
Referenced by Skyscraper::ScriptProcessor::ElevatorCarSection::Run().

| Control * SBS::ButtonPanel::AddControl | ( | const std::string & | sound, |
| int | row, | ||
| int | column, | ||
| Real | bwidth, | ||
| Real | bheight, | ||
| Real | hoffset, | ||
| Real | voffset, | ||
| int | selection_position, | ||
| std::vector< std::string > & | action_names, | ||
| std::vector< std::string > & | textures ) |
Definition at line 170 of file buttonpanel.cpp.
References action_list, SBS::SBS::AddAction(), ButtonHeight, ButtonWidth, controls, Direction, SBS::ObjectBase::GetName(), SBS::ObjectBase::GetParent(), Height, off_action, SBS::ObjectBase::sbs, SpacingX, SpacingY, SBS::ToString(), SBS::TrimString(), and Width.
Referenced by AddButton(), SBS::CallStation::CreateCallButtons(), and Skyscraper::ScriptProcessor::CallStationSection::Run().

| bool SBS::ButtonPanel::AddWall | ( | const std::string & | name, |
| const std::string & | texture, | ||
| Real | thickness, | ||
| Real | x1, | ||
| Real | z1, | ||
| Real | x2, | ||
| Real | z2, | ||
| Real | height1, | ||
| Real | height2, | ||
| Real | voffset1, | ||
| Real | voffset2, | ||
| Real | tw, | ||
| Real | th, | ||
| bool | autosize ) |
Definition at line 274 of file buttonpanel.cpp.
References SBS::SBS::AddWallMain(), SBS::MeshObject::CreateWallObject(), mesh, and SBS::ObjectBase::sbs.
Referenced by ButtonPanel().

| void SBS::ButtonPanel::ChangeAllLights | ( | bool | value | ) |
Definition at line 292 of file buttonpanel.cpp.
References controls.
| void SBS::ButtonPanel::ChangeLight | ( | int | floor, |
| bool | value ) |
Definition at line 282 of file buttonpanel.cpp.
References controls.
|
virtual |
Reimplemented from SBS::Object.
Definition at line 253 of file buttonpanel.cpp.
References controls, SBS::MeshObject::Enabled(), is_enabled, and mesh.
Referenced by SBS::CallStation::Enabled().

| Control * SBS::ButtonPanel::GetControl | ( | const std::string & | name | ) |
Definition at line 317 of file buttonpanel.cpp.
References controls.
| Control * SBS::ButtonPanel::GetControl | ( | int | index | ) |
Definition at line 309 of file buttonpanel.cpp.
References controls.
Referenced by SBS::CallStation::GetDownControl(), GetFloorButton(), and SBS::CallStation::GetUpControl().
| int SBS::ButtonPanel::GetControlCount | ( | ) |
Definition at line 345 of file buttonpanel.cpp.
References controls.
| Control * SBS::ButtonPanel::GetFloorButton | ( | int | floor | ) |
Definition at line 302 of file buttonpanel.cpp.
References GetControl(), and SBS::ToString().

|
virtual |
Reimplemented from SBS::Object.
Definition at line 269 of file buttonpanel.cpp.
References is_enabled.
| void SBS::ButtonPanel::RemoveControl | ( | Control * | control | ) |
Definition at line 332 of file buttonpanel.cpp.
References controls.
| void SBS::ButtonPanel::SetControls | ( | const std::string & | action_name | ) |
Definition at line 350 of file buttonpanel.cpp.
References controls, and SBS::Control::FindActionPosition().

|
private |
Definition at line 67 of file buttonpanel.h.
Referenced by AddControl(), and ~ButtonPanel().
| Real SBS::ButtonPanel::ButtonHeight |
Definition at line 38 of file buttonpanel.h.
Referenced by AddControl(), and ButtonPanel().
| Real SBS::ButtonPanel::ButtonWidth |
Definition at line 37 of file buttonpanel.h.
Referenced by AddControl(), and ButtonPanel().
| int SBS::ButtonPanel::Columns |
Definition at line 42 of file buttonpanel.h.
Referenced by ButtonPanel().
|
private |
Definition at line 66 of file buttonpanel.h.
Referenced by AddControl(), ChangeAllLights(), ChangeLight(), Enabled(), GetControl(), GetControl(), GetControlCount(), RemoveControl(), SetControls(), and ~ButtonPanel().
| std::string SBS::ButtonPanel::Direction |
Definition at line 34 of file buttonpanel.h.
Referenced by AddControl(), ButtonPanel(), and SBS::CallStation::ReportElevator().
| Real SBS::ButtonPanel::Height |
Definition at line 36 of file buttonpanel.h.
Referenced by AddControl(), and ButtonPanel().
| int SBS::ButtonPanel::Index |
Definition at line 33 of file buttonpanel.h.
Referenced by ButtonPanel().
| bool SBS::ButtonPanel::is_enabled |
Definition at line 43 of file buttonpanel.h.
Referenced by ButtonPanel(), Enabled(), and IsEnabled().
|
private |
Definition at line 64 of file buttonpanel.h.
Referenced by AddWall(), ButtonPanel(), Enabled(), and ~ButtonPanel().
|
private |
Definition at line 65 of file buttonpanel.h.
Referenced by AddControl(), and ButtonPanel().
| int SBS::ButtonPanel::Rows |
Definition at line 41 of file buttonpanel.h.
Referenced by ButtonPanel().
| Real SBS::ButtonPanel::SpacingX |
Definition at line 39 of file buttonpanel.h.
Referenced by AddControl(), and ButtonPanel().
| Real SBS::ButtonPanel::SpacingY |
Definition at line 40 of file buttonpanel.h.
Referenced by AddControl(), and ButtonPanel().
| Real SBS::ButtonPanel::Width |
Definition at line 35 of file buttonpanel.h.
Referenced by AddControl(), and ButtonPanel().