Commit Graph

1855 Commits

Author SHA1 Message Date
Benjamin Popp
536acf39db Add combobox filtering for tuples
Also adjust the UI for narrower names and wider content.
2021-02-10 14:00:31 -06:00
Benjamin Popp
ce4f4d0206 Improve ChangeHistory
* Don't allow inserting a custom change during a transaction
* Don't end a transaction when a Goto happens because of a paste-script directive ( @{ or @} ).
2021-02-09 22:36:57 -06:00
Benjamin Popp
f419d5affa Update tests to not depend directly on ViewPort constructor
As part of this, make the ViewPort constructor's new parameter no longer optional.
2021-02-09 21:37:16 -06:00
Benjamin Popp
1a4be29a28 Update tests to not depend directly on ViewPort constructor 2021-02-09 21:24:07 -06:00
Benjamin Popp
10bb99092a Update tests to not depend directly on ViewPort constructor 2021-02-09 21:17:01 -06:00
Benjamin Popp
b8831495dd Update tests to not depend directly on ViewPort constructor 2021-02-09 20:54:36 -06:00
Benjamin Popp
163293baf5 Refactor (part 1)
ViewPort should have IWorkDispatcher as a constructor paramater, not an .Edit parameter. Optional parameters that make the program act different between test mode and real mode are bad.

