Added debug setting to reduce animation speed.

This commit is contained in:
flash 2024-04-21 19:15:38 +00:00
parent a3421af127
commit 7974325eea
3 changed files with 14 additions and 0 deletions

View file

@ -49,6 +49,9 @@ const MamiAnimate = info => {
easing = MamiEasings.linear;
}
if(typeof window.mami?.settings?.get === 'function')
duration *= mami.settings.get('dbgAnimDurationMulti');
let tStart, tLast,
cancel = false,
tRawCompletion = 0,

View file

@ -126,6 +126,7 @@ window.Umi = { UI: {} };
settings.define('dumpEvents').default(FUTAMI_DEBUG).create();
settings.define('marqueeAllNames').default(false).create();
settings.define('tmpDisableOldThemeSys').default(false).critical().create();
settings.define('dbgAnimDurationMulti').default(1).min(0).max(10).create();
const noNotifSupport = !('Notification' in window);
settings.define('enableNotifications').default(false).immutable(noNotifSupport).critical().create();

View file

@ -399,6 +399,11 @@ Umi.UI.Settings = (function() {
title: 'Disable Old Theme System',
type: 'checkbox',
},
{
name: 'dbgAnimDurationMulti',
title: 'Animation multiplier',
type: 'range',
},
{
title: 'Test kick/ban notice',
type: 'button',
@ -475,6 +480,11 @@ Umi.UI.Settings = (function() {
if(!input.disabled && setting.immutable)
input.disabled = true;
if(setting.min !== undefined)
input.min = setting.min;
if(setting.max !== undefined)
input.max = setting.max;
if(display.type === 'checkbox') {
mami.settings.watch(setting.name, ev => input.checked = ev.detail.value);
input.addEventListener('change', () => {