Skip to content

Commit

Permalink
Fix mouse input not updating deferred slider while in dimmed mode
Browse files Browse the repository at this point in the history
  • Loading branch information
ZenithMDC committed Dec 1, 2024
1 parent 256e350 commit 386a0a4
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/game/menuitem.c
Original file line number Diff line number Diff line change
Expand Up @@ -2481,9 +2481,14 @@ bool menuitemSliderTick(struct menuitem *item, struct menudialog *dialog, struct
index = item->param3;
}
if (item->handler) {
item->handler(MENUOP_GET, item, &handlerdata);
handlerdata.slider.value = index;
item->handler(MENUOP_SET, item, &handlerdata);
if ((item->flags & MENUITEMFLAG_SLIDER_DEFERRED) &&
(tickflags & MENUTICKFLAG_DIALOGISDIMMED)) {
deferredindex = index;
} else {
item->handler(MENUOP_GET, item, &handlerdata);
handlerdata.slider.value = index;
item->handler(MENUOP_SET, item, &handlerdata);
}
}
return true;
}
Expand Down

0 comments on commit 386a0a4

Please sign in to comment.