Commit Graph

3392 Commits

Author SHA1 Message Date
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
a8d686a273 Merge pull request #27 from haven1433/dev
Autosearch, text tool, and metadata testing improvements
2019-05-04 15:24:53 -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
693593e9b3 Merge pull request #26 from haven1433/dev
Usability Testing Update
2019-05-04 09:40:01 -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
Benjamin Popp
45171ae5e1 wide text in a narrow cell no longer overflows into unrelated cells.
instead, wide text becomes right-aligned and clipped so you can
see what you're typing
2019-04-24 07:29:28 -05:00
Benjamin Popp
bb7dc2a0dd make an extension method for List.Sort that works the way
I expected it to - taking a sorting lambda
2019-04-24 05:49:23 -05:00
Benjamin Popp
47e75f3b1a find is much smarter now 2019-04-23 21:20:00 -05:00
Benjamin Popp
171b5e14d3 text tool and table tool update eachother on data changes 2019-04-22 21:37:25 -05:00
Benjamin Popp
033232d514 moved some ViewModel code to the model:
model should be able to create new text runs given possible start
  locations.
ToolTray should be able to expose errors
PCSTool should be able to expose errors
PCSTool should give messages when the address is incorrect.
PCSTool needs a button to say "dude, this address has text"
Make the ViewModel code that searches for starting text locations in
  a span public and static so that the PCSTool can reuse it.
2019-04-21 21:42:45 -05:00
Benjamin Popp
458c6553d7 searching for text tells you the number of results 2019-04-21 12:55:17 -05:00
Benjamin Popp
c08e6ae62b version bump 2019-04-20 14:40:14 -05:00
haven1433
afe275c27a Merge pull request #25 from haven1433/dev
Updates from usability test
2019-04-20 14:39:12 -05:00
Benjamin Popp
695ff9cdf8 only show the '*' in the tab if there is a data change.
but allow saving even if there's only a format change.
2019-04-20 14:20:02 -05:00
Benjamin Popp
26ebacc028 fix all formatting issues 2019-04-20 12:33:07 -05:00