blur texture fades in / out with con
This commit is contained in:
parent
1390f9d3cf
commit
e20b8860da
1 changed files with 3 additions and 5 deletions
|
@ -74,12 +74,10 @@ enum corner_location get_rotated_corner(enum corner_location corner_location,
|
||||||
|
|
||||||
// TODO: don't need pointer
|
// TODO: don't need pointer
|
||||||
float get_animation_completion_percentage(struct sway_container *con) {
|
float get_animation_completion_percentage(struct sway_container *con) {
|
||||||
if (con->alpha < con->target_alpha) {
|
if (con->alpha == 1.0f) {
|
||||||
return con->alpha / con->target_alpha;
|
return 1.0f;
|
||||||
} else if (con->alpha > con->target_alpha) {
|
|
||||||
return con->alpha / con->max_alpha;
|
|
||||||
}
|
}
|
||||||
return 1;
|
return con->alpha < con->target_alpha ? con->alpha / con->target_alpha : con->alpha / con->max_alpha;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Reference in a new issue