-
Notifications
You must be signed in to change notification settings - Fork 210
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Additional customization #207
base: master
Are you sure you want to change the base?
Conversation
To further elaborate on the additions made, here is a quick summary: 1- Disable the edit path button #define NO_EDIT_PATH_BUTTON 2- Disable the reset path button #define NO_RESET_PATH_BUTTON 3- Disable create directory button #define NO_CREATE_DIR_BUTTON 4- Remove the path seperator button from path bar (Makes things tidy and neater) #define NO_PATH_SEPERATOR_BUTTON 5- Show path as a text field #define SHOW_PATH_AS_TEXT 6- Write the string defined by WRITE_WORD_PATH_STRING next to the path bar #define WRITE_WORD_PATH
#ifdef WRITE_WORD_PATH
constexpr auto WRITE_WORD_PATH_STRING = "Current Directory :";
#endif // WRITE_WORD_PATH 7- If enabled, OK button is always visible (disabled unless item is selected) #define ALWAYS_SHOW_OK_BUTTON |
hello, thanks for your feedback. will check that in few day with interest |
why add a NO_CREATE_DIR_BUTTON when we have a flag for disable it : ImGuiFileDialogFlags_DisableCreateDirectoryButton |
why ALWAYS_SHOW_OK_BUTTON when we have selected nothing in the dialog ?? |
Making buttons appear and disappear is bad UI design. Enable/disable is less confusing. The user should always see the OK button and not wonder how to interact with the window. A disabled button is a call-to-action. An invisible button that suddenly becomes visible or other UI elements that move around just because I selected something from a list might be confusing to the user. |
im working on a new version who is more in the style of ImGui. and the only feature who will be disabled by preproccessor will be about the gpu feature thumbnails. so all the others will be like imgui. without defines for display or not buttons. and its welcome since #defines is difficult to read in functions so difficult to maintain. so you "bad ui design" rules will become worst for you in few months |
Thank you for your feedback.
That is a very valid question. At the time I made the changes, I wanted to be able to have a global flag to disable the "create directory" button instead of resorting to
I honestly found it confusing that the button was missing when I initially started using the IGFD library. I asked a handful of people for feedback on their preference for an OK button that only appears once a choice is made, and the unanimous answer was "why not just disable it until a choice is made?" Appearing/disappearing buttons can be confusing to some people and the aim was to foolproof the GUI design. |
the ok button visibility can be controlled also when you use the pane and use widget or your won validation in it. you dont it to call it each time, just encapsulate you different behavio in functions. i done that with a struct for easier future modifications. for me the only thing in you PR i can accept is related to SHOW_PATH_AS_TEXT and eventually WRITE_WORD_PATH_STRING . but not sure about WRITE_WORD_PATH_STRING. you need this label on the right or the path bar ? |
I had the need to add additional customization options to fit my needs. I was hoping to have those changes added to the project if possible in case anyone finds them useful.