pixi-rainman-game-engine 0.1.21 → 0.1.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.
Files changed (63) hide show
  1. package/dist/SettingsUI/SystemSettings/SystemSettingsComponent.d.ts +1 -0
  2. package/dist/SettingsUI/SystemSettings/SystemSettingsComponent.jsx +6 -7
  3. package/dist/SettingsUI/SystemSettings/systemSettings.css +41 -0
  4. package/dist/SettingsUI/components/AutoplaySettings/autoplaySettings.css +267 -0
  5. package/dist/SettingsUI/components/AutoplaySettings/index.d.ts +1 -0
  6. package/dist/SettingsUI/components/AutoplaySettings/index.jsx +38 -26
  7. package/dist/SettingsUI/components/Bet/BetControls.d.ts +1 -0
  8. package/dist/SettingsUI/components/Bet/BetControls.jsx +9 -9
  9. package/dist/SettingsUI/components/Bet/bet.css +115 -0
  10. package/dist/SettingsUI/components/Bet/index.d.ts +1 -0
  11. package/dist/SettingsUI/components/Bet/index.jsx +3 -1
  12. package/dist/SettingsUI/components/BuyFreeSpins/buyFreeSpin.css +46 -0
  13. package/dist/SettingsUI/components/BuyFreeSpins/index.d.ts +1 -0
  14. package/dist/SettingsUI/components/BuyFreeSpins/index.jsx +6 -6
  15. package/dist/SettingsUI/components/CloseModalButton/closeModalButton.css +20 -0
  16. package/dist/SettingsUI/components/CloseModalButton/index.d.ts +1 -0
  17. package/dist/SettingsUI/components/CloseModalButton/index.jsx +3 -3
  18. package/dist/SettingsUI/components/GameRules/gameRules.css +96 -0
  19. package/dist/SettingsUI/components/GameRules/index.d.ts +1 -0
  20. package/dist/SettingsUI/components/GameRules/index.jsx +13 -11
  21. package/dist/SettingsUI/components/OptionButton/index.jsx +1 -1
  22. package/dist/SettingsUI/components/RichLimitingSlider/index.d.ts +1 -0
  23. package/dist/SettingsUI/components/RichLimitingSlider/index.jsx +8 -8
  24. package/dist/SettingsUI/components/RichLimitingSlider/richLimitingSlider.css +39 -0
  25. package/dist/SettingsUI/components/SlidingSwitch/index.d.ts +1 -0
  26. package/dist/SettingsUI/components/SlidingSwitch/index.jsx +5 -4
  27. package/dist/SettingsUI/components/SlidingSwitch/slidingSwitch.css +126 -0
  28. package/dist/SettingsUI/components/SpeedSettingsPopup/index.d.ts +1 -0
  29. package/dist/SettingsUI/components/SpeedSettingsPopup/index.jsx +6 -6
  30. package/dist/SettingsUI/components/SpeedSettingsPopup/speedSettingsPopup.css +119 -0
  31. package/dist/SettingsUI/components/SpeedSwitchButton/index.jsx +5 -6
  32. package/dist/SettingsUI/components/SwitchWithHeader/headerStyle.css +28 -0
  33. package/dist/SettingsUI/components/SwitchWithHeader/index.d.ts +1 -0
  34. package/dist/SettingsUI/components/SwitchWithHeader/index.jsx +6 -5
  35. package/dist/SettingsUI/components/SymbolMultiplierPopup/index.d.ts +2 -1
  36. package/dist/SettingsUI/components/SymbolMultiplierPopup/index.jsx +15 -17
  37. package/dist/SettingsUI/components/SymbolMultiplierPopup/symbolPopup.css +101 -0
  38. package/dist/SettingsUI/components/UXSettings/UXSettings.css +28 -0
  39. package/dist/SettingsUI/components/UXSettings/index.d.ts +1 -0
  40. package/dist/SettingsUI/components/UXSettings/index.jsx +21 -8
  41. package/dist/SettingsUI/components/VolumeSettings/index.d.ts +1 -0
  42. package/dist/SettingsUI/components/VolumeSettings/index.jsx +5 -4
  43. package/dist/SettingsUI/components/VolumeSettings/volume.css +54 -0
  44. package/dist/SettingsUI/hooks/index.d.ts +0 -1
  45. package/dist/SettingsUI/hooks/index.js +0 -1
  46. package/dist/SettingsUI/index.css +26 -46
  47. package/dist/SettingsUI/index.d.ts +1 -1
  48. package/dist/SettingsUI/index.jsx +14 -15
  49. package/dist/components/AbstractMainContainer/AbstractMainContainer.js +0 -3
  50. package/dist/components/symbols/AbstractSymbolsColumn.js +9 -9
  51. package/dist/connectivity/ConnectionWrapper.js +2 -0
  52. package/dist/connectivity/serverConnection.d.ts +1 -0
  53. package/dist/utils/common/functions.js +2 -2
  54. package/package.json +4 -9
  55. package/dist/SettingsUI/components/Button/index.d.ts +0 -2
  56. package/dist/SettingsUI/components/Button/index.jsx +0 -6
  57. package/dist/SettingsUI/components/Modal/index.d.ts +0 -10
  58. package/dist/SettingsUI/components/Modal/index.jsx +0 -24
  59. package/dist/SettingsUI/hooks/useClickOutside.d.ts +0 -6
  60. package/dist/SettingsUI/hooks/useClickOutside.js +0 -20
  61. package/dist/SettingsUI/packedStyles.css +0 -1617
  62. package/dist/SettingsUI/utils/tw.d.ts +0 -2
  63. package/dist/SettingsUI/utils/tw.js +0 -3
