Menus/Options: align moving button with menu scroll

This commit is contained in:
James R 2023-12-29 07:22:14 -08:00
parent 91452fcfed
commit f1b4444395

View file

@ -4129,8 +4129,9 @@ void M_DrawOptionsMovingButton(void)
patch_t *butt = W_CachePatchName("OPT_BUTT", PU_CACHE);
UINT8 *c = R_GetTranslationColormap(TC_RAINBOW, SKINCOLOR_PLAGUE, GTC_CACHE);
fixed_t t = M_DueFrac(optionsmenu.topt_start, M_OPTIONS_OFSTIME);
fixed_t tx = Easing_OutQuad(t, optionsmenu.optx * FRACUNIT, optionsmenu.toptx * FRACUNIT);
fixed_t ty = Easing_OutQuad(t, optionsmenu.opty * FRACUNIT, optionsmenu.topty * FRACUNIT);
fixed_t z = Easing_OutSine(M_DueFrac(optionsmenu.offset.start, M_OPTIONS_OFSTIME), optionsmenu.offset.dist * FRACUNIT, 0);
fixed_t tx = Easing_OutQuad(t, optionsmenu.optx * FRACUNIT, optionsmenu.toptx * FRACUNIT) + z;
fixed_t ty = Easing_OutQuad(t, optionsmenu.opty * FRACUNIT, optionsmenu.topty * FRACUNIT) + z;
V_DrawFixedPatch(tx, ty, FRACUNIT, 0, butt, c);