Skip to content

Commit

Permalink
[FIX] : fix some warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
aiekick committed Feb 17, 2022
1 parent b6ad6f0 commit e22441e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
16 changes: 10 additions & 6 deletions ImGuiFileDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,8 @@ namespace IGFD
#define okCancelButtonAlignement 0.0f
#endif // okCancelButtonAlignement
#ifndef invertOkAndCancelButtons
#define invertOkAndCancelButtons false
// 0 => disabled, 1 => enabled
#define invertOkAndCancelButtons 0
#endif // invertOkAndCancelButtons
#ifndef resetButtonString
#define resetButtonString "R"
Expand Down Expand Up @@ -4116,8 +4117,10 @@ namespace IGFD
return true;
}

if (!invertOkAndCancelButtons)
ImGui::SameLine();
#if !invertOkAndCancelButtons
ImGui::SameLine();
#endif

}

return false;
Expand All @@ -4131,9 +4134,10 @@ namespace IGFD
prFileDialogInternal.puIsOk = false;
return true;
}

if (invertOkAndCancelButtons)
ImGui::SameLine();

#if invertOkAndCancelButtons
ImGui::SameLine();
#endif

return false;
}
Expand Down
2 changes: 1 addition & 1 deletion ImGuiFileDialogConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
//#define cancelButtonWidth 0.0f
//alignement [0:1], 0.0 is left, 0.5 middle, 1.0 right, and other ratios
//#define okCancelButtonAlignement 0.0f
//#define invertOkAndCancelButtons false
//#define invertOkAndCancelButtons 0

// DateTimeFormat
// see strftime functionin <ctime> for customize
Expand Down

0 comments on commit e22441e

Please sign in to comment.