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

Add confirmation window to map editor restart #2545

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tobylane
Copy link
Member

@tobylane tobylane commented Apr 2, 2024

Describe what the proposed change does

  • Add confirm window to the restart map editor menu option
  • Add mapeditor specific message to quit confirm window
  • Move map editor save function to GameUI (used in a future PR).

@lewri lewri added this to In progress in 0.68 Release via automation Apr 6, 2024
:appendItem(_S.menu_file.save:format(hotkey_value_label("ingame_saveMenu", hotkeys)), function() mapeditorSave(self.ui) end)
:appendItem(_S.menu_file.restart:format(hotkey_value_label("ingame_restartLevel", hotkeys)), function() app:mapEdit() end)
:appendItem(_S.menu_file.quit:format(hotkey_value_label("ingame_quitLevel", hotkeys)), function() self.ui:quit() end)
:appendItem(_S.menu_file.save:format(hotkey_value_label("ingame_saveMenu", hotkeys)), function() self.ui:saveMapeditor() end)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't validation be able to be handled by the UISaveMap class? Or more, should it belong there instead?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done that, though it may break a design rule about logic in a UI class.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@TheCycoONE can you advise? There's not a clear-cut answer I think as to where the call and code should exist.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would the Map class work?

It seems to mostly handle the loaded map, although there is also other stuff in there such as loading level config, it seems.

Alternatively, something LoadSave, although it may be too early for that.

@tobylane
Copy link
Member Author

tobylane@c470010

This is the related commit, which also needs to check the map and open the save map dialog.

@TheCycoONE
Copy link
Member

I have no problem with validate being called by the UI. Living in world can be addressed later if desired.

mapeditor vs MapEditor is something to sort out perhaps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
0.68 Release
  
In progress
Development

Successfully merging this pull request may close these issues.

None yet

4 participants