| | |
| | | Tool.setMapContainer(player.mapContainer); |
| | | Tool.setThemeMode(themeMode); |
| | | Http.setNotify(notify); |
| | | Http.setMapContainer(player.mapContainer); |
| | | // websocket = new WebSocketClient('/ws/map/websocket'); |
| | | |
| | | await Http.fetchMapData(0); |
| | | await Http.fetchMapData(); |
| | | // websocket.connect(); |
| | | // websocket.onMessage = (data) => { |
| | | // Tool.updateMapStatusInRealTime(data, () => curFloorRef.current, setCurSPrite); |
| | |
| | | {mode === MapMode.MOVABLE_MODE && ( |
| | | <> |
| | | <Button |
| | | variant="outlined" |
| | | sx={{ mr: 2 }} |
| | | onClick={() => { |
| | | Tool.clearMapData(); |
| | | }} |
| | | > |
| | | {translate('page.map.action.clear')} |
| | | </Button> |
| | | <ConfirmButton |
| | | label="page.map.action.save" |
| | | variant="contained" |
| | | sx={{ mr: 2 }} |
| | | onConfirm={() => { |
| | | Http.saveMapData(curZone); |
| | | }} |
| | | /> |
| | | <Button |
| | | variant="contained" |
| | | color="primary" |
| | | sx={{ mr: 1 }} |
| | |
| | | |
| | | {mode === MapMode.SETTINGS_MODE && ( |
| | | <> |
| | | <Button |
| | | variant="outlined" |
| | | sx={{ mr: 2 }} |
| | | onClick={() => { |
| | | Tool.clearMapData(); |
| | | }} |
| | | > |
| | | {translate('page.map.action.clear')} |
| | | </Button> |
| | | <ConfirmButton |
| | | label="page.map.action.save" |
| | | variant="contained" |
| | | onConfirm={() => { |
| | | Http.saveMapData(curZone, mapContainer); |
| | | Http.saveMapData(curZone); |
| | | }} |
| | | /> |
| | | </> |