@@ -1,2 +1,3 @@
1
+ import "./buyFreeSpin.css";
1
2
  import { ReactElement } from "react";
2
3
  export declare const BuyFreeSpinModal: () => ReactElement;
@@ -1,4 +1,4 @@
1
- import i18next from "i18next";
1
+ import "./buyFreeSpin.css";
2
2
  import React, { useState } from "react";
3
3
  import { Currencies } from "ts-money";
4
4
  import { UI_ITEMS } from "../../../utils";
@@ -10,16 +10,16 @@ export const BuyFreeSpinModal = () => {
10
10
  const freeSpinOptions = useBuyFreeSpinOptions();
11
11
  const currency = Currencies[localStorage.getItem("currency")]?.symbol_native || "$";
12
12
  const clearErrorMessage = () => setErrorMessage("");
13
- return (<div className="flex h-[90%] w-[90%] flex-col items-center justify-center gap-4 px-5">
13
+ return (<div className="buyFreeSpins__container">
14
14
  <CloseModalButton layerId={UI_ITEMS.freeSpin} afterClose={clearErrorMessage}/>
15
- <div className="flex">
16
- <h1 className="text-2xl font-bold text-primary-500">{i18next.t("buyFreeSpins")}</h1>
15
+ <div className="buyFreeSpins__title-container">
16
+ <h1>Buy Free Spins</h1>
17
17
  </div>
18
- <div className="flex items-center justify-between gap-4">
18
+ <div className="buyFreeSpins__buttons-container">
19
19
  {freeSpinOptions.map((option) => (<OptionButton key={option.amount} setMessage={setErrorMessage} option={option} currency={currency}/>))}
20
20
  </div>
21
21
  {errorMessage ? (<div>
22
- <p className="text-center text-2xl text-primary-500">{errorMessage}</p>
22
+ <p className="buyFreeSpins__error-message">{errorMessage}</p>
23
23
  </div>) : null}
24
24
  </div>);
25
25
  };
@@ -0,0 +1,20 @@
1
+ .close-modal-button {
2
+ font-size: 30px;
3
+ color: white;
4
+ position: absolute;
5
+ right: 30px;
6
+ top: 15px;
7
+ background-color: #00000000;
8
+ border-style: none;
9
+ }
10
+
11
+ .close-modal-button:hover {
12
+ color: #ffffff50;
13
+ }
14
+
15
+ @media only screen and (max-width: 900px) {
16
+ .close-modal-button {
17
+ right: 20px;
18
+ top: 10px;
19
+ }
20
+ }
@@ -1,4 +1,5 @@
1
1
  /// <reference types="react" />
2
+ import "./closeModalButton.css";
2
3
  export type CloseModalButtonProps = {
3
4
  layerId: string;
4
5
  afterClose?: () => void;
@@ -1,13 +1,13 @@
1
+ import "./closeModalButton.css";
1
2
  import React from "react";
2
3
  import { useStores } from "../../hooks";
3
- import { Button } from "../Button";
4
4
  export const CloseModalButton = ({ layerId, afterClose }) => {
5
5
  const { settingStore } = useStores();
6
6
  const onClose = () => {
7
7
  settingStore.handleModalInvocation?.(layerId);
8
8
  afterClose?.();
9
9
  };
10
- return (<Button className="absolute right-5 top-2 block border-none text-3xl text-white hover:text-zinc-500 sm:right-8 sm:top-4" onClick={onClose}>
10
+ return (<button className="close-modal-button" onClick={onClose}>
11
11
  x
12
- </Button>);
12
+ </button>);
13
13
  };
@@ -0,0 +1,96 @@
1
+ .game-rules {
2
+ display: flex;
3
+ flex-direction: column;
4
+ align-items: center;
5
+ height: 90%;
6
+ width: 90%;
7
+ }
8
+
9
+ .game-rules__content {
10
+ text-align: justify;
11
+ width: 90%;
12
+ line-height: 20px;
13
+ padding: 10px 20px;
14
+ height: 100%;
15
+ border-bottom-left-radius: 8px;
16
+ border-bottom-right-radius: 8px;
17
+ max-height: 60vh;
18
+ font-size: 20px;
19
+ }
20
+
21
+ .game-rules__container {
22
+ display: inline-block;
23
+ margin-top: 20px;
24
+ }
25
+
26
+ .game-rules__scroll {
27
+ height: 70%;
28
+ }
29
+
30
+ .game-rules__page-control {
31
+ display: flex;
32
+ flex-direction: row;
33
+ height: 50px;
34
+ position: absolute;
35
+ left: 20px;
36
+ bottom: 20px;
37
+ }
38
+
39
+ .page-left {
40
+ background-size: contain;
41
+ background-repeat: no-repeat no-repeat;
42
+ background-image: url("/assets/settings/gameRules/left.png");
43
+ opacity: 1;
44
+ width: 22px;
45
+ height: 100%;
46
+ }
47
+
48
+ .page-middle {
49
+ background-repeat: no-repeat no-repeat;
50
+ background-size: contain;
51
+ background-image: url("/assets/settings/gameRules/cross.png");
52
+ width: 30px;
53
+ height: 100%;
54
+ margin: 0px 10px;
55
+ }
56
+
57
+ .page-right {
58
+ background-repeat: no-repeat no-repeat;
59
+ background-size: contain;
60
+ background-image: url("/assets/settings/gameRules/right.png");
61
+ width: 22px;
62
+ height: 100%;
63
+ }
64
+
65
+ .page-left:hover {
66
+ opacity: 0.5;
67
+ }
68
+
69
+ .page-middle:hover {
70
+ opacity: 0.5;
71
+ }
72
+
73
+ .page-right:hover {
74
+ opacity: 0.5;
75
+ }
76
+
77
+ .rcs-custom-scroll-handle {
78
+ position: absolute;
79
+ right: 10px;
80
+ }
81
+
82
+ .custom-scroll .rcs-inner-handle {
83
+ background-color: inherit;
84
+ background-repeat: no-repeat no-repeat;
85
+ background-size: cover;
86
+ background-image: url("/assets/settings/slider/slidersDot.png");
87
+ width: 20px;
88
+ height: 20px;
89
+ right: 10px;
90
+ }
91
+
92
+ @media only screen and (max-width: 450px) {
93
+ .game-rules__content {
94
+ padding: 10px 20px 10px 5px;
95
+ }
96
+ }
@@ -1,4 +1,5 @@
1
1
  import "react-custom-scroll/dist/customScroll.css";
2
+ import "./gameRules.css";
2
3
  import React from "react";
3
4
  export declare const GameRules: (() => React.JSX.Element) & {
4
5
  displayName: string;
@@ -1,4 +1,5 @@
1
1
  import "react-custom-scroll/dist/customScroll.css";
2
+ import "./gameRules.css";
2
3
  import i18next from "i18next";
3
4
  import { observer } from "mobx-react-lite";
4
5
  import React, { useState } from "react";
@@ -22,20 +23,21 @@ export const GameRules = observer(() => {
22
23
  }
23
24
  setPageNumber(pageNumber + incrementor);
24
25
  };
25
- return (<div className="max-w-5/6 flex h-fit max-h-[80vh] flex-col items-center gap-4 p-5">
26
- <h2 className="text-center text-3xl font-bold text-primary-500">{i18next.t("gameRules")}</h2>
26
+ return (<div className="game-rules">
27
+ <div className="settings__title">
28
+ <h2>{i18next.t("gameRules")}</h2>
29
+ </div>
27
30
  <CloseModalButton layerId={UI_ITEMS.gameRules}/>
28
- <div className="custom-scroll max-w-5/6 h-full min-h-[60vh]">
29
- <CustomScroll className="h-full w-full overflow-y-auto portrait:max-h-[60vh]" allowOuterScroll={true}>
30
- <div className="text-md max-w-5/6 w-full overflow-y-auto landscape:max-h-[30vh]">
31
- {gameRulesContent.pages[pageNumber]}
32
- </div>
31
+
32
+ <div className="game-rules__container custom-scroll">
33
+ <CustomScroll className="game-rules__scroll" allowOuterScroll={true}>
34
+ <div className="game-rules__content">{gameRulesContent.pages[pageNumber]}</div>
33
35
  </CustomScroll>
34
36
  </div>
35
- <div className="flex h-[50px] items-center justify-center gap-2">
36
- <div className="flex h-[24px] w-6 items-center bg-[url('/assets/settings/gameRules/left.png')] bg-contain bg-right bg-no-repeat hover:opacity-50" onClick={() => changePage(-1)}/>
37
- <div className="flex h-[24px] w-6 items-center bg-[url('/assets/settings/gameRules/cross.png')] bg-contain bg-no-repeat hover:opacity-50" onClick={() => settingStore.handleModalInvocation?.(UI_ITEMS.gameRules)}/>
38
- <div className="flex h-[24px] w-6 items-center bg-[url('/assets/settings/gameRules/right.png')] bg-contain bg-no-repeat hover:opacity-50" onClick={() => changePage(1)}/>
37
+ <div className="game-rules__page-control">
38
+ <div className="page-left" onClick={() => changePage(-1)}></div>
39
+ <div className="page-middle" onClick={() => settingStore.handleModalInvocation?.(UI_ITEMS.gameRules)}></div>
40
+ <div className="page-right" onClick={() => changePage(1)}></div>
39
41
  </div>
40
42
  </div>);
41
43
  });
@@ -30,7 +30,7 @@ export const OptionButton = ({ option, currency, setMessage }) => {
30
30
  settingStore.setIsFreeSpinBought(false);
31
31
  }
32
32
  };
33
- return (<div className="flex w-[120px] flex-col items-center justify-center rounded-[8px] bg-primary-900 p-2 hover:cursor-pointer hover:bg-primary-600" key={option.amount} onClick={async () => await onButtonClick(option)}>
33
+ return (<div className="optionButton" key={option.amount} onClick={async () => await onButtonClick(option)}>
34
34
  <p>
35
35
  {i18next.t("amount")}: {option.amount}
36
36
  </p>
@@ -1,4 +1,5 @@
1
1
  import "rc-slider/assets/index.css";
2
+ import "./richLimitingSlider.css";
2
3
  import React from "react";
3
4
  type RichLimitingSliderProps = {
4
5
  value: number;
@@ -1,15 +1,17 @@
1
1
  import "rc-slider/assets/index.css";
2
+ import "./richLimitingSlider.css";
2
3
  import { observer } from "mobx-react-lite";
3
4
  import Slider from "rc-slider";
4
5
  import React from "react";
5
6
  export const RichLimitingSlider = observer(({ value, setValue, maxValue, description }) => {
6
- const handleStyle = { width: "20px", height: "20px", bottom: "-4px" };
7
- return (<div className="flex items-center gap-4 py-4">
7
+ return (<div className="rich-slider">
8
8
  {/* @ts-expect-error type error in library */}
9
- <Slider className="flex w-full flex-col items-center justify-center gap-2 sm:gap-4" step={1} min={0} max={maxValue} defaultValue={value} value={value} handleStyle={{
9
+ <Slider className="rich-slider__slider" step={1} min={0} max={maxValue} defaultValue={value} value={value} handleStyle={{
10
10
  backgroundColor: "#fdf425",
11
11
  borderColor: "#fdf425",
12
- ...handleStyle,
12
+ width: "20px",
13
+ height: "20px",
14
+ bottom: "-4px",
13
15
  }} railStyle={{
14
16
  backgroundColor: "#fff",
15
17
  }} trackStyle={{
@@ -17,10 +19,8 @@ export const RichLimitingSlider = observer(({ value, setValue, maxValue, descrip
17
19
  }} dotStyle={{
18
20
  borderColor: "#fdf425",
19
21
  }} onChange={(value) => setValue(value)}>
20
- <p className="mt-6 self-center pt-4 text-center sm:mt-5 sm:text-xl">{description}</p>
22
+ <p className="rich-slider__description">{description}</p>
21
23
  </Slider>
22
- <div className="flex h-10 w-10 items-center justify-center rounded-xl bg-zinc-800 px-8 py-4 shadow-primary-400/25">
23
- {value}
24
- </div>
24
+ <div className="rich-slider__number">{value}</div>
25
25
  </div>);
26
26
  });
@@ -0,0 +1,39 @@
1
+ .rich-slider {
2
+ display: flex;
3
+ flex-direction: row;
4
+ align-items: center;
5
+ padding-inline: 16px;
6
+ }
7
+
8
+ .rich-slider__slider {
9
+ width: 100%;
10
+ display: flex;
11
+ flex-direction: column;
12
+ align-items: center;
13
+ }
14
+
15
+ .rich-slider__number {
16
+ margin: 10px 0px 10px 10px;
17
+ width: 100px;
18
+ height: 40px;
19
+ border: solid white 2px;
20
+ background-color: black;
21
+ border-radius: 34px;
22
+ font-size: x-large;
23
+ font-weight: bold;
24
+ color: white;
25
+ display: flex;
26
+ justify-content: center;
27
+ align-items: center;
28
+ }
29
+
30
+ .rich-slider__description {
31
+ text-transform: uppercase;
32
+ }
33
+
34
+ @media only screen and (max-width: 650px) {
35
+ .rich-slider__description {
36
+ padding-top: 4px;
37
+ font-size: 9px;
38
+ }
39
+ }
@@ -1,3 +1,4 @@
1
+ import "./slidingSwitch.css";
1
2
  import React from "react";
2
3
  type SlidingSwitchProps = {
3
4
  flag: boolean;
@@ -1,9 +1,10 @@
1
+ import "./slidingSwitch.css";
1
2
  import { observer } from "mobx-react-lite";
2
3
  import React from "react";
3
4
  export const SlidingSwitch = observer(({ flag, setFlag }) => {
4
- return (<label className="relative flex items-center justify-between p-2 text-xl">
5
- {flag ? "ON" : "OFF"}
6
- <input type="checkbox" className="peer absolute left-0 top-0 h-full w-full appearance-none rounded-md" checked={flag} onChange={(event) => setFlag(event.target.checked)}/>
7
- <span className="ml-4 flex h-10 w-16 flex-shrink-0 items-center rounded-full bg-zinc-700 p-1 duration-300 ease-in-out after:h-8 after:w-8 after:rounded-full after:bg-white after:shadow-md after:duration-300 group-hover:after:translate-x-1 peer-checked:bg-primary-400 peer-checked:after:translate-x-6"/>
5
+ return (<label className="switch">
6
+ <span className={`switch-round-box round ${flag ? "switch-round-box--active" : ""}`}/>
7
+ <input type="checkbox" checked={flag} onChange={(event) => setFlag(event.target.checked)}/>
8
+ <p className={`switch__text ${flag ? "switch__text--active" : ""}`}>{flag ? "ON" : "OFF"}</p>
8
9
  </label>);
9
10
  });
@@ -0,0 +1,126 @@
1
+ .switch {
2
+ position: relative;
3
+ display: inline-block;
4
+ width: 80px;
5
+ height: 34px;
6
+ cursor: pointer;
7
+ }
8
+
9
+ .switch input {
10
+ opacity: 0;
11
+ width: 0;
12
+ height: 0;
13
+ }
14
+
15
+ /* The slider */
16
+ .switch-round-box {
17
+ position: absolute;
18
+ cursor: pointer;
19
+ top: 0;
20
+ left: 0;
21
+ right: 0;
22
+ bottom: 0;
23
+ background-color: #00000000;
24
+ border: 2px solid white;
25
+ -webkit-transition: 0.4s;
26
+ transition: 0.4s;
27
+ border-radius: 34px;
28
+ }
29
+
30
+ .turtle-switch-round-box {
31
+ position: absolute;
32
+ cursor: pointer;
33
+ top: 0;
34
+ left: 0;
35
+ right: 0;
36
+ bottom: 0;
37
+ background-color: #00000000;
38
+ border: 2px solid white;
39
+ -webkit-transition: 0.4s;
40
+ transition: 0.4s;
41
+ border-radius: 34px;
42
+ }
43
+
44
+ .turtle-switch__icon {
45
+ position: relative;
46
+ left: 7px;
47
+ top: 7px;
48
+ width: 24px;
49
+ height: 20px;
50
+ }
51
+
52
+ .dot-container {
53
+ position: relative;
54
+ display: flex;
55
+ flex-direction: row;
56
+ width: 36px;
57
+ justify-content: space-between;
58
+ bottom: 10px;
59
+ left: 36px;
60
+ }
61
+
62
+ .white-dot {
63
+ position: relative;
64
+ width: 10px;
65
+ height: 10px;
66
+ border-radius: 50%;
67
+ background-color: #ffffff50;
68
+ }
69
+
70
+ .white-dot--active {
71
+ background-color: #fff;
72
+ }
73
+
74
+ .switch-round-box:before {
75
+ position: absolute;
76
+ content: "";
77
+ height: 26px;
78
+ width: 26px;
79
+ left: 3px;
80
+ top: 2px;
81
+ bottom: 4px;
82
+ right: 4px;
83
+ background-color: white;
84
+ -webkit-transition: 0.4s;
85
+ transition: 0.4s;
86
+ border-radius: 50%;
87
+ }
88
+
89
+ .switch__text {
90
+ margin: 0;
91
+ position: absolute;
92
+ top: 7px;
93
+ right: 9px;
94
+ }
95
+
96
+ .switch__text--active {
97
+ left: 9px;
98
+ color: #fdf425;
99
+ }
100
+
101
+ .switch-round-box--active {
102
+ box-shadow: 0 0 1px #fdf425;
103
+ background-color: #fdf42550;
104
+ border: 2px solid #fdf425;
105
+ }
106
+
107
+ .switch-round-box--active:before {
108
+ -webkit-transform: translateX(45px);
109
+ -ms-transform: translateX(45px);
110
+ transform: translateX(45px);
111
+ background-color: #fdf425;
112
+ }
113
+
114
+ @media only screen and (max-width: 900px) {
115
+ .header-description {
116
+ max-width: 150px;
117
+ }
118
+
119
+ .header-description h2 {
120
+ font-size: 20px;
121
+ }
122
+
123
+ .header-description h6 {
124
+ font-size: 10px;
125
+ }
126
+ }
@@ -1,4 +1,5 @@
1
1
  import "react-custom-scroll/dist/customScroll.css";
2
+ import "./speedSettingsPopup.css";
2
3
  import React from "react";
3
4
  export declare const SPEED_PREFIX = "speed-";
4
5
  export declare const SpeedSettingsPopup: (() => React.JSX.Element) & {
@@ -1,11 +1,11 @@
1
1
  import "react-custom-scroll/dist/customScroll.css";
2
+ import "./speedSettingsPopup.css";
2
3
  import i18next from "i18next";
3
4
  import { observer } from "mobx-react-lite";
4
5
  import React from "react";
5
6
  import { SPEED_LEVELS } from "../../../application";
6
7
  import { UI_ITEMS } from "../../../utils";
7
8
  import { useStores } from "../../hooks";
8
- import { cn } from "../../utils/tw";
9
9
  import { CloseModalButton } from "../CloseModalButton";
10
10
  export const SPEED_PREFIX = "speed-";
11
11
  export const SpeedSettingsPopup = observer(() => {
@@ -15,12 +15,12 @@ export const SpeedSettingsPopup = observer(() => {
15
15
  fast: SPEED_LEVELS.fast,
16
16
  };
17
17
  const { settingStore } = useStores();
18
- return (<div className="flex h-full w-fit flex-col items-center justify-between gap-2 p-4 portrait:max-w-72">
18
+ return (<div className="speed-settings-popup">
19
19
  <CloseModalButton layerId={UI_ITEMS.speedSettings}/>
20
- <h1 className="mt-3 font-bold uppercase text-white sm:text-xl">{i18next.t("howDoYouWantToPlay")}</h1>
21
- <div className="flex h-fit w-full flex-wrap justify-between gap-2 portrait:items-center portrait:justify-center">
22
- {Object.keys(speedLevelMapper).map((speedLevelKey) => (<div id={`${SPEED_PREFIX}${speedLevelKey}`} key={`${SPEED_PREFIX}${speedLevelKey}`} className={cn("flex h-fit w-[145px] items-center justify-center border-2 border-zinc-400 bg-zinc-800 bg-contain bg-no-repeat p-4", speedLevelKey === settingStore.currentSpeed ? "h-fit border-2 border-primary-500" : "")}>
23
- <img className="h-12 w-fit" src={`../../../assets/settings/speedPopup/speed-${speedLevelMapper[speedLevelKey]}.png`}/>
20
+ <div className="speed-settings-popup__title">{i18next.t("howDoYouWantToPlay")}</div>
21
+ <div className="speed-settings-popup__speed-options">
22
+ {Object.keys(speedLevelMapper).map((speedLevelKey) => (<div id={`${SPEED_PREFIX}${speedLevelKey}`} key={`${SPEED_PREFIX}${speedLevelKey}`} className={`speed-settings-popup__option ${speedLevelKey === settingStore.currentSpeed ? "speed-settings-popup_option--active" : ""}`}>
23
+ <img className={`speed-settings-popup__icon ${speedLevelMapper[speedLevelKey]}`} src={`../../../assets/settings/speedPopup/speed-${speedLevelMapper[speedLevelKey]}.png`}/>
24
24
  </div>))}
25
25
  </div>
26
26
  </div>);
@@ -0,0 +1,119 @@
1
+ .speed-settings-modal {
2
+ width: 50vw;
3
+ height: 30vh;
4
+ top: 40vh;
5
+ left: 25vw;
6
+ align-items: center;
7
+ justify-content: center;
8
+ }
9
+
10
+ .speed-settings-popup {
11
+ display: flex;
12
+ flex-direction: column;
13
+ align-items: center;
14
+ width: 90%;
15
+ height: 90%;
16
+ justify-content: space-between;
17
+ }
18
+
19
+ .speed-settings-popup__title {
20
+ font-size: 25px;
21
+ color: white;
22
+ text-transform: uppercase;
23
+ margin-top: 10px;
24
+ }
25
+
26
+ .speed-settings-popup__speed-options {
27
+ display: flex;
28
+ flex-direction: row;
29
+ justify-content: space-between;
30
+ width: 100%;
31
+ height: 120px;
32
+ }
33
+
34
+ .speed-settings-popup__option {
35
+ display: flex;
36
+ justify-content: center;
37
+ align-items: center;
38
+ background-image: url("/assets/settings/speedPopup/speed-frame.png");
39
+ width: 145px;
40
+ height: 78px;
41
+ background-repeat: no-repeat no-repeat;
42
+ background-size: contain;
43
+ }
44
+
45
+ .speed-settings-popup_option--active {
46
+ background-image: url("/assets/settings/speedPopup/speed-frame-active.png");
47
+ width: 145px;
48
+ height: 78px;
49
+ background-repeat: no-repeat no-repeat;
50
+ background-size: contain;
51
+ }
52
+
53
+ .speed-settings-popup__icon.slow {
54
+ width: 70px;
55
+ }
56
+
57
+ .speed-settings-popup__icon.normal {
58
+ width: 35px;
59
+ }
60
+
61
+ .speed-settings-popup__icon.fast {
62
+ width: 90px;
63
+ }
64
+
65
+ @media only screen and (max-width: 450px) {
66
+ .speed-settings-modal {
67
+ width: 80vw;
68
+ height: 50vh;
69
+ left: 10vw;
70
+ top: 30vh;
71
+ }
72
+
73
+ .speed-settings-popup__title {
74
+ margin-top: 10px;
75
+ font-size: 14px;
76
+ }
77
+
78
+ .speed-settings-popup__speed-options {
79
+ display: flex;
80
+ flex-direction: column;
81
+ justify-content: space-between;
82
+ align-items: center;
83
+ height: 75%;
84
+ }
85
+
86
+ .speed-settings-popup__option {
87
+ width: 120px;
88
+ height: 66px;
89
+ }
90
+
91
+ .speed-settings-popup__icon.slow {
92
+ width: 60px;
93
+ }
94
+
95
+ .speed-settings-popup__icon.normal {
96
+ width: 30px;
97
+ }
98
+
99
+ .speed-settings-popup__icon.fast {
100
+ width: 70px;
101
+ }
102
+ }
103
+
104
+ @media only screen and (max-height: 450px) {
105
+ .speed-settings-modal {
106
+ width: 80vw;
107
+ height: 50vh;
108
+ left: 10vw;
109
+ top: 30vh;
110
+ }
111
+
112
+ .speed-settings-popup__title {
113
+ font-size: 20px;
114
+ }
115
+
116
+ .speed-settings-popup__speed-options {
117
+ height: 60%;
118
+ }
119
+ }
@@ -1,7 +1,6 @@
1
1
  import { observer } from "mobx-react-lite";
2
2
  import React from "react";
3
3
  import { useStores } from "../../hooks";
4
- import { cn } from "../../utils/tw";
5
4
  export const SpeedButtonSwitch = observer(() => {
6
5
  const speedLevelMapper = {
7
6
  slow: "turtle",
@@ -10,11 +9,11 @@ export const SpeedButtonSwitch = observer(() => {
10
9
  };
11
10
  const { settingStore } = useStores();
12
11
  const { currentSpeed } = settingStore;
13
- return (<label className="speed-level-id relative inline-block h-[34px] w-full max-w-20 transition-all ease-in hover:cursor-pointer">
14
- <span className="absolute bottom-0 left-0 right-0 top-0 cursor-pointer rounded-lg bg-zinc-800 shadow shadow-primary-500/30"/>
15
- <img className="relative left-2 top-2 h-5 w-6" src={`assets/settings/speed-${speedLevelMapper[currentSpeed]}.png`}/>
16
- <div className="relative bottom-2 left-9 flex w-9 justify-between gap-[2px]">
17
- {Array.from({ length: 3 }).map((_, i) => (<div key={i} className={cn("relative h-3 w-3 rounded-full bg-white", i < settingStore.indexOfSpeedLevel ? "bg-primary-500" : "")}/>))}
12
+ return (<label className="switch turtle-switch speed-level-id">
13
+ <span className="turtle-switch-round-box"/>
14
+ <img className="turtle-switch__icon" src={`assets/settings/speed-${speedLevelMapper[currentSpeed]}.png`}/>
15
+ <div className="dot-container">
16
+ {Array.from({ length: 3 }).map((_, i) => (<div key={i} className={`white-dot ${i < settingStore.indexOfSpeedLevel ? "white-dot--active" : ""}`}/>))}
18
17
  </div>
19
18
  </label>);
20
19
  });