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 | 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) |
![]() | |
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 () |
virtual void | Loop () |
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 | |
int | Index |
std::string | Direction |
Real | Width |
Real | Height |
Real | ButtonWidth |
Real | ButtonHeight |
Real | SpacingX |
Real | SpacingY |
int | Rows |
int | Columns |
bool | IsEnabled |
![]() | |
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 | |
![]() | |
void | EnableLoop (bool value) |
void | LoopChildren () |
bool | SelfDestruct () |
![]() | |
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, IsEnabled, 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 269 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 287 of file buttonpanel.cpp.
References controls.
void SBS::ButtonPanel::ChangeLight | ( | int | floor, |
bool | value ) |
Definition at line 277 of file buttonpanel.cpp.
References controls.
|
virtual |
Reimplemented from SBS::Object.
Definition at line 253 of file buttonpanel.cpp.
References controls, SBS::MeshObject::Enabled(), IsEnabled, and mesh.
Referenced by SBS::CallStation::Enabled().
Control * SBS::ButtonPanel::GetControl | ( | const std::string & | name | ) |
Definition at line 312 of file buttonpanel.cpp.
References controls.
Control * SBS::ButtonPanel::GetControl | ( | int | index | ) |
Definition at line 304 of file buttonpanel.cpp.
References controls.
Referenced by SBS::CallStation::GetDownControl(), GetFloorButton(), and SBS::CallStation::GetUpControl().
int SBS::ButtonPanel::GetControlCount | ( | ) |
Definition at line 340 of file buttonpanel.cpp.
References controls.
Control * SBS::ButtonPanel::GetFloorButton | ( | int | floor | ) |
Definition at line 297 of file buttonpanel.cpp.
References GetControl(), and SBS::ToString().
void SBS::ButtonPanel::RemoveControl | ( | Control * | control | ) |
Definition at line 327 of file buttonpanel.cpp.
References controls.
void SBS::ButtonPanel::SetControls | ( | const std::string & | action_name | ) |
Definition at line 345 of file buttonpanel.cpp.
References controls, and SBS::Control::FindActionPosition().
|
private |
Definition at line 66 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 65 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::IsEnabled |
Definition at line 43 of file buttonpanel.h.
Referenced by ButtonPanel(), and Enabled().
|
private |
Definition at line 63 of file buttonpanel.h.
Referenced by AddWall(), ButtonPanel(), Enabled(), and ~ButtonPanel().
|
private |
Definition at line 64 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().