Commit Graph

397 Commits

Author SHA1 Message Date
Benjamin Popp
b22f693f8c Egg Move selection is done in pairs 2019-05-15 06:40:39 -05:00
Benjamin Popp
317582ff68 UI for egg move stream 2019-05-14 21:49:45 -05:00
Benjamin Popp
0efa5a4c59 Autosearch for egg move stream
Altair messes this up, because in that fangame, the egg moves were edited but the limiter wasn't. So the two lengths don't match, and the egg-moves were filled with "00 00".

To support other ROMs with this kind of problem, accept early exits from the format searcher.
2019-05-14 21:18:24 -05:00
Benjamin Popp
61ab55ea92 Egg moves ViewModel exposes data the UI needs. 2019-05-13 20:22:57 -05:00
Benjamin Popp
e312a47e98 Make GetOptions public/static so I can use it for egg moves 2019-05-13 20:22:07 -05:00
Benjamin Popp
1c70f8379a Initial Introduction of EggMoveStream recognition
The Egg Move stream has 2 types of data in it, each of which is 2 bytes long. Either it's a pokemon, or it's a move. (There's also the end, FF FF). This is the initial test to show that we can read an egg move stream from a format.
2019-05-12 21:53:24 -05:00
Benjamin Popp
9a9bdd4460 Cleanup
ViewPort was temporarily a partial class. Now it isn't anymore.
2019-05-12 14:23:58 -05:00
Benjamin Popp
b64337c800 Table Text gets closing " automatically 2019-05-12 14:07:13 -05:00
Benjamin Popp
2c1227511e Notify on message change 2019-05-12 13:54:06 -05:00
Benjamin Popp
46be7abe82 Version Bump 2019-05-12 13:38:52 -05:00
Benjamin Popp
f9f8b28e84 run auto-formatter 2019-05-12 13:31:18 -05:00
Benjamin Popp
d31ba98efe Bug Fixes
* Don't offer table tool in context menu of loose text
* Yield buttons for IContextItems with commands
* Ctrl+Click on pointer out of range returns an error
* Auto-moving a parent table that's being extended notifies about the move.
2019-05-12 13:30:13 -05:00
Benjamin Popp
34b8704c36 Context menu for extending arrays 2019-05-11 22:00:58 -05:00
Benjamin Popp
9766834507 Create ViewModel/Visitors subfolder
we have 5 of these now and will probably make more. They deserve their own folder.
2019-05-11 21:42:19 -05:00
Benjamin Popp
b17e8c77df Refactor: Move Context Menu logic to ViewModel
these operations were previously in the view. They didn't belong there. There is now a simple helper object (IContextItem) that is used to transfer info from the ViewModel to the View, so the View can build up the menu based on directions from the ViewModel. This should make further ContextMenu extending easier, and now possible to test.
2019-05-11 21:35:26 -05:00
Benjamin Popp
4fa76b1af2 Refactor ViewPort Part 4
Pull the completion code into a new type.
This is actualy way better organized now. But a lot of code had to move, so I'm not confident that I didn't introduce any bugs.
2019-05-10 23:23:28 -05:00
Benjamin Popp
4d5bd4a057 bugfix: close menu after <> 2019-05-08 22:52:52 -05:00
Benjamin Popp
e59684e8b9 continuation of Refactoring ViewPort Part 3 2019-05-08 22:46:59 -05:00
Benjamin Popp
89e2ed1653 Refactoring ViewPort Part 3
Some of these methods belonged as extension methods on IDataModel. They're only used in the ViewPort, but don't really do anything ViewPort specific... they act on a Model, with a few parameters. So make them called that way.
2019-05-08 22:44:36 -05:00
Benjamin Popp
5f3d62b97a Refactoring ViewPort Part 2
Pulled 2nd half of ShouldAcceptInput into a helper class
2019-05-08 22:30:30 -05:00
Benjamin Popp
5d7c6e38d0 Refactoring ViewPort Part 1
Introduce a new class, StartCellEdit, that handles the code that used to live in the first half of the ShouldAcceptInput method.
2019-05-08 21:13:14 -05:00
Benjamin Popp
1f67db3fd8 notify on table move 2019-05-07 21:49:07 -05:00
Benjamin Popp
406c9db057 Refactor
For a long time now, MainWindow has housed basically all the xaml for the entire application. It got too big. It now houses all the xaml for the view of the EditorViewModel (basically the viewmodel of the overall appliaction) while the tab content has been moved to a TabView (which has the ViewPort for a  viewmodel). The TabView contains the HexElement, along with all the goods that wrap around it (the column/row headers, the address bar at the bottom, various scroll bars, the tools). Several of the methods were able to move from the main window to the TabView.
2019-05-07 21:44:00 -05:00
Benjamin Popp
ac5683ff2a Append to Table via Tool 2019-05-07 21:21:05 -05:00
Benjamin Popp
79f2e85cb8 Test Dark Rising Kaizo compatibility 2019-05-07 20:34:29 -05:00
Benjamin Popp
2d4c72028f ThemeSelector uses a swatch
the theme selector was still a bit confusing, with both a light and dark mode. It's difficult (and not really neccissary) to get them both to look good at the same time. So now there's just one theme, the text is more clear, and I added swatches for selecting the primary text / background colors.
2019-05-06 10:55:38 -05:00
Benjamin Popp
2b01a3116b test Altair compatibility 2019-05-05 20:16:25 -05:00
haven1433
c490eeadc9 Text Tool Content Caret bugfix
don't lose the caret when a content change causes text to be repointed.
2019-05-04 15:20:56 -05:00
haven1433
894a6bb0e1 Improve autosearch
Include a guard to prevent from finding text of the wrong width. But leave it loose enough to hopefully still work with dirty data in rombases.
2019-05-04 15:07:18 -05:00
haven1433
8db72ad8ab 'Insert Text Here' option in Text Tool
text tool should be able to insert new bodies of text for use in the game, with automatic names (that can be adjusted).
2019-05-04 14:56:22 -05:00
haven1433
7190a434b4 Prep work to improve rombase compatibility 2019-05-04 14:11:37 -05:00
haven1433
b3f266d9ef Metadata testability improvements
- save metadata immediately if it didn't exist
- include a flag to prevent loading existing metadata
2019-05-04 14:03:27 -05:00
haven1433
f0ba8cf9aa Code Review
remove commented code
2019-05-04 09:38:58 -05:00
haven1433
1e5ef7241c Copy Address UI
User requested the ability to copy the address by right-clicking on the address bar at the bottom. Seems reasonable.
2019-05-04 09:21:50 -05:00
haven1433
9f9a0f8409 Single Search Result Selection Fix
single find result selects full result
2019-05-04 09:05:09 -05:00
haven1433
ee6b99f31c Undo goto metric update
undo seemed to jump around in unexpected ways. The jump is now primarily based on data changes, not format changes. This means that adding/removing a pointer to a table will no longe jump to the table as the primary thing that changed.
2019-05-04 08:53:59 -05:00
haven1433
f90ee638bf Autocomplete UI
Also added a new test based on a corner case I found
2019-05-04 08:52:37 -05:00
haven1433
9b0947fce4 Implement AutoComplete UI
also did the model for "Copy Address" though I haven't done the UI for that yet.

Hasn't been tested yet
2019-05-01 17:28:25 -05:00
haven1433
90c854e0ca Autocomplete Model changes 2019-05-01 16:52:19 -05:00
Benjamin Popp
97894afcd5 when loading metadata, anchor load order isn't guaranteed
tables should update their length when a new table comes in that they depend on.
2019-04-29 22:59:17 -05:00
Benjamin Popp
ebc9d1f33d first part of autocomplete is in
mostly the tests
need to make the pointers actually fill the model
need to make the UI still
need to handle enums still
2019-04-29 16:32:14 -05:00
Benjamin Popp
32020c62da fix theme bug in the theme window... the irony 2019-04-28 12:11:34 -05:00
Benjamin Popp
c1ee36bb43 improve defaults
fix a bug that prevented you from showing the theme window twice
2019-04-27 21:50:35 -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
1915473a38 improve backspace. Implement for ints/enums in tables 2019-04-26 21:02:15 -05:00
Benjamin Popp
8598d21d4a remove the "toggle custom headers" for now.
we might not need it, now that we can see both the address and the
item name in the status bar.
2019-04-26 07:11:48 -05:00
Benjamin Popp
ecb2ceb2fb update: make it impossible to select a single cell of a pointer/int/enum.
all the cells come together as a single package.
this clears up some confusion as to which byte you're editing... hopefully.
2019-04-26 07:10:59 -05:00
Benjamin Popp
81e8f8bd1b make the message text blue to make it more visible 2019-04-24 22:04:00 -05:00
Benjamin Popp
b71b3144d7 editing an enum/int moves you to the first space of that item
same as pointers
2019-04-24 22:02:35 -05:00
Benjamin Popp
dacaa09ee7 bottom bar shows table entry name for tables 2019-04-24 21:04:37 -05:00