fix ui scaling and alarm sound

This commit is contained in:
RandomityGuy 2022-12-22 20:57:34 +05:30
parent cb3e452db6
commit bb9f59e7a8
2 changed files with 6 additions and 1 deletions

View file

@ -1308,11 +1308,16 @@ class MarbleWorld extends Scheduler {
if (timeTravelSound == null) {
var ttsnd = ResourceLoader.getResource("data/sound/timetravelactive.wav", ResourceLoader.getAudio, this.soundResources);
timeTravelSound = AudioManager.playSound(ttsnd, null, true);
if (alarmSound != null)
alarmSound.pause = true;
}
} else {
if (timeTravelSound != null) {
timeTravelSound.stop();
timeTravelSound = null;
if (alarmSound != null)
alarmSound.pause = false;
}
if (this.timeState.currentAttemptTime >= 3.5) {
this.timeState.gameplayClock += dt;

View file

@ -346,7 +346,7 @@ class Settings {
#if hl
Window.getInstance().resize(optionsSettings.screenWidth, optionsSettings.screenHeight);
Window.getInstance().displayMode = optionsSettings.isFullScreen ? FullscreenResize : Windowed;
uiScale = Window.getInstance().windowToPixelRatio;
uiScale = 1 / Window.getInstance().windowToPixelRatio;
#end
#if js
Window.getInstance().propagateKeyEvents = true;