Commit Graph

35 Commits

Author SHA1 Message Date
Benjamin Popp
841d32fe1b Allow editing of 256-color image with 16-color palettes
example: new game professor
2020-10-06 21:18:52 -05:00
Benjamin Popp
f0870a7d1b bugfix: allow panning based on pixel height 2020-10-06 07:24:45 -05:00
Benjamin Popp
22a4982295 Keep selection after undo 2020-10-06 07:00:10 -05:00
Benjamin Popp
e9794d61c5 fix crash
don't crash when filling with a reverse-gradient (start after end)
2020-10-06 06:59:56 -05:00
Benjamin Popp
14a7f129ec Add UI for switching sprite / palette pages in the tool 2020-10-03 23:29:31 -05:00
Benjamin Popp
4136ae8df8 Implement ViewModel for switching pages directly from the Image Editor 2020-10-03 08:21:24 -05:00
Benjamin Popp
36a3ff1b4e Support editing later palettes
useful for multi-palette images like the frontier pass image, or type icons, or castform
2020-10-02 22:48:55 -05:00
Benjamin Popp
f8cdbce616 ImageEditor -> allow editing other pages of a sprite 2020-10-01 22:04:38 -05:00
Benjamin Popp
eeeef17c8d Add test to show that palette relocation works with the image editor
This is implemented via the palette collection, so the image editor gets it for free.
2020-09-28 22:37:43 -05:00
Benjamin Popp
0b70b2bb7b Zoom In / Zoom out buttons and shortcuts 2020-09-27 22:48:53 -05:00
Benjamin Popp
615f172619 Add gradient fill
Gradient fill as a circle around the selected start point, using selected colors ranging from the first-to-last selected colors.
2020-09-21 22:05:28 -05:00
Benjamin Popp
407db89b00 Allow drawing blocks of a color via the draw tool 2020-09-20 21:41:52 -05:00
Benjamin Popp
9268275d83 Improve eyedropper selection UI
allow eyedropper to show selection during drag operations
show the selected block that we can draw
2020-09-18 22:38:56 -05:00
Benjamin Popp
d130eac740 Image Editor UI Improvements
* Use icons and tooltips in the buttons
* Use keyboard shortcuts
2020-09-17 22:39:52 -05:00
Benjamin Popp
8e232761ca Hover over a palette color shows where that color is used 2020-09-17 15:49:36 -05:00
Benjamin Popp
b69541a590 Improve Undo experience
Undo causes refresh
Tool interactions cause discrete undo actions
Fill tool shows selection
2020-09-17 14:34:22 -05:00
Benjamin Popp
6279ab41c3 Improve performance of ShowSelectionRect 2020-09-17 08:01:22 -05:00
Benjamin Popp
052434250e don't switch tool when selecting new palette colors during fill tool 2020-09-16 21:48:03 -05:00
Benjamin Popp
5685dfaaad Fix layout rounding / add middle-click pan 2020-09-16 21:45:07 -05:00
Benjamin Popp
5411c746c2 Draw selection when draw tool selected 2020-09-15 22:20:44 -05:00
Benjamin Popp
1044d69c80 Refresh from model updates pixels 2020-09-15 21:11:26 -05:00
Benjamin Popp
42ce843496 Selection and Eyedropper updates
- selection rect updates mid selection
- eyedropper left-click tool works
- can draw blocks with draw tool after eyedropper grab
2020-09-15 20:44:52 -05:00
Benjamin Popp
536bfdad2a Refactor: Strategy Pattern 2020-09-15 15:24:49 -05:00
Benjamin Popp
f08fba9134 Implement selection
pixels under current selection are remembered
2020-09-15 13:19:42 -05:00
Benjamin Popp
aadec6eb6a start working on selection 2020-09-14 19:39:47 -05:00
Benjamin Popp
396c2c8ca8 Start looking at hover rect during draw 2020-09-14 11:54:20 -05:00
Benjamin Popp
19cd7420c9 Draw improvements 2020-09-14 08:13:17 -05:00
Benjamin Popp
1726f98c9c Make tool work if content repoints
Also, notify the UI after drawing pixels
2020-09-13 22:20:07 -05:00
Benjamin Popp
893b99060b Add views for the Image Editor Tools and Palette
Change "ImageEditor.Tools" to "ImageEditorTools" so I can use them in Xaml
Add debug writelines for draw/pan/zoom interactions, to help with debugging.
Fix bug in Bind. It didn't have the required if statement!
Add Command for changing tools, useful for the View
2020-09-13 21:49:20 -05:00
Benjamin Popp
72bff89415 Allow image editor tab to close 2020-09-12 13:13:55 -05:00
Benjamin Popp
20891bbb50 Add basic UI
Can pan/zoom. No editing controls yet.
2020-09-11 22:36:18 -05:00
Benjamin Popp
ee196ec10b Basic functionality tests
Nothing fancy yet, just some basic logic to get us started.
2020-09-11 21:12:35 -05:00
Benjamin Popp
de6a896c7b ImageEditorTest: Palette_ChangeColor_PixelsUpdate 2020-09-11 07:33:12 -05:00
Benjamin Popp
38d7680081 Introduce testing for Image Editor tab
We don't have a UI for the image editor tab yet. But we can now test the interactions. We've written the first test, and it's now possible to draw a single pixel.

... we'll need a lot more tests for this.
2020-09-10 22:26:18 -05:00
Benjamin Popp
b9eaf34016 Add outline for new ImageEditor tab 2020-09-02 22:14:16 -05:00