Merge pull request #13527 from tygyh/Replace-msg-with-structured-binding-VideoCommon/NetPlayChatUI

VideoCommon/NetPlayChatUI: Replace msg with structured binding
This commit is contained in:
Jordan Woyak 2025-05-17 17:09:13 -05:00 committed by GitHub
commit 94888d250e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -35,11 +35,10 @@ void NetPlayChatUI::Display()
}
ImGui::BeginChild("Scrolling", ImVec2(0, -30 * scale), true, ImGuiWindowFlags_None);
for (const auto& msg : m_messages)
for (const auto& [text, color] : m_messages)
{
auto c = msg.second;
ImGui::PushTextWrapPos(0.0f);
ImGui::TextColored(ImVec4(c[0], c[1], c[2], 1.0f), "%s", msg.first.c_str());
ImGui::TextColored(ImVec4(color[0], color[1], color[2], 1.0f), "%s", text.c_str());
ImGui::PopTextWrapPos();
}