pixi-rainman-game-engine 0.3.22 → 0.3.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/SettingsUI/components/VolumeSettings/index.jsx +2 -4
- package/dist/application/ButtonsEventManager/ButtonsEventManager.js +5 -0
- package/dist/controllers/AbstractController.js +2 -0
- package/dist/stores/SettingsStore.d.ts +1 -0
- package/dist/stores/SettingsStore.js +1 -0
- package/dist/utils/common/functions.js +3 -0
- package/package.json +1 -1
|
@@ -6,9 +6,6 @@ import React from "react";
|
|
|
6
6
|
import { SoundManager } from "../../../application";
|
|
7
7
|
import { RainMan } from "../../../Rainman";
|
|
8
8
|
import { useStores } from "../../hooks";
|
|
9
|
-
const onBeforeChange = () => {
|
|
10
|
-
RainMan.settingsStore.flipSoundsEnabled();
|
|
11
|
-
};
|
|
12
9
|
const onChange = (newVolumeLevel) => {
|
|
13
10
|
RainMan.settingsStore.setVolumeLevel(newVolumeLevel);
|
|
14
11
|
};
|
|
@@ -18,6 +15,7 @@ const onAfterChange = (newVolumeLevel) => {
|
|
|
18
15
|
SoundManager.pauseAll();
|
|
19
16
|
}
|
|
20
17
|
else {
|
|
18
|
+
RainMan.settingsStore.wasVolumeChanged = true;
|
|
21
19
|
SoundManager.resumeAll();
|
|
22
20
|
}
|
|
23
21
|
};
|
|
@@ -39,7 +37,7 @@ export const VolumeSettings = observer(() => {
|
|
|
39
37
|
backgroundColor: COLOR,
|
|
40
38
|
height: "5px",
|
|
41
39
|
borderRadius: "1px"
|
|
42
|
-
}}
|
|
40
|
+
}} onChange={onChange} onAfterChange={onAfterChange}/>
|
|
43
41
|
<p className="volume-control__text" style={{
|
|
44
42
|
color: COLOR
|
|
45
43
|
}}>
|
|
@@ -221,6 +221,11 @@ export class ButtonsEventManager {
|
|
|
221
221
|
initVolumeButtonEvent() {
|
|
222
222
|
RainMan.settingsStore.setUpdateVolumeButtonTexture(() => RainMan.componentRegistry.get(VolumeButton.registryName).changeTextureDependOnVolume());
|
|
223
223
|
RainMan.componentRegistry.get(VolumeButton.registryName).setOnClick(() => {
|
|
224
|
+
if (RainMan.settingsStore.wasVolumeChanged === true) {
|
|
225
|
+
this.handleModalInvocation(UI_ITEMS.volume);
|
|
226
|
+
RainMan.settingsStore.wasVolumeChanged = false;
|
|
227
|
+
return;
|
|
228
|
+
}
|
|
224
229
|
RainMan.settingsStore.flipSoundsEnabled();
|
|
225
230
|
if (RainMan.settingsStore.isSoundEnabled()) {
|
|
226
231
|
if (RainMan.settingsStore.shouldPlayAmbientMusic) {
|
|
@@ -112,6 +112,7 @@ export class AbstractController {
|
|
|
112
112
|
this.buttonsEventManager.initFreeSpinModal();
|
|
113
113
|
this.buttonsEventManager.setUpUIElementsInteractivity();
|
|
114
114
|
this.buttonsEventManager.setConfirmAutoplayButton(() => {
|
|
115
|
+
this.quickStopController.speedPopupDisabled = true;
|
|
115
116
|
if (RainMan.settingsStore.isAutoplayEnabled) {
|
|
116
117
|
return;
|
|
117
118
|
}
|
|
@@ -846,6 +847,7 @@ export class AbstractController {
|
|
|
846
847
|
* @returns {void}
|
|
847
848
|
*/
|
|
848
849
|
disableAutoplay() {
|
|
850
|
+
this.quickStopController.speedPopupDisabled = false;
|
|
849
851
|
this.autoSpinBalance = 0;
|
|
850
852
|
RainMan.componentRegistry.get(MessageBox.registryName).hideAutoSpinText();
|
|
851
853
|
RainMan.componentRegistry.get(AutoplayButton.registryName).activate(false);
|
|
@@ -44,6 +44,7 @@ export declare class SettingsStore {
|
|
|
44
44
|
howManyAutoSpinsLeft: number;
|
|
45
45
|
freeSpinBuyTable: Record<number, number>;
|
|
46
46
|
volumeLevel: number;
|
|
47
|
+
wasVolumeChanged: boolean;
|
|
47
48
|
popupPaytablePosition?: Point;
|
|
48
49
|
popupPaytableData?: PaytableData[];
|
|
49
50
|
currentSpeed: SpeedLevel;
|
|
@@ -48,6 +48,7 @@ export class SettingsStore {
|
|
|
48
48
|
howManyAutoSpinsLeft = INITIAL_AUTO_SPIN_COUNT;
|
|
49
49
|
freeSpinBuyTable = {};
|
|
50
50
|
volumeLevel = Number(getFromLocalStorage(LOCAL_STORAGE.volumeLevel, 100));
|
|
51
|
+
wasVolumeChanged = false;
|
|
51
52
|
popupPaytablePosition;
|
|
52
53
|
popupPaytableData;
|
|
53
54
|
currentSpeed = "slow";
|
|
@@ -68,6 +68,9 @@ export const hideLayerIfPresent = (elementsToSkip = []) => {
|
|
|
68
68
|
if (element.style.display !== "none") {
|
|
69
69
|
anyHidden = true;
|
|
70
70
|
}
|
|
71
|
+
if (RainMan.settingsStore.wasVolumeChanged === true) {
|
|
72
|
+
RainMan.settingsStore.wasVolumeChanged = false;
|
|
73
|
+
}
|
|
71
74
|
element.style.display = "none";
|
|
72
75
|
});
|
|
73
76
|
return anyHidden;
|
package/package.json
CHANGED