mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-10 02:53:51 +00:00
feat(editor): Ctrl+N and Ctrl+O shortcuts for New/Load dialogs
This commit is contained in:
parent
97f1d9c003
commit
623aeff417
2 changed files with 7 additions and 2 deletions
|
|
@ -253,9 +253,12 @@ void EditorApp::processEvents() {
|
||||||
objectsDirty_ = true;
|
objectsDirty_ = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (sc == SDL_SCANCODE_S && (event.key.keysym.mod & KMOD_CTRL)) {
|
if (sc == SDL_SCANCODE_S && (event.key.keysym.mod & KMOD_CTRL))
|
||||||
quickSave();
|
quickSave();
|
||||||
}
|
if (sc == SDL_SCANCODE_N && (event.key.keysym.mod & KMOD_CTRL))
|
||||||
|
ui_.openNewTerrainDialog();
|
||||||
|
if (sc == SDL_SCANCODE_O && (event.key.keysym.mod & KMOD_CTRL))
|
||||||
|
ui_.openLoadDialog();
|
||||||
if (sc == SDL_SCANCODE_Z && (event.key.keysym.mod & KMOD_CTRL)) {
|
if (sc == SDL_SCANCODE_Z && (event.key.keysym.mod & KMOD_CTRL)) {
|
||||||
if (mode_ == EditorMode::Sculpt) {
|
if (mode_ == EditorMode::Sculpt) {
|
||||||
if (event.key.keysym.mod & KMOD_SHIFT)
|
if (event.key.keysym.mod & KMOD_SHIFT)
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,8 @@ public:
|
||||||
|
|
||||||
void render(EditorApp& app);
|
void render(EditorApp& app);
|
||||||
void processActions(EditorApp& app);
|
void processActions(EditorApp& app);
|
||||||
|
void openNewTerrainDialog() { showNewDialog_ = true; }
|
||||||
|
void openLoadDialog() { showLoadDialog_ = true; }
|
||||||
|
|
||||||
PaintMode getPaintMode() const { return paintMode_; }
|
PaintMode getPaintMode() const { return paintMode_; }
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue