Skip to content
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 enhancements #8903

Merged
merged 49 commits into from
Jun 29, 2024
Merged

Conversation

babaissarkar
Copy link
Contributor

@babaissarkar babaissarkar commented May 22, 2024

Contains various enhancements mostly to the Time Schedule Editor that I couldn't manage to add in #8066. It also contains a few other things in the Map Editor itself. There are also changes to the Unit Type Editor that are related to the new features in the Schedule Editor. The File Dialog has also been redesigned.

Map Editor

  • Rename Load Map to Load Map/Scenario (since it can load both), Edit Scenario to Edit Scenario Settings, Save Map to just Save.
  • Rearrange menu order
  • Add icon for the preferences menu item (used the preexisting settings.png icon)
  • Open folder correctly at Add-on's scenario directory instead of editor/scenarios. (Resolves editor: Save into addon when saving a scenario #8910)
  • Show Save Scenario As only for Scenarios
  • Use the settings.png icon for Preferences menu item
  • Add functionality to "Loyal" checkbox (Unit tool -> Place unit -> Right click menu) (Resolves Loyal Units in Editor Tool #8445)
  • Do not allow maps to be saved in scenarios folder or vice versa (Resolves editor: Pick proper dir and filename in Save Map/Scenario As dialog #8911)
  • Unit List moved to Units menu from File menu to reduce some pressure from the latter. (2e1c3f2)
  • Status Table menu item disabled since it does nothing. Should be reenabled once the functionality has been added. (See 2e1c3f2)
  • Improve reload functionality in Editor (F5). Reload happens directly from memory and no temp files are needed. Also, the undo/redo stacks will be preserved. (Resolves Improve or remove file saving on F5 in the editor #9024)

Map Mode:
Screenshot from 2024-05-25 17-52-50

Scenario Mode:
Screenshot from 2024-05-25 17-53-03

Time Schedule Editor

  • Browse buttons now set wesnoth style paths instead of just pasting the absolute path returned by the file dialog
  • Change text boxes from inactive to uneditable.
  • Code generation improvements
  • Add copyright notice to tod_new_schedule (missed in Add functionality to Time Schedule Editor #8066)
  • Confirmation messages
  • New icons for the preview button (2 sets : preview image and preview sound)
  • Preview buttons for image and sound files
    Screenshot from 2024-05-24 12-48-36

Unit Type Editor

The last four entries above :

  • Confirmation messages
  • New icons for the preview button (2 sets : preview image and preview sound)

Add-on menu

  • Two new items for (1) opening the select add-on dialog, (2) opening the add-on folder
    Screenshot from 2024-05-25 17-54-24

The open add-on folder option shows a GUI2 file dialog at the add-on's folder which can be used to open any file. If it is a loadable map/scenario it will be opened in the editor, otherwise the OS's default application for that file will be opened.

File Dialog

Screenshot from 2024-05-28 11-09-16

@github-actions github-actions bot added UI User interface issues, including both back-end and front-end issues. Editor Map/scenario editor issues. labels May 22, 2024
@CelticMinstrel
Copy link
Member

  • Rename Load Game to Load Game/Scenario (since it can load both)

I'm not sure how you got this wrong, but it's Map, not Game.

@babaissarkar
Copy link
Contributor Author

babaissarkar commented May 22, 2024 via email

@CelticMinstrel
Copy link
Member

Hmm, I think I'm getting confused between asset paths and WML paths actually. Never mind.

@babaissarkar babaissarkar added the Enhancement Issues that are requests for new features or changes to existing ones. label May 23, 2024
@github-actions github-actions bot added the Graphics Issues that involve the graphics engine or assets. label May 23, 2024
Also contains small fixes to scroll_text, multiline_text and tab_container
For the first two, cursor is now set at the start instead of at the end of text
after a set_label call. This makes it easier to read the text.
Adds a couple of new getters in tab_container to get the currently selected tab,
and to access any of the grids of the tabs.
…ich does nothing

Unit List moved to Units menu to reduce clutter on the File menu
Although players may be used to it being on File, Units is now a more logical place for it.
Status Table disabled for now since it does nothing. Can be reenabled once the functionality is implemented.
(The GUI1 version used to work, but since GUI1 version have been removed, no GUI2 replacement has been added.)
src/editor/map/context_manager.hpp Outdated Show resolved Hide resolved
src/editor/map/map_context.hpp Outdated Show resolved Hide resolved
src/gui/dialogs/editor/custom_tod.cpp Show resolved Hide resolved
src/gui/dialogs/editor/custom_tod.cpp Outdated Show resolved Hide resolved
src/editor/map/context_manager.cpp Outdated Show resolved Hide resolved
@babaissarkar
Copy link
Contributor Author

babaissarkar commented Jun 29, 2024

TODO, WIP:

  • Segfault when reloading maps with labels.

current context index was not being reset when contexts were saved
@babaissarkar babaissarkar merged commit 103b80f into wesnoth:master Jun 29, 2024
18 checks passed
@babaissarkar babaissarkar deleted the editor_enhancements branch June 29, 2024 16:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Editor Map/scenario editor issues. Enhancement Issues that are requests for new features or changes to existing ones. Graphics Issues that involve the graphics engine or assets. UI User interface issues, including both back-end and front-end issues. Units Issues that involve unit definitions or their implementation in the engine.
Projects
None yet
4 participants