pixi-rainman-game-engine 0.3.13 → 0.3.14
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/SpeedSettingsPopup/speedSettingsPopup.css +2 -2
- package/dist/application/ButtonsEventManager/ButtonsEventManager.d.ts +5 -0
- package/dist/application/ButtonsEventManager/ButtonsEventManager.js +15 -0
- package/dist/controllers/AbstractController.js +4 -3
- package/dist/stores/SettingsStore.d.ts +1 -0
- package/dist/stores/SettingsStore.js +1 -0
- package/package.json +1 -1
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
width: 80vw;
|
|
77
77
|
height: 50vh;
|
|
78
78
|
left: 10vw;
|
|
79
|
-
top:
|
|
79
|
+
top: 10vh;
|
|
80
80
|
}
|
|
81
81
|
|
|
82
82
|
.speed-settings-popup__title {
|
|
@@ -134,7 +134,7 @@
|
|
|
134
134
|
width: 80vw;
|
|
135
135
|
height: 50vh;
|
|
136
136
|
left: 10vw;
|
|
137
|
-
top:
|
|
137
|
+
top: 10vh;
|
|
138
138
|
}
|
|
139
139
|
|
|
140
140
|
.speed-settings-popup__title {
|
|
@@ -173,6 +173,11 @@ export declare class ButtonsEventManager {
|
|
|
173
173
|
* @param {string} activeLayerName - name of the layer that should remain open
|
|
174
174
|
*/
|
|
175
175
|
private closeOtherModals;
|
|
176
|
+
/**
|
|
177
|
+
* Function for closing currently open modal
|
|
178
|
+
* @returns {void}
|
|
179
|
+
*/
|
|
180
|
+
private closeCurrentlyOpenModal;
|
|
176
181
|
/**
|
|
177
182
|
* Function for checking if any layer is present except the one with given name
|
|
178
183
|
* @param {string} layerName - name of layer to check
|
|
@@ -75,6 +75,7 @@ export class ButtonsEventManager {
|
|
|
75
75
|
RainMan.settingsStore.setSpeedPopupVisibility = this.setSpeedPopupVisibility.bind(this);
|
|
76
76
|
RainMan.settingsStore.enableButtons = this.enableButtons.bind(this);
|
|
77
77
|
RainMan.settingsStore.closeOtherModals = this.closeOtherModals.bind(this);
|
|
78
|
+
RainMan.settingsStore.closeCurrentlyOpenModal = this.closeCurrentlyOpenModal.bind(this);
|
|
78
79
|
}
|
|
79
80
|
/**
|
|
80
81
|
* Method for initializing events in Settings UI
|
|
@@ -381,6 +382,7 @@ export class ButtonsEventManager {
|
|
|
381
382
|
if (layer !== null) {
|
|
382
383
|
if (layer.style.display !== "flex") {
|
|
383
384
|
layer.style.display = "flex";
|
|
385
|
+
this.lastLayerInvoked = layerName;
|
|
384
386
|
}
|
|
385
387
|
else {
|
|
386
388
|
layer.style.display = "none";
|
|
@@ -402,6 +404,19 @@ export class ButtonsEventManager {
|
|
|
402
404
|
}
|
|
403
405
|
}
|
|
404
406
|
}
|
|
407
|
+
/**
|
|
408
|
+
* Function for closing currently open modal
|
|
409
|
+
* @returns {void}
|
|
410
|
+
*/
|
|
411
|
+
closeCurrentlyOpenModal() {
|
|
412
|
+
if (this.lastLayerInvoked === "")
|
|
413
|
+
return;
|
|
414
|
+
const layer = window.document.getElementById(this.lastLayerInvoked);
|
|
415
|
+
if (layer !== null && layer.style.display === "flex") {
|
|
416
|
+
layer.style.display = "none";
|
|
417
|
+
this.lastLayerInvoked = "";
|
|
418
|
+
}
|
|
419
|
+
}
|
|
405
420
|
/**
|
|
406
421
|
* Function for checking if any layer is present except the one with given name
|
|
407
422
|
* @param {string} layerName - name of layer to check
|
|
@@ -287,7 +287,7 @@ export class AbstractController {
|
|
|
287
287
|
}
|
|
288
288
|
RainMan.componentRegistry.get(SpeedControlButton.registryName).setOnClick(() => {
|
|
289
289
|
this.quickStopController.speedPopupDisabled = true;
|
|
290
|
-
RainMan.settingsStore.
|
|
290
|
+
RainMan.settingsStore.closeCurrentlyOpenModal?.();
|
|
291
291
|
RainMan.componentRegistry.nextSpeedLevel();
|
|
292
292
|
this.uiController.messageBox.updateIncentiveText(sample(i18next.t("idleMessages", { returnObjects: true })[RainMan.componentRegistry.getSpeedLevel()]));
|
|
293
293
|
});
|
|
@@ -319,14 +319,14 @@ export class AbstractController {
|
|
|
319
319
|
return;
|
|
320
320
|
}
|
|
321
321
|
this.uiController.updateBet("increase");
|
|
322
|
-
RainMan.settingsStore.
|
|
322
|
+
RainMan.settingsStore.closeCurrentlyOpenModal?.();
|
|
323
323
|
});
|
|
324
324
|
RainMan.componentRegistry.get(BUTTONS.neg).setOnClick(() => {
|
|
325
325
|
if (isFreeSpinsBought || isFreeSpinsPlayEnabled || betChangeDisabled) {
|
|
326
326
|
return;
|
|
327
327
|
}
|
|
328
328
|
this.uiController.updateBet("decrease");
|
|
329
|
-
RainMan.settingsStore.
|
|
329
|
+
RainMan.settingsStore.closeCurrentlyOpenModal?.();
|
|
330
330
|
});
|
|
331
331
|
}
|
|
332
332
|
/**
|
|
@@ -626,6 +626,7 @@ export class AbstractController {
|
|
|
626
626
|
handleSpinLogic() {
|
|
627
627
|
this.handleDisablingButtons(true);
|
|
628
628
|
RainMan.globals.shouldShowModals = false;
|
|
629
|
+
RainMan.settingsStore.closeCurrentlyOpenModal?.();
|
|
629
630
|
this.columnsContainer.clearQuickReelsStop();
|
|
630
631
|
if (this.mainContainer.freeSpinPlate) {
|
|
631
632
|
if (this.mainContainer.freeSpinPlate.shownAt === null ||
|
|
@@ -55,6 +55,7 @@ export declare class SettingsStore {
|
|
|
55
55
|
updateVolumeButtonTexture?: () => void;
|
|
56
56
|
handleModalInvocation?: (layerId: string) => void;
|
|
57
57
|
closeOtherModals?: (layerId: string) => void;
|
|
58
|
+
closeCurrentlyOpenModal?: () => void;
|
|
58
59
|
handleInvokeFreeSpinPlate?: (freeSpinAmount: number, isAdditionalFreeSpin: boolean) => Promise<void>;
|
|
59
60
|
increaseBet?: () => void;
|
|
60
61
|
decreaseBet?: () => void;
|
package/package.json
CHANGED