Commit Graph

47 Commits

Author SHA1 Message Date
Haven1433
c0f518bcd8 Replace Model.AfterInitialized with InitializationWorkload
Tasks already do what I was wanting to do (manage work timing), and do it better with more features, and do it in a way that other developers will more easily understand. Stop being weird, just use a Task.
2022-03-03 20:42:00 -06:00
Haven1433
c28fce209a First pass: ViewPort.ConsiderReload is async 2022-03-01 21:10:36 -06:00
Haven1433
a5d79104b2 user should be able to copy messagebox text 2022-02-18 21:51:47 -06:00
Haven1433
0064623247 Update Error dialog to include links to Discord/Github. 2022-02-09 20:14:15 -06:00
Haven1433
b38ec77fd5 Refactor WindowsFileSystem.ShowCustomMessageBox
Allow for multiple links instead of just one.
2022-02-09 09:03:26 -06:00
Haven1433
afe46f2998 Put a wrapper around all uses of Process.Start
Process.Start is slightly different in .Net Core compared to .Net Framework
2022-01-05 06:48:36 -06:00
Benjamin Popp
1f53ef822a Use ProcessStartInfo instead of just a filename
UseShellExecute defaults to false in .Net Core. Give it an explicit value of 'true' to allow windows to run non-executable files. In this case, we want to look for whatever program is registered to run the *.gba file, which will very much not be an executable.
2021-11-29 07:30:32 -06:00
Benjamin Popp
104eb0af4f fix wrapping 2021-07-01 07:47:14 -05:00
Benjamin Popp
f2bb90efbc improve image error handling
* provide better error messages when import fails
* don't crash when trying to decode an image that doesn't have a width as a multiple of 8
2021-05-22 21:15:57 -05:00
Benjamin Popp
f7dcc6fdb5 Fix crash
Happens when trying to save a new document during close
2021-05-14 13:02:14 -05:00
Benjamin Popp
88c88912e4 Organize the Utilities menu better / add scripts
Add the ability to open the new scripts folder from within the app. Add sub-menus to organize the pokedex vs expansion utilities, since I'll be adding more expansion utilities soon.
2021-02-25 16:56:03 -06:00
Benjamin Popp
0e075a34b7 Allow dragging in a PNG to the image editor to paste it in. 2021-02-20 21:04:34 -06:00
Benjamin Popp
ffc13bbe84 Don't crash if there's no app to run the current loaded file. 2021-02-14 12:52:12 -06:00
Benjamin Popp
a05b360e15 Prefer Clipboard.SetDataObject over Clipboard.SetText
https://stackoverflow.com/questions/12769264/openclipboard-failed-when-copy-pasting-data-from-wpf-datagrid
Clipboard.SetText sometimes fails with a COMException, depending on what else is going on and what else is on the system. Starting in .Net 4.5, this issue is fixed... in Clibboard.SetDataObject.
2021-01-22 07:35:50 -06:00
Benjamin Popp
93a4c900e2 Add ability to launch the current file as a program by hitting F5 2020-12-26 22:57:54 -06:00
Benjamin Popp
b5e5f4f961 Improve load performance
Instead of initializing the model right away, launch a background task to do that. This allows the metadata to load while the tab draws itself. When initialization is complete, Refresh the ViewPort.

