mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Merge #3840
3840: Make sure ctrl+shift+s works same as clicking UI r=Jupeyy a=ChillerDragon Do not overwrite the current map when saving as a new file closed #1972 ## Checklist - [X] Tested the change ingame - [ ] Provided screenshots if it is a visual change - [ ] Tested in combination with possibly related configuration options - [ ] Written a unit test if it works standalone, system.c especially - [ ] Considered possible null pointers and out of bounds array indexing - [ ] Changed no physics that affect existing maps - [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional) Co-authored-by: ChillerDragon <ChillerDragon@gmail.com>
This commit is contained in:
commit
1dc85e9f4a
|
@ -5995,8 +5995,14 @@ void CEditor::Render()
|
|||
}
|
||||
}
|
||||
|
||||
// ctrl+shift+alt+s to save as
|
||||
if(Input()->KeyPress(KEY_S) && CtrlPressed && ShiftPressed && AltPressed)
|
||||
InvokeFileDialog(IStorage::TYPE_SAVE, FILETYPE_MAP, "Save map", "Save", "maps", "", CallbackSaveCopyMap, this);
|
||||
// ctrl+shift+s to save as
|
||||
else if(Input()->KeyPress(KEY_S) && CtrlPressed && ShiftPressed)
|
||||
InvokeFileDialog(IStorage::TYPE_SAVE, FILETYPE_MAP, "Save map", "Save", "maps", "", CallbackSaveMap, this);
|
||||
// ctrl+s to save
|
||||
if(Input()->KeyPress(KEY_S) && CtrlPressed)
|
||||
else if(Input()->KeyPress(KEY_S) && CtrlPressed)
|
||||
{
|
||||
if(m_aFileName[0] && m_ValidSaveFilename)
|
||||
{
|
||||
|
@ -6009,14 +6015,6 @@ void CEditor::Render()
|
|||
else
|
||||
InvokeFileDialog(IStorage::TYPE_SAVE, FILETYPE_MAP, "Save map", "Save", "maps", "", CallbackSaveMap, this);
|
||||
}
|
||||
|
||||
// ctrl+shift+s to save as
|
||||
if(Input()->KeyPress(KEY_S) && CtrlPressed && ShiftPressed)
|
||||
InvokeFileDialog(IStorage::TYPE_SAVE, FILETYPE_MAP, "Save map", "Save", "maps", "", CallbackSaveMap, this);
|
||||
|
||||
// ctrl+shift+alt+s to save as
|
||||
if(Input()->KeyPress(KEY_S) && CtrlPressed && ShiftPressed && AltPressed)
|
||||
InvokeFileDialog(IStorage::TYPE_SAVE, FILETYPE_MAP, "Save map", "Save", "maps", "", CallbackSaveCopyMap, this);
|
||||
}
|
||||
|
||||
if(m_GuiActive)
|
||||
|
|
Loading…
Reference in a new issue