<Form.Label>{t('tracker.config.worldState')}</Form.Label>
<Form.Select
className="w-auto"
- name="world-state"
+ name="worldState"
onChange={handleChange}
- value={getConfigValue(config, 'world-state', 'open')}
+ value={getConfigValue(config, 'worldState', 'open')}
>
{['open', 'inverted'].map(n =>
<option key={n} value={n}>
</Form.Group>
</Col>
</Row>
+ <Row>
+ <Col sm={6}>
+ <h3>{t('tracker.config.layout')}</h3>
+ <Form.Group
+ className="d-flex justify-content-between my-2"
+ controlId="tracker.mapLayout"
+ >
+ <Form.Label>{t('tracker.config.mapLayout')}</Form.Label>
+ <Form.Select
+ className="w-auto"
+ name="mapLayout"
+ onChange={handleChange}
+ value={getConfigValue(config, 'mapLayout', 'horizontal')}
+ >
+ {['horizontal', 'vertical'].map(n =>
+ <option key={n} value={n}>
+ {t(`tracker.config.mapLayouts.${n}`)}
+ </option>
+ )}
+ </Form.Select>
+ </Form.Group>
+ </Col>
+ </Row>
</Modal.Body>
</Modal>;
};
.map(mapLocation)
, [mapLocation]);
+ const layout = React.useMemo(() => {
+ if (config.mapLayout === 'vertical') {
+ return {
+ width: 1,
+ height: 2,
+ viewBox: '0 0 1 2',
+ lwTransform: '',
+ dwTransform: 'translate(0 1)',
+ };
+ } else {
+ return {
+ width: 2,
+ height: 1,
+ viewBox: '0 0 2 1',
+ lwTransform: '',
+ dwTransform: 'translate(1 0)',
+ };
+ }
+ }, [config]);
+
return <svg
xmlns="http://www.w3.org/2000/svg"
className="canvas"
- width="2"
- height="1"
- viewBox="0 0 2 1"
+ width={layout.width}
+ height={layout.height}
+ viewBox={layout.viewBox}
onContextMenu={(e) => {
e.preventDefault();
e.stopPropagation();
}}
>
- <g className="light-world">
+ <g className="light-world" transform={layout.lwTransform}>
<g className="background">
{makeBackground('lw_files', 10)}
</g>
)}
</g>
</g>
- <g className="dark-world" transform="translate(1 0)">
+ <g className="dark-world" transform={layout.dwTransform}>
<g className="background">
{makeBackground('dw_files', 10)}
</g>
export const CONFIG = {
bossShuffle: false,
glitches: 'none',
+ mapLayout: 'horizontal',
showMap: 'situational',
showCompass: 'situational',
showSmall: 'always',
trinity: 'Trinity',
},
gtCrystals: 'GT Crystals',
+ layout: 'Layout',
logic: 'Logik',
+ mapLayout: 'Karte',
+ mapLayouts: {
+ horizontal: 'Horizontal',
+ vertical: 'Vertikal',
+ },
showBig: 'Big Keys',
showCompass: 'Kompanden',
showItemOptions: {
trinity: 'Trinity',
},
gtCrystals: 'GT Crystals',
+ layout: 'Layout',
logic: 'Logic',
+ mapLayout: 'Map',
+ mapLayouts: {
+ horizontal: 'Horizontal',
+ vertical: 'Vertical',
+ },
showBig: 'Big Keys',
showCompass: 'Compasses',
showItemOptions: {