summaryrefslogtreecommitdiffstats
path: root/game/client/gui/progress_bar.cc
diff options
context:
space:
mode:
authoruntodesu <kirill@untode.su>2025-09-14 19:16:44 +0500
committeruntodesu <kirill@untode.su>2025-09-14 19:16:44 +0500
commit8bcbd2729388edc63c82d77d314b583af1447c49 (patch)
tree460c2b509372077f6adf95d72c4245988a580aed /game/client/gui/progress_bar.cc
parent7fc7fdb001bea8674fe0dbc1b962f3ec2702debb (diff)
downloadvoxelius-8bcbd2729388edc63c82d77d314b583af1447c49.tar.bz2
voxelius-8bcbd2729388edc63c82d77d314b583af1447c49.zip
Cleanup math with qfengine ports again
Diffstat (limited to 'game/client/gui/progress_bar.cc')
-rw-r--r--game/client/gui/progress_bar.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/game/client/gui/progress_bar.cc b/game/client/gui/progress_bar.cc
index 9266ce1..46277b5 100644
--- a/game/client/gui/progress_bar.cc
+++ b/game/client/gui/progress_bar.cc
@@ -58,10 +58,10 @@ void gui::progress_bar::layout(void)
const float modifier = std::exp(-8.0f * (0.5f + 0.5f * sinval));
ImVec4 color = {};
- color.x = math::lerp(background.x, foreground.x, modifier);
- color.y = math::lerp(background.y, foreground.y, modifier);
- color.z = math::lerp(background.z, foreground.z, modifier);
- color.w = math::lerp(background.w, foreground.w, modifier);
+ color.x = glm::mix(background.x, foreground.x, modifier);
+ color.y = glm::mix(background.y, foreground.y, modifier);
+ color.z = glm::mix(background.z, foreground.z, modifier);
+ color.w = glm::mix(background.w, foreground.w, modifier);
const ImVec2 start = ImVec2(base_xpos + bar_width * i, base_ypos);
const ImVec2 end = ImVec2(start.x + bar_width, start.y + bar_height);