mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Add CTRL+F in load map prompt
This commit is contained in:
parent
1abd09fbc4
commit
f71a2e017a
|
@ -4560,8 +4560,11 @@ void CEditor::RenderFileDialog()
|
|||
{
|
||||
// render search bar
|
||||
UI()->DoLabel(&FileBoxLabel, "Search:", 10.0f, TEXTALIGN_ML);
|
||||
if(m_FileDialogOpening)
|
||||
if(m_FileDialogOpening || (Input()->KeyPress(KEY_F) && Input()->ModifierIsPressed()))
|
||||
{
|
||||
UI()->SetActiveItem(&m_FileDialogFilterInput);
|
||||
m_FileDialogFilterInput.SelectAll();
|
||||
}
|
||||
if(UI()->DoClearableEditBox(&m_FileDialogFilterInput, &FileBox, 10.0f))
|
||||
{
|
||||
RefreshFilteredFileList();
|
||||
|
@ -4784,6 +4787,7 @@ void CEditor::RenderFileDialog()
|
|||
if(IsDir) // folder
|
||||
{
|
||||
m_FileDialogFilterInput.Clear();
|
||||
UI()->SetActiveItem(&m_FileDialogFilterInput);
|
||||
const bool ParentFolder = str_comp(m_vpFilteredFileList[m_FilesSelectedIndex]->m_aFilename, "..") == 0;
|
||||
if(ParentFolder) // parent folder
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue