Skip to content

Commit

Permalink
[UPD] : update of igfd
Browse files Browse the repository at this point in the history
[ADd] : add a flag widget for ImGuiFileDialogFlags_ShowDevicesButton for show the devices button
  • Loading branch information
aiekick committed Apr 13, 2024
1 parent 0a6c149 commit 4caf2c6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CustomImGuiFileDialogConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
// locales string
#define createDirButtonString ICON_IGFD_ADD
#define resetButtonString ICON_IGFD_RESET
#define drivesButtonString ICON_IGFD_DRIVES
#define devicesButtonString ICON_IGFD_DRIVES
#define editPathButtonString ICON_IGFD_EDIT
#define searchString ICON_IGFD_SEARCH
#define dirEntryString ICON_IGFD_FOLDER
Expand Down
5 changes: 4 additions & 1 deletion DemoDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ static std::string userDatas;
static std::vector<std::pair<std::string, std::string> > selection = {};

static bool UseWindowContraints = true;
static ImGuiFileDialogFlags flags = ImGuiFileDialogFlags_Default;
static ImGuiFileDialogFlags flags = ImGuiFileDialogFlags_Default | ImGuiFileDialogFlags_ShowDevicesButton;
static IGFD_ResultMode resultMode = IGFD_ResultMode_AddIfNoFileExt;

// an override for have read only checkbox
Expand Down Expand Up @@ -567,6 +567,9 @@ void DemoDialog::display(const int32_t& vDisplayWidth, const int32_t& vDisplayHe
ImGui::SameLine();
ImGui::RadioButtonLabeled_BitWize<ImGuiFileDialogFlags>(0.0f, "Disable quick path selection", "Disable the quick path selection", &flags, ImGuiFileDialogFlags_DisableQuickPathSelection);

ImGui::SameLine();
ImGui::RadioButtonLabeled_BitWize<ImGuiFileDialogFlags>(0.0f, "Show Devices button", "Show the devices button", &flags, ImGuiFileDialogFlags_ShowDevicesButton);

ImGui::Separator();
ImGui::Text("Result Modes : for GetFilePathName and GetSelection");

Expand Down
2 changes: 1 addition & 1 deletion ImGuiFileDialog

0 comments on commit 4caf2c6

Please sign in to comment.