Skip to content
This repository was archived by the owner on Feb 28, 2025. It is now read-only.

Rearrange, insert & remove entries from windows#11

Merged
Micrologist merged 37 commits intoMicrologist:mainfrom
Falki-git:customise-windows
Mar 26, 2023
Merged

Rearrange, insert & remove entries from windows#11
Micrologist merged 37 commits intoMicrologist:mainfrom
Falki-git:customise-windows

Conversation

@Falki-git
Copy link
Copy Markdown
Collaborator

@Falki-git Falki-git commented Mar 20, 2023

Features:

  • Add rearranging, inserting & removing entries to/from any window
  • Add renaming of windows
  • Add creation & deletion of new custom windows
  • Add locking of windows (popped out windows cannot be closed or dragged)
  • Add separator entry

Code:

  • Abstract windows in a separate class
  • Abstract all entries in separate classes
  • Add description for each entry
  • Add Utility static class for most common methods
  • Move styles to a separate static class
  • Persistence of every window parameter to a JSON file
  • Move all data updates to Update() since OnGUI() isn't optimal for readouts

Completes: #4

PR changes

add temporary code to MicroEngineerMod to test out changes
MicroWindows and MicroEntries are serialized for save/load
Rects moved to MicroWindows
Additional styles moved to MicroStyles
Saving/Loading moved to MicroUtility
Added logging to Save/Load methods
Removed now obsolete LayoutState.cs
Add new window MainGui so it can be saved/loaded as well
Removed unused variables
- New button in Settings for opening Edit Window
- In Edit window user can: rename windows, lock/unlock windows, sort entries, add/remove any entry to/from any window except MainGUI, Settings and Stage
- Lock window: popped out window cannot be dragged or closed
- Add tooltip for entries (TODO: add description for all entries)
Moved MainGui and Settings to index 0 and 1 to help with toggle layout if custom windows are created.
Move entry updates to Update() for optimization
@Falki-git Falki-git marked this pull request as ready for review March 26, 2023 00:06
@Falki-git
Copy link
Copy Markdown
Collaborator Author

@Micrologist , this is now ready for a merge. I've updated the first comment to reflect what was implemented.

@Micrologist Micrologist merged commit f01f63d into Micrologist:main Mar 26, 2023
@Micrologist
Copy link
Copy Markdown
Owner

Thanks for your work!
This is a much cleaner implementation than I would have produced.

@Falki-git Falki-git deleted the customise-windows branch March 26, 2023 19:09
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants