pixi-rainman-game-engine 0.1.18 → 0.1.19

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.
Files changed (34) hide show
  1. package/dist/SettingsUI/SystemSettings/SystemSettingsComponent.jsx +2 -2
  2. package/dist/SettingsUI/SystemSettings/systemSettings.css +6 -0
  3. package/dist/SettingsUI/components/Bet/BetControls.d.ts +5 -0
  4. package/dist/SettingsUI/components/Bet/BetControls.jsx +22 -0
  5. package/dist/SettingsUI/components/Bet/bet.css +40 -7
  6. package/dist/SettingsUI/components/Bet/index.d.ts +5 -1
  7. package/dist/SettingsUI/components/Bet/index.jsx +10 -16
  8. package/dist/SettingsUI/components/CloseModalButton/closeModalButton.css +1 -1
  9. package/dist/SettingsUI/components/SymbolMultiplierPopup/index.jsx +3 -23
  10. package/dist/SettingsUI/components/SymbolMultiplierPopup/symbolPopup.css +24 -19
  11. package/dist/SettingsUI/hooks/index.d.ts +1 -0
  12. package/dist/SettingsUI/hooks/index.js +1 -0
  13. package/dist/SettingsUI/hooks/useDeviceOrientations.d.ts +2 -0
  14. package/dist/SettingsUI/hooks/useDeviceOrientations.js +14 -0
  15. package/dist/SettingsUI/index.css +4 -0
  16. package/dist/SettingsUI/index.jsx +4 -1
  17. package/dist/application/setup.js +2 -1
  18. package/dist/components/AbstractMainContainer/AbstractMainContainer.d.ts +1 -1
  19. package/dist/components/buttons/BaseButton/BaseButton.js +1 -0
  20. package/dist/components/buttons/default/AutoplayButton.js +2 -0
  21. package/dist/components/buttons/default/InfoButton.js +1 -0
  22. package/dist/components/buttons/default/MoreButton.js +1 -0
  23. package/dist/components/buttons/default/PlusButton.js +1 -0
  24. package/dist/components/buttons/default/RefreshButton.js +2 -0
  25. package/dist/components/dictionary/locales/en.json +2 -1
  26. package/dist/components/frame/AbstractFrame.js +1 -0
  27. package/dist/components/symbols/AbstractSymbolsColumn.js +1 -1
  28. package/dist/controllers/AbstractController.js +16 -18
  29. package/dist/controllers/UiController.js +5 -1
  30. package/dist/utils/common/screenHelpers.d.ts +1 -0
  31. package/dist/utils/common/screenHelpers.js +3 -0
  32. package/dist/utils/common/uiItems.d.ts +2 -1
  33. package/dist/utils/common/uiItems.js +1 -0
  34. package/package.json +1 -1
@@ -2,7 +2,7 @@ import "./systemSettings.css";
2
2
  import i18next from "i18next";
3
3
  import React from "react";
4
4
  import { UI_ITEMS } from "../../utils";
5
- import { BetComponent, CloseModalButton, UXSettings } from "../components";
5
+ import { BetSettings, CloseModalButton, UXSettings } from "../components";
6
6
  export const SystemSettingsComponent = () => {
7
7
  return (<div className="settings">
8
8
  <div className="settings__title">
@@ -10,7 +10,7 @@ export const SystemSettingsComponent = () => {
10
10
  </div>
11
11
  <CloseModalButton layerId={UI_ITEMS.settings}/>
12
12
  <div className="settings__column">
13
- <BetComponent />
13
+ <BetSettings className="bet-desktop__container"/>
14
14
  <UXSettings />
15
15
  </div>
16
16
  </div>);
@@ -33,3 +33,9 @@
33
33
  flex-direction: column-reverse;
34
34
  }
35
35
  }
36
+
37
+ @media only screen and (max-width: 900px) {
38
+ .bet-desktop__container {
39
+ display: none;
40
+ }
41
+ }
@@ -0,0 +1,5 @@
1
+ import "./bet.css";
2
+ import React from "react";
3
+ export declare const BetControls: (() => React.JSX.Element) & {
4
+ displayName: string;
5
+ };
@@ -0,0 +1,22 @@
1
+ import "./bet.css";
2
+ import i18next from "i18next";
3
+ import { observer } from "mobx-react-lite";
4
+ import React from "react";
5
+ import { useStores } from "../../hooks";
6
+ export const BetControls = observer(() => {
7
+ const { settingStore } = useStores();
8
+ return (<div className="bet-container">
9
+ <h2>{i18next.t("totalBet")}</h2>
10
+ <div className="bet-container__controls">
11
+ <button name="bet-minus" className="bet-container__button">
12
+ -
13
+ </button>
14
+ <div className="bet-container__value">
15
+ <p>{settingStore.betText}</p>
16
+ </div>
17
+ <button name="bet-plus" className="bet-container__button">
18
+ +
19
+ </button>
20
+ </div>
21
+ </div>);
22
+ });
@@ -4,7 +4,6 @@
4
4
  align-items: center;
5
5
  justify-content: center;
6
6
  width: 50%;
7
- height: 150px;
8
7
  margin: 0px 30px;
9
8
  }
10
9
 
@@ -38,6 +37,8 @@
38
37
  }
39
38
 
40
39
  .bet-container h2 {
40
+ text-align: center;
41
+ color: white;
41
42
  text-transform: uppercase;
42
43
  }
43
44
 
@@ -53,19 +54,51 @@
53
54
  }
54
55
 
55
56
  @media only screen and (max-width: 900px) {
57
+ #bet-layer.modal {
58
+ width: 90vw;
59
+ height: fit-content;
60
+ top: 40vh;
61
+ left: 5vw;
62
+ }
63
+
64
+ #bet-layer.modal-style {
65
+ padding-inline: 1vw;
66
+ padding-block: 1vh;
67
+ }
68
+
69
+ .bet-container {
70
+ display: flex;
71
+ flex-direction: column;
72
+ width: 100%;
73
+ }
74
+
56
75
  .bet-container__value {
57
- width: 70px;
58
- height: 30px;
76
+ width: 100px;
77
+ height: 60px;
78
+ }
79
+
80
+ .bet-container h2 {
81
+ color: #ec5e27;
59
82
  }
60
83
 
61
84
  .bet-container__value p {
62
- font-size: 12px;
85
+ font-size: 24px;
63
86
  }
64
87
 
65
88
  .bet-container__button {
66
- height: 32px;
67
- width: 32px;
68
- font-size: 20px;
89
+ height: 64px;
90
+ width: 64px;
91
+ font-size: 32px;
69
92
  padding: 0px;
70
93
  }
71
94
  }
95
+
96
+ @media only screen and (orientation: landscape) {
97
+ #bet-layer.modal {
98
+ top: 25vh;
99
+ }
100
+
101
+ .bet-container {
102
+ padding-block: 2vh;
103
+ }
104
+ }
@@ -1,5 +1,9 @@
1
1
  import "./bet.css";
2
2
  import React from "react";
