Skip to content

Commit 34446cb

Browse files
committed
[UPD] : update README.md
1 parent beb5507 commit 34446cb

1 file changed

Lines changed: 36 additions & 1 deletion

File tree

README.md

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,10 @@ included in the Lib_Only branch for your convenience.
7272
- Directory bookmarks
7373
- Directory manual entry (right click on any path element)
7474
- Optional 'Confirm to Overwrite" dialog if file exists
75+
- C Api (succesfully tested with CimGui)
7576
- Thumbnails Display (agnostic way for compatibility with any backend, sucessfully tested with OpenGl and Vulkan)
7677
- The dialog can be embedded in another user frame than the standard or modal dialog
77-
- C Api (succesfully tested with CimGui)
78+
- Can tune validation buttons (placements, widths, inversion)
7879

7980
## Singleton Pattern vs. Multiple Instances
8081

@@ -577,6 +578,40 @@ with [ImGuiFontStudio](https://github.com/aiekick/ImGuiFontStudio), which I wrot
577578

578579
ImGuiFontStudio uses ImGuiFileDialog! Check it out.
579580

581+
## Tune the validations button group
582+
583+
You can specify :
584+
- the width of "ok" and "cancel" buttons, by the set the defines "okButtonWidth" and "cancelButtonWidth"
585+
- the alignement of the button group (left, right, middle, etc..) by set the define "okCancelButtonAlignement"
586+
- if you want to have the ok button on the left and cancel button on the right or inverted by set the define "invertOkAndCancelButtons"
587+
588+
just see theses defines in the config file
589+
```cpp
590+
//Validation buttons
591+
//#define okButtonString " OK"
592+
//#define okButtonWidth 0.0f
593+
//#define cancelButtonString " Cancel"
594+
//#define cancelButtonWidth 0.0f
595+
//alignement [0:1], 0.0 is left, 0.5 middle, 1.0 right, and other ratios
596+
//#define okCancelButtonAlignement 0.0f
597+
//#define invertOkAndCancelButtons false
598+
```
599+
with Alignement 0.0 => left
600+
601+
![alignement_0.0.gif](https://github.com/aiekick/ImGuiFileDialog/blob/master/doc/alignement_0.0.png)
602+
603+
with Alignement 1.0 => right
604+
605+
![alignement_1.0.gif](https://github.com/aiekick/ImGuiFileDialog/blob/master/doc/alignement_1.0.png)
606+
607+
with Alignement 0.5 => middle
608+
609+
![alignement_0.5.gif](https://github.com/aiekick/ImGuiFileDialog/blob/master/doc/alignement_0.5.png)
610+
611+
ok and cancel buttons inverted (cancel on the left and ok on the right)
612+
613+
![validation_buttons_inverted.gif](https://github.com/aiekick/ImGuiFileDialog/blob/master/doc/validation_buttons_inverted.png)
614+
580615
## Embedded in other frames :
581616

582617
The dialog can be embedded in another user frame than the standard or modal dialog

0 commit comments

Comments
 (0)