hide "Show directory" when "All combined" selected

This commit is contained in:
dobrykafe 2023-11-09 22:16:07 +01:00
parent 962379d64d
commit 41b63843ce
2 changed files with 11 additions and 7 deletions

View file

@ -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);

View file

@ -4947,6 +4947,8 @@ 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);
if(!m_FileDialogShowingRoot || m_FilesSelectedIndex != 0)
{
ButtonBar.VSplitRight(ButtonSpacing, &ButtonBar, nullptr); ButtonBar.VSplitRight(ButtonSpacing, &ButtonBar, nullptr);
ButtonBar.VSplitRight(90.0f, &ButtonBar, &Button); ButtonBar.VSplitRight(90.0f, &ButtonBar, &Button);
if(DoButton_Editor(&s_ShowDirectoryButton, "Show directory", 0, &Button, 0, "Open the current directory in the file browser")) if(DoButton_Editor(&s_ShowDirectoryButton, "Show directory", 0, &Button, 0, "Open the current directory in the file browser"))
@ -4958,6 +4960,7 @@ void CEditor::RenderFileDialog()
ShowFileDialogError("Failed to open the directory '%s'.", aOpenPath); ShowFileDialogError("Failed to open the directory '%s'.", aOpenPath);
} }
} }
}
ButtonBar.VSplitRight(ButtonSpacing, &ButtonBar, nullptr); ButtonBar.VSplitRight(ButtonSpacing, &ButtonBar, nullptr);
ButtonBar.VSplitRight(50.0f, &ButtonBar, &Button); ButtonBar.VSplitRight(50.0f, &ButtonBar, &Button);