Make sure number slider element displays correct value
This commit is contained in:
parent
80097dc41e
commit
5f2dec8eeb
1 changed files with 2 additions and 0 deletions
|
|
@ -54,6 +54,8 @@ template <typename T> class NumberSlider : public Element {
|
|||
}
|
||||
|
||||
virtual void update() override {
|
||||
if(!dd.isHeld && data)
|
||||
dd.val = *data;
|
||||
smooth_two_way_animation_time(dd.holdAnimation, gui.io.deltaTime, dd.isHeld, HOLD_ANIMATION_TIME);
|
||||
smooth_two_way_animation_time(dd.hoverAnimation, gui.io.deltaTime, mouseHovering && !gui.last_interaction_is_touch(), gui.io.theme->hoverExpandTime);
|
||||
if(oldDD != dd) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue