opacity + animation fixes
This commit is contained in:
parent
2fb29a102e
commit
045b625655
9 changed files with 845 additions and 151 deletions
|
|
@ -284,6 +284,11 @@ bool UIArc::setProperty(const std::string& name, float value) {
|
|||
markDirty();
|
||||
return true;
|
||||
}
|
||||
else if (name == "opacity") {
|
||||
opacity = std::clamp(value, 0.0f, 1.0f);
|
||||
markDirty();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -342,6 +347,10 @@ bool UIArc::getProperty(const std::string& name, float& value) const {
|
|||
value = origin.y;
|
||||
return true;
|
||||
}
|
||||
else if (name == "opacity") {
|
||||
value = opacity;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -364,7 +373,7 @@ bool UIArc::getProperty(const std::string& name, sf::Vector2f& value) const {
|
|||
bool UIArc::hasProperty(const std::string& name) const {
|
||||
// Float properties
|
||||
if (name == "radius" || name == "start_angle" || name == "end_angle" ||
|
||||
name == "thickness" || name == "x" || name == "y" ||
|
||||
name == "thickness" || name == "x" || name == "y" || name == "opacity" ||
|
||||
name == "rotation" || name == "origin_x" || name == "origin_y") {
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue