Skip to content

Commit 3cd893a

Browse files
authored
Update README.md
1 parent 36bfe55 commit 3cd893a

1 file changed

Lines changed: 6 additions & 11 deletions

File tree

README.md

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -133,20 +133,15 @@ instance_b.method_of_your_choice();
133133
<details open><summary><h2>Simple Dialog :</h2></summary><blockquote>
134134

135135
```cpp
136-
void drawGui()
137-
{
136+
void drawGui() {
138137
// open Dialog Simple
139-
if (ImGui::Button("Open File Dialog"))
140-
IGFD::FileDialogConfig config;
141-
config.path = ".";
138+
if (ImGui::Button("Open File Dialog")) {
139+
IGFD::FileDialogConfig config;config.path = ".";
142140
ImGuiFileDialog::Instance()->OpenDialog("ChooseFileDlgKey", "Choose File", ".cpp,.h,.hpp", config);
143-
141+
}
144142
// display
145-
if (ImGuiFileDialog::Instance()->Display("ChooseFileDlgKey"))
146-
{
147-
// action if OK
148-
if (ImGuiFileDialog::Instance()->IsOk())
149-
{
143+
if (ImGuiFileDialog::Instance()->Display("ChooseFileDlgKey")) {
144+
if (ImGuiFileDialog::Instance()->IsOk()) { // action if OK
150145
std::string filePathName = ImGuiFileDialog::Instance()->GetFilePathName();
151146
std::string filePath = ImGuiFileDialog::Instance()->GetCurrentPath();
152147
// action

0 commit comments

Comments
 (0)