-
Notifications
You must be signed in to change notification settings - Fork 355
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
base: master
Are you sure you want to change the base?
Conversation
CorsixTH/Lua/dialogs/menu.lua
Outdated
: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) |
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.
Shouldn't validation be able to be handled by the UISaveMap class? Or more, should it belong there instead?
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.
Done that, though it may break a design rule about logic in a UI class.
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.
@TheCycoONE can you advise? There's not a clear-cut answer I think as to where the call and code should exist.
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.
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.
acc88c3
to
ab7392b
Compare
This is the related commit, which also needs to check the map and open the save map dialog. |
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. |
ab7392b
to
3cd8d3f
Compare
Describe what the proposed change does