Commit Graph

34 Commits

Author SHA1 Message Date
haven1433
602bf280ba Refresh a tab when it switches in 2019-12-26 10:34:44 -06:00
Benjamin Popp
ee38a7b080 Add Dex Tables
There are 4 tables related to the pokedex that I'm adding here:
* regional dex: for each pokemon, what is its regional dex index
* national dex: for each pokemon, what is its national dex index
* conversion: for each regional dex entry, what index is it in the national dex (can be computed automatically, so I added a QuickEdit item)
* dex info, such as the dex description

I also updated App.xaml and MainWindow.xaml.cs to make the QuickEditItems look better.
2019-11-24 14:39:17 -06:00
Benjamin Popp
e4156c418d Better change tracking implementation & UI
change tracking was previously done in the model, but exposed in the ViewModel via a data format. The problem with this is that it meant that all changed formats were wrapped in a new format, which would require a lot of work to fully validate.

The new implementation is still in the model, but exposed in the ViewModel through a new property on the HexElement. The data formats are unchanged.
2019-11-06 12:36:26 -06:00
Benjamin Popp
d878c2ae9d Refactoring to make it possible to show edited cells 2019-11-05 22:11:24 -06:00
Benjamin Popp
18c714e4cc hard-code stage 1
The AutoSearchModel is nifty, but seems to have trouble in a lot of situations where data isn't in the format I expect.

However, I've noticed that while many romhacks move tables around, a lot less of them move code around. So I can depend on most of the pointers to those tables still being in the same spot.

Based on this idea, I've created a new "HardcodeTablesModel" that uses known pointer locations to find tables instead of just searching for tables based on their format. This lets me simplify a lot of the logic, reducing it to basically a pointer lookup in many cases.

Most of the tests for FireRed are passing now using the new HardcodeTablesModel. I'll continue looking into issues from FireRed and the other baseroms in the next update.
2019-10-18 23:03:48 -05:00
Benjamin Popp
3c5a60e228 Reset Theme option
It's possible to make the theme really weird. Include a basic option to reset the theme to default.
2019-10-08 11:02:43 -05:00
Benjamin Popp
9d0ff53376 Reset Alignment
`Goto -> table` will currently adjust the data alignment to make the table rows line up in a useful way. However, getting the alignment back to normal after that requires doing another goto, which isn't intuitive.

make it possible to reset the alignment to default via a button.
2019-10-08 10:44:35 -05:00
Benjamin Popp
04b1cb41fc Disable Tm Expansion for now
I never quite got TM Expansion working correctly. Let's go ahead and disable the feature for now so that I can move on to fixing other bugs and adding other features. We'll come back and fix this later. More research is required.
2019-09-22 17:03:51 -05:00
Benjamin Popp
66692ec6e8 Move QuickEditItems to a subfolder 2019-07-21 13:47:15 -05:00
Benjamin Popp
136559efec Make Items Expandable
If I intend to add more TMs, then I need to be able to add more items. Not only does this require updating the number of items, but I also have to update the number of item images (still never found the item images in Ruby/Sapphire...). But that's not all! We also need to update the code that refers to the number of items that we have. So here's a quick-edit aciton that updates code referring to the number of items.
2019-07-10 21:04:57 -05:00
Benjamin Popp
eabf787974 First Pass at expandable TMs
There is now a quick-edit item for allowing the tm compatibility code to expand correctly with the tm compatibility table. Emerald still needs more updates, but before that we should test the current implementation with FireRed.
2019-07-07 15:03:24 -05:00
Benjamin Popp
b6d2c48610 Quick-Edit fixes
* Notify QuickEdits when the tab changes
* `MakeTutorsExpandable` correctly identifies when it's already been run on a file.
* QuickEdits notify when their runnability changes
2019-07-03 21:35:55 -05:00
Benjamin Popp
09d6eae907 QuickEdit-Expandable Tutors (Model)
Introduce the concept of quick-edits in the editor. These are often-wanted mini-patches that HexManiac has built-in. An example of a use case: decapitalization.

Since I expect that many users will want to expand tutors, and I'm focusing on pokemon moves right now, making tutors expandable is the first quick-edit I've implemented. This change shows includes AutoSearchTests.ExpandableTutorsWorks, which roughly shows how the UI will use this quick edit.
2019-06-30 22:36:21 -05:00
Benjamin Popp
488218cc07 Verify MatchedWords have the expected value. 2019-06-29 22:35:41 -05:00
Benjamin Popp
d21b44ac0c Add Reset Zoom Command 2019-06-14 19:57:25 -05:00
Benjamin Popp
216b125ff3 Zoom setup
Change CellWidth and CellHeight to be instance members of `HexContent` instead of static. This forces other components to look up the size (or get handed the size) instead of using a global. This will let us vary the width/height in the future.
Add 'ZoomLevel' concept to EditorViewModel, so we can save/load the zoom level. It doesn't currently connect to anything in the UI, but it will eventually map to font size, which will be used to calculate cell size.
2019-06-08 21:12:17 -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
9f9a0f8409 Single Search Result Selection Fix
single find result selects full result
2019-05-04 09:05:09 -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
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
47e75f3b1a find is much smarter now 2019-04-23 21:20:00 -05:00
Benjamin Popp
26ebacc028 fix all formatting issues 2019-04-20 12:33:07 -05:00
Benjamin Popp
e1a378643a - show info messages even if they're the same
as the last one after being closed.
- fix a test now that everything is one line lower
2019-04-16 15:10:39 -05:00
Benjamin Popp
a4612d58e9 handle resizing between tabs better 2019-04-15 12:50:04 -05:00
Benjamin Popp
8ee6e55341 tools are now disabled for search results tabs
tools menu now works for any tab, not just the first opened.
2019-04-10 21:16:39 -05:00
Benjamin Popp
8225b99231 don't crash when trying to open a file locked by another app 2019-04-07 22:10:54 -05:00
Benjamin Popp
1f29c5c132 fix some text recognition bugs 2019-04-07 20:31:43 -05:00
Benjamin Popp
05e930c986 updates from self-code review 2019-04-01 20:51:54 -05:00
Benjamin Popp
1cc4145108 make it possible to toggle custom headers 2019-03-31 22:03:11 -05:00
Benjamin Popp
8b24af07ff rename paste to paste / replace, since it does an overwrite
fix a crash when using goto from the search results tab
fix goto not working on a tab if you get to that tab by closing the selected tab
2019-02-09 21:25:18 -06:00
Benjamin Popp
3822b8b543 search results select the full length of the search string
instead of just the first byte

when following a search result, move selection to the result
2019-02-09 20:51:36 -06:00
Benjamin Popp
bb00a22fc5 - refactor ViewPort constructor to not need to take in the data array twice
- when searching for text, check if the found results are anchors
- when adding a text anchor with no name, search for pointers before rejecting it
2019-02-09 12:29:47 -06:00
Benjamin Popp
0c8633da52 rename folders / files / projects from Gen3Hex to HexManiac 2019-02-05 20:58:49 -06:00