Fixed bookmark jump transition bug
This commit is contained in:
parent
bacca9ff68
commit
4aa810fe43
7 changed files with 21 additions and 9 deletions
|
|
@ -21,7 +21,7 @@ void CheckBox::layout(const Clay_ElementId& id, const std::function<bool()>& isT
|
|||
}
|
||||
|
||||
void CheckBox::update() {
|
||||
if(smooth_two_way_time(hoverAnimation, gui.io.deltaTime, mouseHovering, CHECKBOX_ANIMATION_TIME))
|
||||
if(smooth_two_way_animation_time_check_for_change(hoverAnimation, gui.io.deltaTime, mouseHovering, CHECKBOX_ANIMATION_TIME))
|
||||
gui.invalidate_draw_element(this);
|
||||
if(oldIsTicked != isTicked()) {
|
||||
gui.invalidate_draw_element(this);
|
||||
|
|
|
|||
|
|
@ -34,8 +34,8 @@ template <typename T> class NumberSlider : public Element {
|
|||
}
|
||||
|
||||
virtual void update() {
|
||||
smooth_two_way_time(dd.holdAnimation, gui.io.deltaTime, dd.isHeld, HOLD_ANIMATION_TIME);
|
||||
smooth_two_way_time(dd.hoverAnimation, gui.io.deltaTime, mouseHovering, gui.io.theme->hoverExpandTime);
|
||||
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.io.theme->hoverExpandTime);
|
||||
if(oldDD != dd) {
|
||||
gui.invalidate_draw_element(this, {
|
||||
.top = 10.0f,
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ void RadioButton::layout(const Clay_ElementId& id, const std::function<bool()>&
|
|||
}
|
||||
|
||||
void RadioButton::update() {
|
||||
if(smooth_two_way_time(hoverAnimation, gui.io.deltaTime, mouseHovering, RADIOBUTTON_ANIMATION_TIME))
|
||||
if(smooth_two_way_animation_time_check_for_change(hoverAnimation, gui.io.deltaTime, mouseHovering, RADIOBUTTON_ANIMATION_TIME))
|
||||
gui.invalidate_draw_element(this);
|
||||
if(oldIsTicked != isTicked()) {
|
||||
gui.invalidate_draw_element(this);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue