46Indicator::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) :
Object(parent)
51 SetValues(
"Indicator",
"Indicator",
false);
55 Blank = blank_texture;
64 std::string tmpdirection = direction;
68 if (tmpdirection ==
"front" || tmpdirection ==
"back")
70 if (tmpdirection ==
"front")
75 sbs->
AddWallMain(wall,
"Indicator",
Blank, 0, -width / 2, 0, width / 2, 0, height, height, 0, 0, 1, 1,
false);
77 else if (tmpdirection ==
"left" || tmpdirection ==
"right")
79 if (tmpdirection ==
"left")
84 sbs->
AddWallMain(wall,
"Indicator",
Blank, 0, 0, width / 2, 0, -width / 2, height, height, 0, 0, 1, 1,
false);
91 this->sound =
new Sound(
this,
"Indicator Sound",
true);
97 Move(CenterX, voffset, CenterZ);
148 if (text ==
"" &&
Blank !=
"")
158 std::string texture = text;
159 texture.insert(0,
Prefix);
165 if (play_sound ==
true)
194 Report(
"playing indicator sound");
201 expanded =
"invalid";
Timer(const std::string &name, Indicator *parent)
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)
void Update(const std::string &text, bool play_sound=true)
bool ChangeTexture(const std::string &texture, bool matcheck=true)
Wall * CreateWallObject(const std::string &name)
virtual void Report(const std::string &message)
virtual void Move(const Vector3 &vector, Real speed=1.0)
void SetValues(const std::string &type, const std::string &name, bool is_permanent, bool is_movable=true)
void EnableLoop(bool value)
Real GetConfigFloat(const std::string &key, Real default_value)
bool AddWallMain(Wall *wallobject, const std::string &name, const std::string &texture, Real thickness, Real x1, Real z1, Real x2, Real z2, Real height_in1, Real height_in2, Real altitude1, Real altitude2, Real tw, Real th, bool autosize)
void ResetWalls(bool ToDefaults=false)
TextureManager * GetTextureManager()
void DrawWalls(bool MainN, bool MainP, bool SideN, bool SideP, bool Top, bool Bottom)
bool Load(const std::string &filename, bool force=false)
bool Play(bool reset=true)
void SetLoopState(bool value)
void EnableLighting(const std::string &material_name, bool value)
void Start(int milliseconds=-1, bool oneshot=false)
void ReplaceAll(std::string &string, const std::string &original, const std::string &replacement)
void SetCase(std::string &string, bool uppercase)
void TrimString(std::string &string)