Skip to content

Generic editor#43

Open
bonimy wants to merge 36 commits intomasterfrom
generic-editor
Open

Generic editor#43
bonimy wants to merge 36 commits intomasterfrom
generic-editor

Conversation

@bonimy
Copy link
Owner

@bonimy bonimy commented Mar 4, 2018

Description

Add an all-purpose GUI editor for SNES-based resources such as Palettes, GFX, and tilemaps. This editor is intended to show what MushROMs can do for game editors and to serve as a starting off point for creating game-specific editors.

ToDo

  • - Create MainForm and Program loop
  • - Create event based callbacks in MainForm to be used in Program code.
  • - Create Core class to handle all event logic.
  • - Create Palette Editor Form.
  • - Create generic OpenEditorHelper class to handle opening files in a GUI-guided manner.
  • - Create generic SaveEditorHelper class.
  • - Create generic CreateEditorHelper class.
  • - Implement Palette Editor functionality.
  • - Implement drag and drop functionality.
  • - Implement GFX Editor Form (expand this task when started)
  • - Implement TileMap Editor Form.
  • - Implement saveable settings.
  • - Implement an Options menu to toggle certain features.
  • - Implement an option to toggle the MainForm as an MDI form or menu form.
  • - Improve/Implement menu interface (undo/redo, select all, cut/copy, etc.)

bonimy added 25 commits October 23, 2017 09:57
Add some code for main GUI
* Remove reference to project MushROMs
Add Controls.Editors, Snes, and Tests.Snes projects to solution.
* Move source files to src folder
* Update MushROMs.sln
* Update license template in code files to be more informative.
* Make License Header a solution-wide item.
* Remove License Headers in .Designer.cs files.
* RemovedStyleCop Settings in favor of StyleCop.Analyzers NuGet Package.
* Remove Pointer and Indexer classes/interfaces.
* Update style to follow new StyleCop rules.
* Remove Position2D in favor of System.Drawing.Point.
* Remove Range2D in favor of System.Drawing.Size.
* Add Cls compliance to all projects.
* Add ThrowHelper class for more verbose exception messages.
* Remove DialogForm class and IDialogForm interface.
* Add CreateEditorForm, which provides user a way to create a new editor
of their choosing.
* Add CreateGfxControl, which is a UserControl for specifying parameters
for a new GFX file.
* Add CreatePaletteControl.
* Add EditorFormHelper, which serves as the connection between UI and
program logic for Editors.
* Add NewFileHelper, which hosts several ways of creating a new IEditor
class.
* Add OpenFileHelper and SaveFileHelper.
* Add OpenWithForm, which lets user select how they want to open a given
file.
* Add PaletteForm, which serves as the base design of a palette editor
window. Includes support classes PaletteStatus and PaletteZoomScale.
* Add AnimatedLineDrawer component.
* Update BufferedDataGridView class to be agnostic about KeyDown events.
* And CheckerPatternDrawer.
* Remove CheckerPattern and DashedPenPair structs.
* Remove DesignControl.Drawing.cs
* Update Security atrributes for controls.
* Remove EventArgs<T>. Create custom EventArgs that give more useful
parameters.
* Update indents for case labels in switch statements (I don't know why
this changes so much).
* Update DialogProxy class to accept any form.
* Update ErrorCodeException class to not cause native method warnings.
* Add static ExceptionDialog class to show generic Exception messages
and offer the user to retry.
* Add FormControlTileMapHelper, which attempts to manage a form class
with a control that is intended to visually represent a TileMap object.
* Use SR.GetString over String.ToString where possible.
* Update namesapce for RtlAwareMessageBox class.
* Add SafeNativeMethods class for its namesake purpose.
* Update TileMapControl and TileMapForm classes (will likely remove in
future commit).
* Correct casing of WinAPIRectangle struct to WinApiRectangle.
* Update GetBorderSize method to require a BorderStyle enum for better
arg error information.
* Remove ArgumentNanException in favor of ThrowHelper class.
* Update AssertDictionary class.
* Add BijectiveMap class, which is a dictionary that allows reversable
lookup (search key by value).
* Remove ConfigFile class (use Settings).
* Add IUndoFactory interface.
* Update PixelFormat structs to not support indexing.
* Rename SubstringPointer to SubstringInfo.
* Add PaletteEditor class and GfxEditor class.
* Add PaletteDrawer class.
* Remove IDataSelection (redundant to ISelection interface).
* Add TileMap class.
* Add EditorSelector class, which manages a collection of editors and
emplaces a "current" editor.
* Add base Editor class.
* Update Program class to run Core and show an About dialog only.
* Add Core class, to provide a non-static way of owning all program
logic.
* Update MainForm class to host all menu events (to be used in Core
class).
* Add ChildFormHelper class, which created an EditorForm from an Editor.
* Add Core class, which defines all program logic or instantiates helper
classes to do work loads. The Core class is used to connect the various
helper classes, UI logic, and program code.
* Update all tests to reflect changes (Note: Some tests not currently
passing).

https://xkcd.com/1296/
@bonimy bonimy self-assigned this Mar 4, 2018
bonimy added 7 commits July 27, 2018 11:45
* Update calls to Helper.SR class to correctly reference Helper.StringHelper
* Limit most code lines to 72 characters (80 character hard limit). This practice was mostly ignored for attributes, but it now being implemented.
* Use 'using static' where possible.
* Place using directives inside namespace.
* Reduce cyclomatic complexity where possible.
* Limit most code lines to 72 characters (80 character hard limit). This practice was mostly ignored for attributes, but it now being implemented.
* Use 'using static' where possible.
* Place using directives inside namespace.
* Reduce cyclomatic complexity where possible.
* Remove null coalesce checks in private methods where non null is guaranteed.
* Trim MushROMs.GenericEditor.Properties to Properties where appropriate.
* Refactor Settings check in GenericEditor Main function into a separate function.
* Move variable declarations to occur after if checks that do not use the variable.
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