Skip to content

Commit

Permalink
format string for generic message dialogs
Browse files Browse the repository at this point in the history
  • Loading branch information
chrxh committed Oct 22, 2024
1 parent ddd636b commit 1908bf2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion imgui.ini
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ Collapsed=0

[Window][Exit]
Pos=810,490
Size=328,107
Size=328,110
Collapsed=0

[Window][Do you really want to terminate the program?]
Expand Down
2 changes: 1 addition & 1 deletion source/Gui/ExitDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ ExitDialog::ExitDialog()

void ExitDialog::processIntern()
{
ImGui::Text("Do you really want to terminate the program?");
ImGui::TextWrapped("%s", "Do you really want to terminate the program?");

ImGui::Dummy({0, ImGui::GetContentRegionAvail().y - scale(50.0f)});
AlienImGui::Separator();
Expand Down
4 changes: 2 additions & 2 deletions source/Gui/GenericMessageDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ void GenericMessageDialog::processInformation()
_sizeInitialized = true;
}

ImGui::TextWrapped(_message.c_str());
ImGui::TextWrapped("%s", _message.c_str());

ImGui::Dummy({0, ImGui::GetContentRegionAvail().y - scale(50.0f)});
AlienImGui::Separator();
Expand All @@ -86,7 +86,7 @@ void GenericMessageDialog::processYesNo()
_sizeInitialized = true;
}

ImGui::TextWrapped(_message.c_str());
ImGui::TextWrapped("%s", _message.c_str());

ImGui::Dummy({0, ImGui::GetContentRegionAvail().y - scale(50.0f)});
AlienImGui::Separator();
Expand Down

0 comments on commit 1908bf2

Please sign in to comment.