Make progress_bar::label const
This commit is contained in:
parent
16036268f5
commit
0f95a5bcee
2 changed files with 2 additions and 8 deletions
|
|
@ -12,8 +12,7 @@ namespace psemek::ui
|
||||||
virtual float value() const { return value_; }
|
virtual float value() const { return value_; }
|
||||||
virtual void set_value(float value);
|
virtual void set_value(float value);
|
||||||
|
|
||||||
virtual struct label * label();
|
virtual struct label * label() const;
|
||||||
virtual struct label const * label() const;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
float value_ = 0.f;
|
float value_ = 0.f;
|
||||||
|
|
|
||||||
|
|
@ -10,14 +10,9 @@ namespace psemek::ui
|
||||||
value_ = geom::clamp(value, {0.f, 1.f});
|
value_ = geom::clamp(value, {0.f, 1.f});
|
||||||
}
|
}
|
||||||
|
|
||||||
label * progress_bar::label()
|
label * progress_bar::label() const
|
||||||
{
|
{
|
||||||
return dynamic_cast<struct label *>(child().get());
|
return dynamic_cast<struct label *>(child().get());
|
||||||
}
|
}
|
||||||
|
|
||||||
label const * progress_bar::label() const
|
|
||||||
{
|
|
||||||
return dynamic_cast<struct label const *>(child().get());
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue