-
-
Notifications
You must be signed in to change notification settings - Fork 470
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Editor: Adding layers from layers widget #2884
Conversation
Adding layers to a sector now makes more sense, since it's done through a "+" button, found after the last layer on the layers widget. Pressing the button shows an object selection, just like in the toolbox widget, only containing the objects, formerly found in the "Sector" category for non-worldmap levels, and "Tilemap" and "Background" for worldmap levels. Pressing an object directly adds it to the sector. To achieve this, most of the `EditorToolboxWidget` code, which managed tile/object selection, was moved to a different class. The resulting `Tilebox` class can also be used for features like tile backpacks in the future. Closes SuperTux#638.
Difficult to review. From my preliminary look, it seems like the code looks good. But let's avoid disasters and test this thoroughly. I like how this reduces complexity in the editor classes. |
Maybe add a border around that thing so it isn't too "out of place"? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well done. I like this pr. I may now test in game
Can you rebase this, please? |
Adding layers to a sector now makes more sense, since it's done through a "+" button, found after the last layer on the layers widget. Pressing the button shows an object selection, just like in the toolbox widget, only containing the objects, formerly found in the "Sector" category for non-worldmap levels, and "Tilemap" and "Background" for worldmap levels. Pressing an object directly adds it to the sector.
To achieve this, most of the
EditorToolboxWidget
code, which managed tile/object selection, was moved to a different class. The resultingEditorTilebox
class can also be used for features like tile backpacks in the future.Additionally, this PR allows objects to be moved around right after the editor is started (without an objectgroup having to be active).
Closes #638.