3
- export declare const BetComponent: (() => React.JSX.Element) & {
3
+ type BetSettingsProps = {
4
+ className?: string;
5
+ };
6
+ export declare const BetSettings: (({ className }: BetSettingsProps) => React.JSX.Element) & {
4
7
  displayName: string;
5
8
  };
9
+ export {};
@@ -1,21 +1,15 @@
1
1
  import "./bet.css";
2
2
  import { observer } from "mobx-react-lite";
3
3
  import React from "react";
4
- import { useStores } from "../../hooks";
5
- export const BetComponent = observer(() => {
6
- const { settingStore } = useStores();
7
- return (<div className="bet-container">
8
- <h2>Total bet</h2>
9
- <div className="bet-container__controls">
10
- <button name="bet-minus" className="bet-container__button">
11
- -
12
- </button>
13
- <div className="bet-container__value">
14
- <p>{settingStore.betText}</p>
15
- </div>
16
- <button name="bet-plus" className="bet-container__button">
17
- +
18
- </button>
19
- </div>
4
+ import { UI_ITEMS } from "../../../utils";
5
+ import { useDeviceOrientations } from "../../hooks";
6
+ import { CloseModalButton } from "../CloseModalButton";
7
+ import { BetControls } from "./BetControls";
8
+ export const BetSettings = observer(({ className }) => {
9
+ const allClassNames = className ? `bet-container ${className}` : "bet-container";
10
+ const deviceOrientation = useDeviceOrientations();
11
+ return (<div className={allClassNames}>
12
+ {deviceOrientation.includes("mobile") ? <CloseModalButton layerId={UI_ITEMS.bet}/> : null}
13
+ <BetControls />
20
14
  </div>);
21
15
  });
@@ -14,7 +14,7 @@
14
14
 
15
15
  @media only screen and (max-width: 900px) {
16
16
  .close-modal-button {
17
- right: -10px;
17
+ right: 20px;
18
18
  top: 10px;
19
19
  }
20
20
  }
@@ -3,7 +3,6 @@ import { observer } from "mobx-react-lite";
3
3
  import React from "react";
4
4
  import { MoneyText } from "../../../Money";
5
5
  import { RainMan } from "../../../Rainman";
6
- import { getDeviceOrientation } from "../../../utils";
7
6
  import { useStores } from "../../hooks";
8
7
  const getPaytableValueDetails = (paytableValue, bet) => {
9
8
  if (typeof paytableValue === "number") {
@@ -20,29 +19,10 @@ export const SymbolMultiplierPopup = observer(() => {
20
19
  const { settingStore } = useStores();
21
20
  const { popupPaytablePosition, popupPaytableData } = settingStore;
22
21
  if (popupPaytablePosition && popupPaytableData) {
23
- const deviceOrientation = getDeviceOrientation();
24
22
  const arrowDirection = popupPaytablePosition.x > RainMan.app.screen.width / 2 ? "arrow-on-right" : "arrow-on-left";
25
- let destinationX = popupPaytablePosition.x;
26
- let destinationY = popupPaytablePosition.y;
27
- switch (deviceOrientation) {
28
- case "pc":
29
- destinationX += arrowDirection === "arrow-on-left" ? 80 : -250;
30
- destinationY -= 80;
31
- break;
32
- case "mobile-landscape":
33
- destinationX += arrowDirection === "arrow-on-left" ? 60 : -150;
34
- destinationY -= arrowDirection === "arrow-on-left" ? 28 : 28;
35
- break;
36
- case "mobile-portrait":
37
- destinationX += arrowDirection === "arrow-on-left" ? 60 : -150;
38
- destinationY -= arrowDirection === "arrow-on-left" ? 40 : 40;
39
- break;
40
- default:
41
- break;
42
- }
43
- return (<div className="symbol-multiplier-popup-modal modal-style" style={{
44
- left: destinationX,
45
- top: destinationY,
23
+ return (<div className={`symbol-multiplier-popup-modal modal-style ${arrowDirection}`} style={{
24
+ left: popupPaytablePosition.x,
25
+ top: popupPaytablePosition.y,
46
26
  }}>
47
27
  <div className={`symbol-popup ${arrowDirection}`}>
48
28
  {popupPaytableData.map((popupPaytableRow) => {
@@ -1,12 +1,18 @@
1
1
  .symbol-multiplier-popup-modal {
2
- width: 180px;
3
- height: 140px;
4
2
  align-items: center;
5
3
  justify-content: center;
4
+ padding: 20px 25px;
5
+ }
6
+
7
+ .symbol-multiplier-popup-modal.arrow-on-left {
8
+ transform: translate(75px, -50%);
9
+ }
10
+
11
+ .symbol-multiplier-popup-modal.arrow-on-right {
12
+ transform: translate(calc(-100% - 75px), -50%);
6
13
  }
7
14
 
8
15
  .symbol-popup {
9
- position: absolute;
10
16
  display: flex;
11
17
  flex-direction: column;
12
18
  width: 100%;
@@ -20,10 +26,11 @@
20
26
  position: absolute;
21
27
  display: block;
22
28
  background: url("/assets/settings/symbol-pointer.png");
23
- top: 45%;
24
- right: 105%;
29
+ top: 50%;
30
+ right: 100%;
25
31
  height: 25px;
26
32
  width: 25px;
33
+ transform: translateY(-50%);
27
34
  }
28
35
 
29
36
  .symbol-popup.arrow-on-right::after {
@@ -32,7 +39,7 @@
32
39
  display: block;
33
40
  background: url("/assets/settings/symbol-pointer.png");
34
41
  top: 50%;
35
- left: 105%;
42
+ left: 100%;
36
43
  height: 25px;
37
44
  width: 25px;
38
45
  transform: translate(0, -50%) rotate(180deg);
@@ -49,7 +56,7 @@
49
56
  .symbol-popup__prefix {
50
57
  font-size: 25px;
51
58
  color: #ec5e27;
52
- margin: 0px 0px 0px 0px;
59
+ margin: 0;
53
60
  font-weight: 500;
54
61
  }
55
62
 
@@ -58,24 +65,24 @@
58
65
  font-weight: 500;
59
66
  text-align: left;
60
67
  margin-left: 20px;
68
+ white-space: nowrap;
61
69
  }
62
70
 
63
71
  .symbol-popup__value--range {
64
72
  display: flex;
65
73
  flex-direction: column;
66
- font-size: 20px;
74
+ font-size: 0.8em;
67
75
  font-weight: 400;
68
76
  margin-left: 20px;
69
77
  margin-bottom: 10px;
70
78
  text-align: left;
71
79
  }
72
80
 
73
- @media only screen and (max-width: 900px) {
74
- .symbol-multiplier-popup-modal {
75
- width: 90px;
76
- height: 70px;
77
- }
81
+ .symbol-popup__value--range > div {
82
+ white-space: nowrap;
83
+ }
78
84
 
85
+ @media only screen and (max-width: 900px) {
79
86
  .symbol-popup__prefix {
80
87
  font-size: 15px;
81
88
  }
@@ -84,13 +91,11 @@
84
91
  font-size: 15px;
85
92
  }
86
93
 
87
- .symbol-popup.arrow-on-right::after {
88
- top: 50%;
89
- left: 105%;
94
+ .symbol-multiplier-popup-modal.arrow-on-left {
95
+ transform: translate(50px, -50%);
90
96
  }
91
97
 
92
- .symbol-popup.arrow-on-left::after {
93
- top: 32%;
94
- right: 100%;
98
+ .symbol-multiplier-popup-modal.arrow-on-right {
99
+ transform: translate(calc(-100% - 50px), -50%);
95
100
  }
96
101
  }
@@ -1,2 +1,3 @@
1
1
  export * from "./useBuyFreeSpins";
2
+ export * from "./useDeviceOrientations";
2
3
  export * from "./useStore";
@@ -1,2 +1,3 @@
1
1
  export * from "./useBuyFreeSpins";
2
+ export * from "./useDeviceOrientations";
2
3
  export * from "./useStore";
@@ -0,0 +1,2 @@
1
+ import { DeviceOrientation } from "../../utils";
2
+ export declare const useDeviceOrientations: () => DeviceOrientation;
@@ -0,0 +1,14 @@
1
+ import { useEffect, useState } from "react";
2
+ import { getDeviceOrientation } from "../../utils";
3
+ export const useDeviceOrientations = () => {
4
+ const [deviceOrientation, setDeviceOrientation] = useState("pc");
5
+ useEffect(() => {
6
+ const handleOrientationChange = () => setDeviceOrientation(getDeviceOrientation());
7
+ handleOrientationChange();
8
+ window.addEventListener("resize", handleOrientationChange);
9
+ return () => {
10
+ window.removeEventListener("resize", handleOrientationChange);
11
+ };
12
+ }, []);
13
+ return deviceOrientation;
14
+ };
@@ -76,6 +76,10 @@ body {
76
76
  display: none;
77
77
  }
78
78
 
79
+ #bet-layer {
80
+ display: none;
81
+ }
82
+
79
83
  .modal-style {
80
84
  display: flex;
81
85
  position: absolute;
@@ -1,7 +1,7 @@
1
1
  import "./index.css";
2
2
  import React from "react";
3
3
  import { UI_ITEMS } from "../utils";
4
- import { AutoplaySettings, BuyFreeSpinModal, GameRules, SpeedSettingsPopup, SymbolMultiplierPopup, VolumeSettings, } from "./components";
4
+ import { AutoplaySettings, BetSettings, BuyFreeSpinModal, GameRules, SpeedSettingsPopup, SymbolMultiplierPopup, VolumeSettings, } from "./components";
5
5
  import { SystemSettingsComponent } from "./SystemSettings/SystemSettingsComponent";
6
6
  export const SettingsUI = () => {
7
7
  return (<>
@@ -26,5 +26,8 @@ export const SettingsUI = () => {
26
26
  <div id={UI_ITEMS.freeSpin} className="modal modal-style">
27
27
  <BuyFreeSpinModal />
28
28
  </div>
29
+ <div id={UI_ITEMS.bet} className="modal modal-style">
30
+ <BetSettings />
31
+ </div>
29
32
  </>);
30
33
  };
@@ -1,7 +1,7 @@
1
1
  import { createRoot } from "react-dom/client";
2
2
  import { RainMan } from "../Rainman";
3
3
  import { SettingsUI } from "../SettingsUI";
4
- import { changeResolution, getDeviceOrientation, invokeStatsBoard, resizeCanvas, setupFullscreenForIOS, } from "../utils";
4
+ import { changeResolution, disableMagnifyingGlassOnIOS, getDeviceOrientation, invokeStatsBoard, resizeCanvas, setupFullscreenForIOS, } from "../utils";
5
5
  /**
6
6
  * This function is for setup the whole games
7
7
  *
@@ -13,6 +13,7 @@ export const setup = () => {
13
13
  changeResolution(RainMan.settingsStore.HiResolutionFlag);
14
14
  resizeCanvas();
15
15
  setupFullscreenForIOS();
16
+ disableMagnifyingGlassOnIOS();
16
17
  const gameRoot = document.createElement("div");
17
18
  gameRoot.setAttribute("class", "game-container");
18
19
  document.body.appendChild(gameRoot);
@@ -14,7 +14,7 @@ export declare abstract class AbstractMainContainer extends Container {
14
14
  static readonly registryName = "mainContainer";
15
15
  protected bigWinContainer: Nullable<UpdatableSpineContainer>;
16
16
  protected mysteryWinContainer: Nullable<UpdatableSpineContainer>;
17
- private overlay;
17
+ protected overlay: Nullable<Graphics>;
18
18
  messageBox: MessageBox;
19
19
  protected readonly buttonsEventManager: ButtonsEventManager;
20
20
  protected logo: Nullable<Logo>;
@@ -61,6 +61,7 @@ export class BaseButton extends Sprite {
61
61
  .on("mouseover", this._manageStateOver)
62
62
  .on("mouseout", this._manageStateOut)
63
63
  .on("tap", this._onClick)
64
+ .on("touchstart", this._manageStateDown)
64
65
  .on("touchend", this._manageStateUp)
65
66
  .on("pointercancel", this._manageStateUp)
66
67
  .on("touchcancel", this._manageStateUp)
@@ -10,7 +10,9 @@ export class AutoplayButton extends BaseButton {
10
10
  const textureMap = mobile
11
11
  ? {
12
12
  [ButtonStates.NORMAL]: getTexture("mobile/autoplay.png"),
13
+ [ButtonStates.CLICKED]: getTexture("mobile/clicked/autoplay.png"),
13
14
  [ButtonStates.ACTIVE]: getTextureSafely("mobile/autoplay-on.png"),
15
+ [ButtonStates.ACTIVE_CLICKED]: getTextureSafely("mobile/clicked/autoplay-on.png"),
14
16
  }
15
17
  : {
16
18
  [ButtonStates.NORMAL]: getTexture("normal/autoplay.png"),
@@ -6,6 +6,7 @@ export class InfoButton extends BaseButton {
6
6
  const textureMap = mobile
7
7
  ? {
8
8
  [ButtonStates.NORMAL]: getTexture("mobile/info.png"),
9
+ [ButtonStates.CLICKED]: getTexture("mobile/clicked/info.png"),
9
10
  }
10
11
  : {
11
12
  [ButtonStates.NORMAL]: getTexture("normal/info.png"),
@@ -6,6 +6,7 @@ export class MoreButton extends BaseButton {
6
6
  const textureMap = mobile
7
7
  ? {
8
8
  [ButtonStates.NORMAL]: getTexture("mobile/menu.png"),
9
+ [ButtonStates.CLICKED]: getTexture("mobile/clicked/menu.png"),
9
10
  }
10
11
  : {
11
12
  [ButtonStates.NORMAL]: getTexture("normal/menu.png"),
@@ -7,6 +7,7 @@ export class PlusButton extends BaseButton {
7
7
  const textureMap = mobile
8
8
  ? {
9
9
  [ButtonStates.NORMAL]: getTexture("mobile/bet.png"),
10
+ [ButtonStates.CLICKED]: getTexture("mobile/clicked/bet.png"),
10
11
  }
11
12
  : {
12
13
  [ButtonStates.NORMAL]: getTexture("normal/plus.png"),
@@ -13,7 +13,9 @@ export class RefreshButton extends BaseButton {
13
13
  const textureMap = mobile
14
14
  ? {
15
15
  [ButtonStates.NORMAL]: getTexture("mobile/refresh.png"),
16
+ [ButtonStates.CLICKED]: getTexture("mobile/clicked/refresh.png"),
16
17
  [ButtonStates.ACTIVE]: getTexture("mobile/stop.png"),
18
+ [ButtonStates.ACTIVE_CLICKED]: getTexture("mobile/clicked/stop.png"),
17
19
  }
18
20
  : {
19
21
  [ButtonStates.NORMAL]: getTexture("normal/auto-start.png"),
@@ -58,6 +58,7 @@
58
58
  "currentWinGamble": "CURRENT WIN",
59
59
  "gambleToWin": "GAMBLE TO WIN",
60
60
  "doubleTo": "DOUBLE TO",
61
- "collect": "COLLECT"
61
+ "collect": "COLLECT",
62
+ "totalBet": "Total bet"
62
63
  }
63
64
  }
@@ -124,6 +124,7 @@ export class AbstractFrame extends ResumableContainer {
124
124
  this.addChild(this.innerFrame);
125
125
  if (this.mysteryFxHighlight)
126
126
  this.addChild(this.mysteryFxHighlight);
127
+ this.winLineAnimations.forEach((winLineAnimation) => this.addChild(winLineAnimation));
127
128
  this.reposition();
128
129
  }
129
130
  transformedWidth() {
@@ -213,9 +213,9 @@ export class AbstractSymbolsColumn extends Container {
213
213
  }
214
214
  transformations.forEach((transformation) => droppableSymbolsInColumns.setSymbolsToBeDestroyed(transformation.coordinates.y, transformation.symbolId));
215
215
  droppableSymbolsInColumns.calculateSymbolsMovementInTransformation();
216
- SoundManager.play(isStandalone ? SoundTracks.standaloneBoom : SoundTracks.boom);
217
216
  if (!skipAnimation)
218
217
  await droppableSymbolsInColumns.playAnimations();
218
+ SoundManager.play(isStandalone ? SoundTracks.standaloneBoom : SoundTracks.boom);
219
219
  await droppableSymbolsInColumns.destroyAnimations(isStandalone);
220
220
  droppableSymbolsInColumns.moveDestroyedSymbolsToTop(this.tileHeight);
221
221
  droppableSymbolsInColumns.swapDestroyedSymbols();
@@ -1,7 +1,7 @@
1
1
  import i18next from "i18next";
2
2
  import { sample } from "lodash";
3
3
  import { ApiConfig, SoundManager, SoundTracks, SPEED_LEVELS, } from "../application";
4
- import { AbstractFrame, AutoplayButton, BUTTONS, COMPONENTS, FreeSpinButton, MessageBox, SpeedControlButton, } from "../components";
4
+ import { AbstractFrame, AutoplayButton, BUTTONS, COMPONENTS, FreeSpinButton, MessageBox, RefreshButton, SpeedControlButton, } from "../components";
5
5
  import { gamePhases, PossibleWins } from "../constants";
6
6
  import { RainMan } from "../Rainman";
7
7
  import { ceilToDecimal, debugSpinData, debugSymbolsMatchConfiguration, getDeviceOrientation, hideLayerIfPresent, hidePaytable, logGroup, logGroupEnd, logInfo, logWarn, UI_ITEMS, } from "../utils";
@@ -129,11 +129,7 @@ export class AbstractController {
129
129
  }
130
130
  if (getDeviceOrientation().includes("mobile")) {
131
131
  RainMan.componentRegistry.get(BUTTONS.plus).setOnClick(() => {
132
- const nextBet = this.config.getNextBet(RainMan.settingsStore.bet) || 0;
133
- if (nextBet === RainMan.settingsStore.bet)
134
- this.uiController.updateBet("first");
135
- else
136
- this.uiController.updateBet("increase");
132
+ RainMan.settingsStore.handleModalInvocation?.(UI_ITEMS.bet);
137
133
  });
138
134
  return;
139
135
  }
@@ -145,21 +141,23 @@ export class AbstractController {
145
141
  });
146
142
  }
147
143
  initSpinButton() {
148
- RainMan.componentRegistry.get(BUTTONS.refresh).setOnClick(() => this.handleSpinLogic());
149
- RainMan.componentRegistry.get(BUTTONS.refresh).on("touchstart", () => {
150
- if (this.mobileSpinTimeout !== null)
151
- return;
152
- this.mobileSpinTimeout = setInterval(() => this.handleSpinLogic(), RainMan.config.durationOfActions.mobileSpinTimeout);
153
- });
154
- RainMan.componentRegistry.get(BUTTONS.refresh).on("touchend", () => {
144
+ const refreshButton = RainMan.componentRegistry.get(RefreshButton.registryName);
145
+ refreshButton.setOnClick(() => this.handleSpinLogic());
146
+ const clearMobileSpinTimeout = () => {
155
147
  if (!this.mobileSpinTimeout)
156
148
  return;
157
149
  clearInterval(this.mobileSpinTimeout);
158
150
  this.mobileSpinTimeout = null;
151
+ };
152
+ refreshButton.on("touchstart", () => {
153
+ if (this.mobileSpinTimeout !== null)
154
+ return;
155
+ this.mobileSpinTimeout = setInterval(() => this.handleSpinLogic(), RainMan.config.durationOfActions.mobileSpinTimeout);
159
156
  });
160
- RainMan.componentRegistry.get(BUTTONS.refresh).on("touchmove", (event) => {
161
- if (event.target === null && this.mobileSpinTimeout)
162
- clearInterval(this.mobileSpinTimeout);
157
+ refreshButton.on("touchend", () => clearMobileSpinTimeout());
158
+ refreshButton.on("globaltouchmove", (event) => {
159
+ if (event.target !== refreshButton)
160
+ clearMobileSpinTimeout();
163
161
  });
164
162
  }
165
163
  get shouldButtonsBeDisabled() {
@@ -203,7 +201,7 @@ export class AbstractController {
203
201
  newPhase === gamePhases.CONFIGURING_SPIN);
204
202
  }
205
203
  setMessageBoxBasedOnPhase(phase) {
206
- if (RainMan.settingsStore.isFreeSpinsPlayEnabled || RainMan.settingsStore.isLastFreeSpin) {
204
+ if (RainMan.settingsStore.isFreeSpinsPlayEnabled) {
207
205
  this.uiController.messageBox.showCurrentWinText();
208
206
  if (!this.hideFreeSpinsMessageBox)
209
207
  this.uiController.messageBox.showFreeSpinText();
@@ -652,7 +650,7 @@ export class AbstractController {
652
650
  return;
653
651
  if (value === 0)
654
652
  return;
655
- if (RainMan.settingsStore.isFreeSpinsPlayEnabled || RainMan.settingsStore.isLastFreeSpin) {
653
+ if (RainMan.settingsStore.isFreeSpinsPlayEnabled) {
656
654
  this.uiController.updateDisplayedWin(value);
657
655
  }
658
656
  else {
@@ -91,7 +91,7 @@ export class UiController {
91
91
  }
92
92
  updateShownCurrentWin() {
93
93
  this.messageBox.showCurrentWinText();
94
- if (RainMan.settingsStore.isFreeSpinsPlayEnabled || RainMan.settingsStore.isLastFreeSpin) {
94
+ if (RainMan.settingsStore.isFreeSpinsPlayEnabled) {
95
95
  RainMan.componentRegistry.get(MessageBox.currentWinTextRegistryName).set(this.totalFreeSpinWinAmount);
96
96
  return;
97
97
  }
@@ -145,6 +145,10 @@ export class UiController {
145
145
  RainMan.componentRegistry.get(COMPONENTS.creditText).set(this.currentBalance);
146
146
  }
147
147
  setDisplayedCurrentWin() {
148
+ if (RainMan.settingsStore.isFreeSpinsPlayEnabled) {
149
+ RainMan.componentRegistry.get(MessageBox.currentWinTextRegistryName).set(this.totalFreeSpinWinAmount);
150
+ return;
151
+ }
148
152
  RainMan.componentRegistry.get(MessageBox.currentWinTextRegistryName).set(this._recentWin);
149
153
  }
150
154
  }
@@ -3,4 +3,5 @@ export declare const getScreenRatio: () => number;
3
3
  export declare const isMobile: () => boolean;
4
4
  export declare const openFullscreen: () => void;
5
5
  export declare const setupFullscreenForIOS: () => void;
6
+ export declare const disableMagnifyingGlassOnIOS: () => void;
6
7
  export declare const resizeCanvas: () => void;
@@ -59,6 +59,9 @@ export const setupFullscreenForIOS = () => {
59
59
  lastOrientation = currentOrientation;
60
60
  });
61
61
  };
62
+ export const disableMagnifyingGlassOnIOS = () => {
63
+ document.body.addEventListener("touchend", (e) => e.preventDefault(), { passive: false });
64
+ };
62
65
  export const resizeCanvas = () => {
63
66
  const resize = () => {
64
67
  RainMan.app.renderer.resize(window.innerWidth, window.innerHeight);
@@ -6,5 +6,6 @@ export declare const UI_ITEMS: {
6
6
  readonly speedSettings: "speed-settings-layer";
7
7
  readonly symbolPayTable: "symbol-payTable-layer";
8
8
  readonly freeSpin: "free-spin-layer";
9
+ readonly bet: "bet-layer";
9
10
  };
10
- export declare const allUiItems: ("dom-layer" | "volume-layer" | "game-rules-layer" | "autoPlay-settings-layer" | "speed-settings-layer" | "symbol-payTable-layer" | "free-spin-layer")[];
11
+ export declare const allUiItems: ("dom-layer" | "volume-layer" | "game-rules-layer" | "autoPlay-settings-layer" | "speed-settings-layer" | "symbol-payTable-layer" | "free-spin-layer" | "bet-layer")[];
@@ -6,5 +6,6 @@ export const UI_ITEMS = {
6
6
  speedSettings: "speed-settings-layer",
7
7
  symbolPayTable: "symbol-payTable-layer",
8
8
  freeSpin: "free-spin-layer",
9
+ bet: "bet-layer",
9
10
  };
10
11
  export const allUiItems = Object.values(UI_ITEMS);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pixi-rainman-game-engine",
3
- "version": "0.1.18",
3
+ "version": "0.1.19",
4
4
  "description": "This repository contains all of the mechanics that used in rainman games.",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",