mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
hide "Show directory"
when "All combined"
selected
This commit is contained in:
parent
962379d64d
commit
41b63843ce
|
@ -1438,6 +1438,7 @@ void CMenus::RenderDemoBrowserButtons(CUIRect ButtonsView, bool WasListboxItemAc
|
||||||
}
|
}
|
||||||
|
|
||||||
// demos directory button
|
// demos directory button
|
||||||
|
if(m_aCurrentDemoFolder[0] != '\0' || m_DemolistSelectedIndex != 0)
|
||||||
{
|
{
|
||||||
CUIRect DemosDirectoryButton;
|
CUIRect DemosDirectoryButton;
|
||||||
ButtonBarBottom.VSplitLeft(ButtonBarBottom.h * 10.0f, &DemosDirectoryButton, &ButtonBarBottom);
|
ButtonBarBottom.VSplitLeft(ButtonBarBottom.h * 10.0f, &DemosDirectoryButton, &ButtonBarBottom);
|
||||||
|
|
|
@ -4947,15 +4947,18 @@ void CEditor::RenderFileDialog()
|
||||||
if(DoButton_Editor(&s_RefreshButton, "Refresh", 0, &Button, 0, nullptr) || (s_ListBox.Active() && (Input()->KeyIsPressed(KEY_F5) || (Input()->ModifierIsPressed() && Input()->KeyIsPressed(KEY_R)))))
|
if(DoButton_Editor(&s_RefreshButton, "Refresh", 0, &Button, 0, nullptr) || (s_ListBox.Active() && (Input()->KeyIsPressed(KEY_F5) || (Input()->ModifierIsPressed() && Input()->KeyIsPressed(KEY_R)))))
|
||||||
FilelistPopulate(m_FileDialogLastPopulatedStorageType, true);
|
FilelistPopulate(m_FileDialogLastPopulatedStorageType, true);
|
||||||
|
|
||||||
ButtonBar.VSplitRight(ButtonSpacing, &ButtonBar, nullptr);
|
if(!m_FileDialogShowingRoot || m_FilesSelectedIndex != 0)
|
||||||
ButtonBar.VSplitRight(90.0f, &ButtonBar, &Button);
|
|
||||||
if(DoButton_Editor(&s_ShowDirectoryButton, "Show directory", 0, &Button, 0, "Open the current directory in the file browser"))
|
|
||||||
{
|
{
|
||||||
char aOpenPath[IO_MAX_PATH_LENGTH];
|
ButtonBar.VSplitRight(ButtonSpacing, &ButtonBar, nullptr);
|
||||||
Storage()->GetCompletePath(m_FilesSelectedIndex >= 0 ? m_vpFilteredFileList[m_FilesSelectedIndex]->m_StorageType : IStorage::TYPE_SAVE, m_pFileDialogPath, aOpenPath, sizeof(aOpenPath));
|
ButtonBar.VSplitRight(90.0f, &ButtonBar, &Button);
|
||||||
if(!open_file(aOpenPath))
|
if(DoButton_Editor(&s_ShowDirectoryButton, "Show directory", 0, &Button, 0, "Open the current directory in the file browser"))
|
||||||
{
|
{
|
||||||
ShowFileDialogError("Failed to open the directory '%s'.", aOpenPath);
|
char aOpenPath[IO_MAX_PATH_LENGTH];
|
||||||
|
Storage()->GetCompletePath(m_FilesSelectedIndex >= 0 ? m_vpFilteredFileList[m_FilesSelectedIndex]->m_StorageType : IStorage::TYPE_SAVE, m_pFileDialogPath, aOpenPath, sizeof(aOpenPath));
|
||||||
|
if(!open_file(aOpenPath))
|
||||||
|
{
|
||||||
|
ShowFileDialogError("Failed to open the directory '%s'.", aOpenPath);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue