Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
aiekick authored Feb 1, 2024
1 parent 8cd2a80 commit c07d176
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,20 +133,15 @@ instance_b.method_of_your_choice();
<details open><summary><h2>Simple Dialog :</h2></summary><blockquote>

```cpp
void drawGui()
{
void drawGui() {
// open Dialog Simple
if (ImGui::Button("Open File Dialog"))
IGFD::FileDialogConfig config;
config.path = ".";
if (ImGui::Button("Open File Dialog")) {
IGFD::FileDialogConfig config;config.path = ".";
ImGuiFileDialog::Instance()->OpenDialog("ChooseFileDlgKey", "Choose File", ".cpp,.h,.hpp", config);

}
// display
if (ImGuiFileDialog::Instance()->Display("ChooseFileDlgKey"))
{
// action if OK
if (ImGuiFileDialog::Instance()->IsOk())
{
if (ImGuiFileDialog::Instance()->Display("ChooseFileDlgKey")) {
if (ImGuiFileDialog::Instance()->IsOk()) { // action if OK
std::string filePathName = ImGuiFileDialog::Instance()->GetFilePathName();
std::string filePath = ImGuiFileDialog::Instance()->GetCurrentPath();
// action
Expand Down

0 comments on commit c07d176

Please sign in to comment.