Skip to content

Conversation

@Ixam97
Copy link
Collaborator

@Ixam97 Ixam97 commented Nov 19, 2025

In preparation for the adaptation to Anno 117 - Pax Romana, I want to merge my UI and QOL enhancements to the main repository and create an up-to-date release of the Anno 1800-only variant of the Map Editor as version 0.6.0.

The editor in this version has been in use for a few months and no major bugs are known that would prevent a release. But the software is still heavily WIP of course.

Any further work will have 117 in mind and aims to make the editor fully compatible with both games.

Ixam97 added 30 commits May 27, 2025 22:48
Once the game path ahs been configured, the user can go directly to the editor once the game files have been loaded on startup.
To match the App's overall look the context menu and tooltip now have a dark color scheme.
Implemented a undo-stack to experiment with undo feature. Currently, the entire MapTemplate gets serialized and pushed on the stack. Practically functional, but can get slow for complex maps. Some different solution should be looked into for the long run. But that will probably take some extensive refactoring to enable some kind of diffing.
Removed the hard copy of the entire template. This was just an ugly solution for the undo/redo feature.
Now there is a proper Undo/Redo Stack that can take new entries of the IStackEntry interface. Each kind of action can have its own implementation and push it to the stack. Undo and redo is then handled by the UndoRedoStack Class.
The Stack entries are created in MapView.xaml.cs which isn't really that elegant. But that file is already quite complex and handles lots of editor interactions. So touching it not that mutch is probably a good idea for now. Ultimately, the acutal edit actions should be lifted out to have consistent methods of editing the map when the user does it by different means (like maybe toolbar or context menu) in the future.

There are still some places that seem to not be NULL-safe. Have to clean that up at some point...
Actions can be undone/redone with CTRL+Z/Y.

The action history shows the past actions that can be undone. Intended to be clickable in the future to undo multiple actions at once.

Scrollbars now match the App's theming.
Dependencies between island size and type make it quite cumbersome to restore those properties on undo. Will have to look into some solutions that make it easier to handle island properties, probably also how they are handled in the models. Having different Models for fixed and random islands should not be necessary.
Removing the need for separate controls for fixed and random island. Unifies the handling of adding actions to the undo/redo stack.

Slots and Fertilities not yet updated. They are configurable, but not yet represented in the undo/redo stack. Planning to rework those features to be less cumbersome.
For a more coherent look of the Editor. Still need to rearrange some UI elements for Session and Island Properties.
The fertilities can now be selected directly in the island properties. Changes to fertilities can be undone and redone. By default, only fertilities from the current region can be selected. Fertilities from other regions that have been set beforehand have a warning hint besides them and can be removed.

Also added the possibility to resize island and session property sections of the main window.

The error and warning notifications have been overhauled in their appearance.
Ixam97 added 9 commits June 10, 2025 23:14
To make the data integrity more reliable and prevent some visual issues, the island properties now get shown via a ContentControl bound to its viewmodel. SelectedIsland and MapTemplate are now nun-null parameters of the constructor of the viewmodel.

Also tweaked some visuals of the not allowed fertility warning.
The island label is applied once the text box has lost its focus (also possible by hitting enter). So not every letter is un-/re-done, but only if a changed label has been applied.
Islands can now be removed via the toolbar button or the delete key.

Also fixed some comment typos.
Also added some preparations for undo/redo of map size configuration. The way the configuration of the playable area works right now is a bit complicated and does not work well with undo/redo. This will require some more extensive reworks on that feature. But I wanted to make this more accessible anyway.
…roperty updates

Also removed no longer needed fertility control and overlay. Reused components have been moved to a different namespace accordingly.
The toolbar now has its own control with an associated service. This allows fore more flexible integration of the toolbar buttons in the editor by just providing an event to listen to. Also button states can be set globally depending on state.

Some parts are still a bit hacky, but it should be a good basis.
The map template properties are now a lot simpler and no longer hidden in an expander. Maybe map size should also only be enabled when a toggle is set, together with playable area.

Added styling for sliders and some general tweaks to styling.
@Ixam97 Ixam97 merged commit 3e207d1 into anno-mods:main Nov 19, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant