| | |
| | | import Settings from "./settings"; |
| | | import * as Http from './http'; |
| | | import WebSocketClient from './websocket' |
| | | import ConfirmButton from "../page/components/ConfirmButton"; |
| | | |
| | | let player; |
| | | let websocket; |
| | |
| | | const [settingsVisible, setSettingsVisible] = useState(false); |
| | | |
| | | const [spriteSettings, setSpriteSettings] = useState(null); |
| | | const prevSpriteSettingsRef = React.useRef(); |
| | | const prevSpriteSettingsRef = useRef(); |
| | | |
| | | const [curZone, setCurZone] = useState(() => { |
| | | const storedValue = localStorage.getItem('curZone'); |
| | | return storedValue !== null ? JSON.parse(storedValue) : null; |
| | | }); |
| | | |
| | | useEffect(() => { |
| | | Tool.patchRaLayout('0px'); |
| | |
| | | |
| | | {mode === MapMode.SETTINGS_MODE && ( |
| | | <> |
| | | <ConfirmButton |
| | | label="page.map.action.save" |
| | | variant="contained" |
| | | onConfirm={() => { |
| | | Http.saveMapData(curZone, mapContainer); |
| | | }} |
| | | /> |
| | | </> |
| | | )} |
| | | |