diff --git a/ImGuiToolkit.cpp b/ImGuiToolkit.cpp index d80d468..7a7c28a 100644 --- a/ImGuiToolkit.cpp +++ b/ImGuiToolkit.cpp @@ -270,7 +270,7 @@ bool ImGuiToolkit::IconButton(const char* icon, const char *tooltip) // draw with hovered color const ImVec4* colors = ImGui::GetStyle().Colors; ImGui::PushStyleColor( ImGuiCol_Text, ImGui::IsItemHovered() ? colors[ImGuiCol_NavWindowingHighlight] : colors[ImGuiCol_Text] ); - ImGui::Text(icon); + ImGui::Text("%s", icon); ImGui::PopStyleColor(); ImGui::PopID(); @@ -558,7 +558,7 @@ void showToolTip(const char* desc, const char* shortcut) if (shortcut) { ImGui::SameLine(); ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(0.6, 0.6, 0.6, 0.9f)); - ImGui::Text(shortcut); + ImGui::Text("%s", shortcut); ImGui::PopStyleColor(); } ImGui::EndTooltip(); @@ -583,7 +583,7 @@ void ImGuiToolkit::HelpToolTip(const char* desc, const char* shortcut) // Helper to display a little (?) mark which shows a tooltip when hovered. void ImGuiToolkit::Indication(const char* desc, const char* icon, const char* shortcut) { - ImGui::TextDisabled( icon ); + ImGui::TextDisabled("%s", icon ); if (ImGui::IsItemHovered()) showToolTip(desc, shortcut); } @@ -1505,7 +1505,7 @@ void ImGuiToolkit::WindowText(const char* window_name, ImVec2 window_pos, const | ImGuiWindowFlags_NoFocusOnAppearing | ImGuiWindowFlags_NoNav)) { ImGuiToolkit::PushFont(ImGuiToolkit::FONT_LARGE); - ImGui::Text(text); + ImGui::Text("%s", text); ImGui::PopFont(); ImGui::End(); @@ -1874,7 +1874,7 @@ bool ImGuiToolkit::InputCodeMultiline(const char* label, std::string *str, const // show label ImGui::SameLine(); - ImGui::Text(label); + ImGui::Text("%s", label); return ret; } @@ -1893,5 +1893,5 @@ void ImGuiToolkit::CodeMultiline(const char* label, const std::string &str, floa ImGui::PopFont(); ImGui::SameLine(); - ImGui::Text(label); + ImGui::Text("%s", label); } diff --git a/ImGuiVisitor.cpp b/ImGuiVisitor.cpp index 81b3692..62e30e5 100644 --- a/ImGuiVisitor.cpp +++ b/ImGuiVisitor.cpp @@ -166,7 +166,7 @@ void ImGuiVisitor::visit(Scene &n) void ImGuiVisitor::visit(Primitive &n) { ImGui::PushID(std::to_string(n.id()).c_str()); - ImGui::Text("Primitive %d"); + ImGui::Text("Primitive"); n.shader()->accept(*this); diff --git a/UserInterfaceManager.cpp b/UserInterfaceManager.cpp index 21ca22c..5a9efc7 100644 --- a/UserInterfaceManager.cpp +++ b/UserInterfaceManager.cpp @@ -1066,7 +1066,7 @@ int UserInterface::RenderViewNavigator(int *shift) ImGui::NextColumn(); ImGui::SetCursorPosX(ImGui::GetCursorPosX() + (ImGui::GetColumnWidth() - ImGui::CalcTextSize(Settings::application.views[v].name.c_str()).x) * 0.5f - ImGui::GetStyle().ItemSpacing.x); ImGuiToolkit::PushFont(Settings::application.current_view == 4 ? ImGuiToolkit::FONT_BOLD : ImGuiToolkit::FONT_DEFAULT); - ImGui::Text(Settings::application.views[v].name.c_str()); + ImGui::Text("%s", Settings::application.views[v].name.c_str()); ImGui::PopFont(); } @@ -4017,7 +4017,7 @@ void OutputPreview::Render() ImGui::SetCursorScreenPos(draw_pos); ImGui::Text(" " ICON_FA_TV " %d x %d px, %.d fps", output->width(), output->height(), int(Mixer::manager().fps()) ); if (Settings::application.accept_connections) - ImGui::Text( " " ICON_FA_SHARE_ALT_SQUARE " %s (%d peer)", + ImGui::Text( " " ICON_FA_SHARE_ALT_SQUARE " %s (%ld peer)", Connection::manager().info().name.c_str(), Streaming::manager().listStreams().size() ); if (video_broadcaster_) @@ -4522,7 +4522,7 @@ void InputMappingInterface::SliderParametersCallback(SourceCallback *callback, S Group tmp; edited->getTarget(&tmp); tmp.accept(info); ImGui::BeginTooltip(); - ImGui::Text(info.str().c_str()); + ImGui::Text("%s", info.str().c_str()); ImGui::EndTooltip(); } @@ -5880,7 +5880,7 @@ void Navigator::RenderNewPannel() ++tooltip; if (tooltip>30) { ImGui::BeginTooltip(); - ImGui::Text(filenametooltip.c_str()); + ImGui::Text("%s", filenametooltip.c_str()); ImGui::EndTooltip(); } } @@ -6748,7 +6748,7 @@ void Navigator::RenderMainPannelVimix() // draw thumbnail in tooltip ImGui::BeginTooltip(); _snap_thumbnail.Render(size.x); - ImGui::Text(_snap_date.c_str()); + ImGui::Text("%s", _snap_date.c_str()); ImGui::EndTooltip(); ++count_over; // prevents display twice on item overlap }