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.
- package/dist/SettingsUI/SystemSettings/SystemSettingsComponent.d.ts +1 -0
- package/dist/SettingsUI/SystemSettings/SystemSettingsComponent.jsx +6 -7
- package/dist/SettingsUI/SystemSettings/systemSettings.css +41 -0
- package/dist/SettingsUI/components/AutoplaySettings/autoplaySettings.css +267 -0
- package/dist/SettingsUI/components/AutoplaySettings/index.d.ts +1 -0
- package/dist/SettingsUI/components/AutoplaySettings/index.jsx +38 -26
- package/dist/SettingsUI/components/Bet/BetControls.d.ts +1 -0
- package/dist/SettingsUI/components/Bet/BetControls.jsx +9 -9
- package/dist/SettingsUI/components/Bet/bet.css +115 -0
- package/dist/SettingsUI/components/Bet/index.d.ts +1 -0
- package/dist/SettingsUI/components/Bet/index.jsx +3 -1
- package/dist/SettingsUI/components/BuyFreeSpins/buyFreeSpin.css +46 -0
- package/dist/SettingsUI/components/BuyFreeSpins/index.d.ts +1 -0
- package/dist/SettingsUI/components/BuyFreeSpins/index.jsx +6 -6
- package/dist/SettingsUI/components/CloseModalButton/closeModalButton.css +20 -0
- package/dist/SettingsUI/components/CloseModalButton/index.d.ts +1 -0
- package/dist/SettingsUI/components/CloseModalButton/index.jsx +3 -3
- package/dist/SettingsUI/components/GameRules/gameRules.css +96 -0
- package/dist/SettingsUI/components/GameRules/index.d.ts +1 -0
- package/dist/SettingsUI/components/GameRules/index.jsx +13 -11
- package/dist/SettingsUI/components/OptionButton/index.jsx +1 -1
- package/dist/SettingsUI/components/RichLimitingSlider/index.d.ts +1 -0
- package/dist/SettingsUI/components/RichLimitingSlider/index.jsx +8 -8
- package/dist/SettingsUI/components/RichLimitingSlider/richLimitingSlider.css +39 -0
- package/dist/SettingsUI/components/SlidingSwitch/index.d.ts +1 -0
- package/dist/SettingsUI/components/SlidingSwitch/index.jsx +5 -4
- package/dist/SettingsUI/components/SlidingSwitch/slidingSwitch.css +126 -0
- package/dist/SettingsUI/components/SpeedSettingsPopup/index.d.ts +1 -0
- package/dist/SettingsUI/components/SpeedSettingsPopup/index.jsx +6 -6
- package/dist/SettingsUI/components/SpeedSettingsPopup/speedSettingsPopup.css +119 -0
- package/dist/SettingsUI/components/SpeedSwitchButton/index.jsx +5 -6
- package/dist/SettingsUI/components/SwitchWithHeader/headerStyle.css +28 -0
- package/dist/SettingsUI/components/SwitchWithHeader/index.d.ts +1 -0
- package/dist/SettingsUI/components/SwitchWithHeader/index.jsx +6 -5
- package/dist/SettingsUI/components/SymbolMultiplierPopup/index.d.ts +2 -1
- package/dist/SettingsUI/components/SymbolMultiplierPopup/index.jsx +15 -17
- package/dist/SettingsUI/components/SymbolMultiplierPopup/symbolPopup.css +101 -0
- package/dist/SettingsUI/components/UXSettings/UXSettings.css +28 -0
- package/dist/SettingsUI/components/UXSettings/index.d.ts +1 -0
- package/dist/SettingsUI/components/UXSettings/index.jsx +21 -8
- package/dist/SettingsUI/components/VolumeSettings/index.d.ts +1 -0
- package/dist/SettingsUI/components/VolumeSettings/index.jsx +5 -4
- package/dist/SettingsUI/components/VolumeSettings/volume.css +54 -0
- package/dist/SettingsUI/hooks/index.d.ts +0 -1
- package/dist/SettingsUI/hooks/index.js +0 -1
- package/dist/SettingsUI/index.css +26 -46
- package/dist/SettingsUI/index.d.ts +1 -1
- package/dist/SettingsUI/index.jsx +14 -15
- package/dist/components/AbstractMainContainer/AbstractMainContainer.js +0 -3
- package/dist/components/symbols/AbstractSymbolsColumn.js +9 -9
- package/dist/connectivity/ConnectionWrapper.js +2 -0
- package/dist/connectivity/serverConnection.d.ts +1 -0
- package/dist/utils/common/functions.js +2 -2
- package/package.json +4 -9
- package/dist/SettingsUI/components/Button/index.d.ts +0 -2
- package/dist/SettingsUI/components/Button/index.jsx +0 -6
- package/dist/SettingsUI/components/Modal/index.d.ts +0 -10
- package/dist/SettingsUI/components/Modal/index.jsx +0 -24
- package/dist/SettingsUI/hooks/useClickOutside.d.ts +0 -6
- package/dist/SettingsUI/hooks/useClickOutside.js +0 -20
- package/dist/SettingsUI/packedStyles.css +0 -1617
- package/dist/SettingsUI/utils/tw.d.ts +0 -2
- package/dist/SettingsUI/utils/tw.js +0 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
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="
|
|
13
|
+
return (<div className="buyFreeSpins__container">
|
|
14
14
|
<CloseModalButton layerId={UI_ITEMS.freeSpin} afterClose={clearErrorMessage}/>
|
|
15
|
-
<div className="
|
|
16
|
-
<h1
|
|
15
|
+
<div className="buyFreeSpins__title-container">
|
|
16
|
+
<h1>Buy Free Spins</h1>
|
|
17
17
|
</div>
|
|
18
|
-
<div className="
|
|
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="
|
|
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,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 (<
|
|
10
|
+
return (<button className="close-modal-button" onClick={onClose}>
|
|
11
11
|
x
|
|
12
|
-
</
|
|
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 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="
|
|
26
|
-
<
|
|
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
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
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="
|
|
36
|
-
<div className="
|
|
37
|
-
<div className="
|
|
38
|
-
<div className="
|
|
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="
|
|
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,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
|
-
|
|
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="
|
|
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
|
-
|
|
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="
|
|
22
|
+
<p className="rich-slider__description">{description}</p>
|
|
21
23
|
</Slider>
|
|
22
|
-
<div className="
|
|
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,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="
|
|
5
|
-
{flag ? "
|
|
6
|
-
<input type="checkbox"
|
|
7
|
-
<
|
|
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,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="
|
|
18
|
+
return (<div className="speed-settings-popup">
|
|
19
19
|
<CloseModalButton layerId={UI_ITEMS.speedSettings}/>
|
|
20
|
-
<
|
|
21
|
-
<div className="
|
|
22
|
-
{Object.keys(speedLevelMapper).map((speedLevelKey) => (<div id={`${SPEED_PREFIX}${speedLevelKey}`} key={`${SPEED_PREFIX}${speedLevelKey}`} className={
|
|
23
|
-
<img className=
|
|
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
|
|
14
|
-
<span className="
|
|
15
|
-
<img className="
|
|
16
|
-
<div className="
|
|
17
|
-
{Array.from({ length: 3 }).map((_, i) => (<div key={i} className={
|
|
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
|
});
|