For the tests, use InstantDispatcher
2020-12-21 16:50:01 -06:00
Benjamin Popp
2bcba6f45f Improve crash dialog 2020-12-11 22:20:29 -06:00
Benjamin Popp
39d9aa862e Don't crash if metadata can't be written. 2020-12-11 22:11:08 -06:00
Benjamin Popp
b055a56c4e Allow users to specify palettes to ignore when importing
Battle Backgrounds use palettes 2,3, and 4. But only palettes 2 and 3 flash when you let out a pokemon. Palette 4 is used for the obfuscation image that covers the screen as you scroll in, like grass or rocks or waves.
2020-12-09 14:26:30 -06:00
Benjamin Popp
b3c8abfd69 Improve crash dialog
When crashing, offer the user a way to open the folder with the crash.log file.
2020-12-06 21:08:28 -06:00
Benjamin Popp
e0e0ec23c8 Add "Export Backup" button 2020-11-28 22:53:09 -06:00
Benjamin Popp
9d102a5bf7 Include image previews in the import image dialog
When importing an image that shares a palette with another image / tileset, the user may be curious to know what all images use the palette. The input window now has the ability to display "additional details", which right now is only used for sprites. But this would allow me to add other information to the options dialog in the future.
2020-11-27 14:21:44 -06:00
Benjamin Popp
c902db54e6 Bug Hunting
Better handle errors when importing images.
Change order-of-operations to hopefully make tab-removal errors happen less often.
2020-11-21 22:54:35 -06:00
Benjamin Popp
3bdb686919 Usability updates
* Show an error when the width/height is wrong
* Show the palette to the right instead of below
* add pokedex habitats graphics
2020-11-05 21:59:54 -06:00
Benjamin Popp
87812cfbfd fix save crash
Files reload whenever they detect that the data changes. But this included if HMA changed the file itself o_O so I fixed that.
Re-initializing should not cause a duplicate dictionary addition for pointer offsets. Fixed.
2020-10-17 11:32:53 -05:00
Benjamin Popp
f62b9ab814 Update start screen
* Pull some important info / links down from the help menu to the start page.
* Remove the Help -> About option, because it's now redundant.
* Add support for opening recent files from the start screen
2020-10-14 07:24:18 -05:00
Benjamin Popp
efecf03aa7 Update IFileSystem interface for copy/paste images
* Remove concept of palettes from open/save images, since the actual code doesn't use this anymore.
* Refactor the bulk of short[]-and-width conversion into helper methods so they can be used by the new property.
* Add a new property, CopyImage, that can access an image in the clipboard.
2020-09-20 22:03:55 -05:00
Benjamin Popp
8a0624dba3 break IFileSystem into IFileSystem and IWorkDispatcher
The ability to Dispatch work to another thread is a scheduler concern, not a filesystem concern. These sets of operations should not be tied to the same object.
2020-09-01 14:37:10 -05:00
Benjamin Popp
f9661a6f11 Fail gracefully if the imported image is not a valid PNG 2020-08-23 13:49:11 -05:00
Benjamin Popp
74ab33fa10 Support Indexed8 format 2020-07-26 07:33:45 -05:00
Benjamin Popp
66c1cd5268 support Indexed2 sprites 2020-07-24 07:40:14 -05:00
Benjamin Popp
017f4f30d5 Don't crash if CantainsText() returns true but GetText() throws
Apparently this can happen
2020-07-03 20:19:06 -05:00
Benjamin Popp
f7ef042300 Force chunking to align to newlines 2020-06-26 22:28:19 -05:00
Benjamin Popp
34e69fe5a7 Splitting Paste work
The idea here is that we still want to do work on the UI thread (because we're doing a bunch of command and collection notifications, which can't cleanly be done from a background thread). So we break the long "paste" operations into chunks, and allow UI updates between.
2020-06-26 22:09:03 -05:00
Benjamin Popp
f2cbc4658c Initial implementation of choice dialog
Only the greedy choice works
2020-06-01 22:14:39 -05:00
Benjamin Popp
6dc1c8b8fe general improvements 2020-05-22 20:38:58 -05:00
Benjamin Popp
fb2e500b5b Support decoding Bgra32 images 2020-05-08 08:16:02 -05:00
Benjamin Popp
ba14809c1d Support Indexed4 PNGs 2020-05-02 15:40:09 -05:00
Benjamin Popp
3fb237a475 Keep palette the same where possible
* When exporting an image, also export the original palette.
* When importing an image, if that palette is included, use it. Otherwise, use whatever the current loaded palette is as a comparison point.
2020-04-24 14:30:50 -05:00
Benjamin Popp
936755c331 Import Sprite/Palette 2020-04-23 22:32:58 -05:00
Benjamin Popp
dcd6d1d841 Outline for import/export functions 2020-04-23 10:48:13 -05:00
Benjamin Popp
167c442853 Allow AMap to open HMA as a scripting editor 2020-04-16 22:17:37 -05:00
Benjamin Popp
7fc94bfadd Compile fix
Also, don't commit metadata if there is no metadata. Have the filesystem just say "k" and move on.
2020-04-07 08:06:34 -05:00
Benjamin Popp
b21787003c Don't crash when saving throws an exception. 2019-07-03 21:47:17 -05:00
Benjamin Popp
cfdde5776b allow custom themes
save app metadata (show/hide grid, theme)
2019-04-27 21:29:39 -05:00
Benjamin Popp
1c67d531dc redo save dialog to fix a bug where you can open the
dialog multiple times
2019-04-16 16:33:01 -05:00
Benjamin Popp
0c8633da52 rename folders / files / projects from Gen3Hex to HexManiac 2019-02-05 20:58:49 -06:00