Skip to content

Commit c833c6a

Browse files
committed
added close to raw editor / new mapping
1 parent 5caaa8b commit c833c6a

File tree

9 files changed

+314
-342
lines changed

9 files changed

+314
-342
lines changed

CHANGELOG

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@
1414
- Rebuilt Project screen
1515
- Tree structure for projects
1616
- Reuse file menu
17-
- New mapping autodismiss is configurable
17+
- Mapping screen updates
18+
- New mapping autodismiss is configurable
19+
- Added 'close' to new mapping / raw editor
1820
- Fixed a keycombination event bug [#29](/../../issues/29)
1921
- Fixed corrupted art when importing transparent PNGs [#22](/../../issues/22)
2022

TODO

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,9 @@ definition([
2020
])
2121

2222
// copy to project
23+
// art ffset save message / input size
2324
// autozoom based on sprite size for sprites tab
24-
// close button for new mapping screen / raw editor
2525

26-
// art ffset save message / input size
2726
// crackers first, then kd cham
2827
// UI by definition
2928

app/components/mappings/new-mapping.js

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { environment } from '#store/environment';
77
import { observer } from 'mobx-react';
88
import { Mapping } from './mapping';
99
import { Spring } from 'react-spring/renderprops';
10-
import { Checkbox } from '#ui';
10+
import { Checkbox, Button } from '#ui';
1111

1212
const baseConfig = {
1313
hflip: false,
@@ -18,13 +18,16 @@ const baseConfig = {
1818
priority: false,
1919
};
2020

21-
const AutoDismiss = observer(() => (
22-
<div className="autodismiss">
23-
<span onClick={mappingState.toggleAutodismiss}>autodismiss</span>
24-
<Checkbox
25-
checked={mappingState.autodismiss}
26-
onChange={mappingState.toggleAutodismiss}
27-
/>
21+
const BottomMenu = observer(() => (
22+
<div className="row">
23+
<Button color="magenta" onClick={mappingState.toggleNewMapping}>close</Button>
24+
<div className="autodismiss">
25+
<span onClick={mappingState.toggleAutodismiss}>autodismiss</span>
26+
<Checkbox
27+
checked={mappingState.autodismiss}
28+
onChange={mappingState.toggleAutodismiss}
29+
/>
30+
</div>
2831
</div>
2932
));
3033

@@ -155,7 +158,7 @@ export class NewMapping extends Component {
155158
})}
156159
</div>
157160
))}
158-
<AutoDismiss />
161+
<BottomMenu />
159162
</div>
160163
)}
161164
</Spring>

0 commit comments

Comments
 (0)