For the same reason, this should be a required parameter. But changing the constructor of ViewPort is hard, since so many tests use it. This is an initial refactor to make less tests use the constructor directly.
2021-02-09 20:24:16 -06:00
Benjamin Popp
4ca41368c1 Fix paste bugs
list item names with , and | should work correctly
2021-02-09 12:57:59 -06:00
Benjamin Popp
8ba7446bfc Improve metacommand / directive logic
* 00 metacommand needs to clean up pointers that it deletes
* . directive needs to be disabled when editing text
2021-02-08 22:39:21 -06:00
Benjamin Popp
9b812f69ff Update logic for 00 metacommand
Previously, the command would error unless you're in freespace. This doesn't quite match how it needs to work.
* If a user tries to copy a table and then paste it over the same table in another rom, that should work. So table pasting should go ahead and clear the data and not error, even if it's not freespace.
* If a user tries to clear out a run with the intention of writing over it, all 00's may not be valid. If the length matches exactly, don't error and don't clear. Just nop.
2021-02-08 21:58:50 -06:00
Benjamin Popp
21e25870ea Fix table resizing bugs
Also fix a bug where deleting a single color doesn't work as expected. Allow all "appendto" runs to have custom delete behavior.
2021-02-08 16:58:24 -06:00
Benjamin Popp
ef4a9781c7 Fix crash 2021-02-06 22:06:27 -06:00
Benjamin Popp
cbfcd2f33b Bugfixes 2021-02-06 21:56:06 -06:00
Benjamin Popp
d239f3f2ac Make IStreamRun autocomplete work in the table tool 2021-02-06 21:05:38 -06:00
Benjamin Popp
d54ccd49e4 Include current date/time in crash log info 2021-02-06 17:35:58 -06:00
Benjamin Popp
b313692c1d close the autocomplete in more situations
* If the user moves the seleciton via click or left/right arrow keys
* If the user presses escape
2021-02-06 15:22:54 -06:00
Benjamin Popp
30de1f6740 Make autocomplete work right with quoted tuples 2021-02-06 15:12:19 -06:00
Benjamin Popp
108d2743eb Update trainer backsprite graphics tables
add another table (thanks Fred) that contains frame-switch data
make all three backsprite tables aware of eachother.
2021-02-06 14:38:14 -06:00
Benjamin Popp
54c0c8f58b Get autocomplete to work right with spaces and quotes
Autocomplete on close-quote.
Don't autocomplete on space while quotes are open.
2021-02-05 21:41:27 -06:00
Benjamin Popp
0ad34e6b25 Inline tuple autocomplete
Tuple autocomplete is weird, because it happens in stages. This is different compared to other things, where choosing autocomplete always finishes the cell.
2021-02-05 21:30:04 -06:00
Benjamin Popp
2bb4bb78a1 Bugfixes
* Handle quotes better
* Handle emptystring better
2021-02-05 16:16:39 -06:00
Benjamin Popp
5ab28cee8f Draft of Autocomplete UI
up/down/enter now works, buttons work. Occasionally crashes.
2021-02-05 15:59:30 -06:00
Benjamin Popp
cbcbcb0477 Start working on autocomplete visuals
This only works in the text tool, not the table tool yet. And it only shows the buttons, the buttons don't do anything yet.
2021-02-04 21:58:03 -06:00
Benjamin Popp
75bc07081a Implement autocomplete for egg move streams 2021-02-04 20:01:30 -06:00
Benjamin Popp
561c308619 Implement single-element table stream autocomplete for tuples 2021-02-04 20:01:14 -06:00
Benjamin Popp
d63a25b70c Refactor
Pull out and name the helpers that actually populate the autocomplete content
2021-02-03 23:10:07 -06:00
Benjamin Popp
5c60e4ff1a Expose a string instead of a Command
Using this in the tests, it becomes clear that the autocomplete really just wants to expose a new line to replace the input line. Update the IStreamRun interface to match.
2021-02-03 23:00:04 -06:00
Benjamin Popp
6ce987555b Start on tests/implementation for tuple autocomplete 2021-02-03 22:52:23 -06:00
Benjamin Popp
e93313457d Refactor test
Add a StubView to make testing easier. Refactor one of the ToolTests to be more readable.
2021-02-02 21:45:55 -06:00
Benjamin Popp
7e6c042be2 Fix palette copy bug
Uncompressed palettes copied incorrectly
2021-02-02 21:45:14 -06:00
Benjamin Popp
e4f4ea11df Fix broken tests
* fix a context menu test that broke when I refactor the "Add New" option in the context menu
* implement autocomplete options for single element streams
2021-01-29 21:48:54 -06:00
Benjamin Popp
a2bd132f05 fix copy crash
Don't crash when user copies tablestream anchor for a table stream with no end token
2021-01-29 21:16:26 -06:00
Benjamin Popp
30e32f7f56 Fix Memory Leak
The HexContent doesn't need to create a whole UI-that-watches-ViewModel-for-changes when all it wants is the bitmap source. Introduce a new lighter-weight method that doesn't do all the property changed registering so that we don't have the viewmodel hold on to countless view objects here.
2021-01-29 21:12:25 -06:00
Benjamin Popp
3860f2cfb7 Start implementing autocomplete for streams 2021-01-29 20:51:11 -06:00
Benjamin Popp
04d1e92bfc Add Right click option for displaying existing event scripts 2021-01-27 15:51:23 -06:00
Benjamin Popp
7a6b386b2e Image Paste now pastes based on cursor position
Instead of just blindly pasting into the middle of the canvas, paste now cares about where the cursor is.
2021-01-27 15:01:32 -06:00
Benjamin Popp
3446e88e44 Update tooltip 2021-01-27 14:27:04 -06:00
Benjamin Popp
2e0e3be064 Version Bump 2021-01-27 11:48:39 -06:00
Benjamin Popp
f06c33d63c Skip type chart for Clover
Clover does some dirty things with the type names to add Fairy type, which makes the type map too long and it overlaps the type chart. I'm ok with this failing: it's clover's fault.
2021-01-27 11:31:15 -06:00
Benjamin Popp
5ef6da0755 Tuple support for overworld sprites and pokemon ev stats 2021-01-27 11:16:49 -06:00
Benjamin Popp
7bd6a95e18 Type icons use tuples for x/y 2021-01-27 10:42:36 -06:00
Benjamin Popp
32113ed0e4 Initial UI for tuples
Adding both the XAML for checkboxes / comboboxes, and the dataformat for displaying tuples inline.
2021-01-27 10:27:56 -06:00
Benjamin Popp
84676870f8 Skip unnamed segments
This lets us have the ability to have 'padding' bits in the middle of a tuple.
2021-01-26 22:03:21 -06:00
Benjamin Popp
ec54a555fc Don't put unnamed elements in the table viewmodels 2021-01-26 21:52:51 -06:00
Benjamin Popp
17165dac1b Dependency check works correctly for tuples 2021-01-26 21:45:58 -06:00
Benjamin Popp
764692168d Implement tuple serialize/deserialize 2021-01-26 21:38:39 -06:00
Benjamin Popp
278aa8e0e2 Fix cut/paste for type chart
copy for a type chart needs to not only copy the data, but the format of the data needed for pasting.
This is already the case, almost: we copy the table format for the stream table. However, adding the stream table won't work correctly unless we also paste the end token. Otherwise the initial length of the stream table will be wrong.

Update existing tests that use the !00 metacommand: the !00 metacommand should only change the data if the data is unused, and should only cause the model to stop the edit if the data is used.

Don't adjust the selection after a double-click-follow-link operation. Only adjust the selection after a double-click-select operation.
2021-01-26 13:37:42 -06:00
Benjamin Popp
9fae650423 Fix messed up refactor
Thanks tests for noticing this!
2021-01-25 21:59:24 -06:00
Benjamin Popp
09125bcc6f Cut/Paste arrays should work for arrays with inner pointers
Inner Pointers were not previously correctly tracked during cut/paste operations. There needed to be some way to say that an address was attached not only to a name that does not exist, but to a specific index of such an array. The answer is to store the array offset in the bytes that are left behind, since the value of those bytes does not matter.
2021-01-25 21:57:02 -06:00
Benjamin Popp
9fd4f90605 ASCII runs need to support copy 2021-01-24 09:00:33 -06:00