File tree Expand file tree Collapse file tree 2 files changed +8
-25
lines changed
Expand file tree Collapse file tree 2 files changed +8
-25
lines changed Original file line number Diff line number Diff line change 22// SPDX-License-Identifier: GPL-2.0-or-later
33
44#include " VideoCommon/NetPlayChatUI.h"
5+ #include " Core/Config/GraphicsSettings.h"
56
67#include < imgui.h>
78
@@ -70,14 +71,12 @@ void NetPlayChatUI::Display()
7071
7172 if (m_collapse)
7273 {
73- NetPlayChatUI::Collapse ();
74- m_collapse = true ;
74+ m_collapse = false ;
7575 }
7676
7777 if (m_expand)
7878 {
79- NetPlayChatUI::Expand ();
80- m_expand = true ;
79+ m_expand = false ;
8180 }
8281
8382 ImGui::PopItemWidth ();
@@ -125,28 +124,12 @@ void NetPlayChatUI::Activate()
125124
126125void NetPlayChatUI::Collapse ()
127126{
128- if (!ImGui::IsWindowCollapsed ())
129- {
130- ImGui::SetWindowCollapsed (true );
131- m_collapse = false ;
132- }
133- else
134- {
135- ImGui::SetWindowCollapsed (false );
136- m_collapse = true ;
137- }
127+ Config::SetCurrent (Config::GFX_SHOW_NETPLAY_MESSAGES, false );
128+ m_collapse = true ;
138129}
139130
140131void NetPlayChatUI::Expand ()
141132{
142- if (ImGui::IsWindowCollapsed ())
143- {
144- ImGui::SetWindowCollapsed (false );
145- m_collapse = true ;
146- }
147- else
148- {
149- ImGui::SetWindowCollapsed (true );
150- m_collapse = false ;
151- }
133+ Config::SetCurrent (Config::GFX_SHOW_NETPLAY_MESSAGES, true );
134+ m_expand = true ;
152135}
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ class NetPlayChatUI
3030 bool m_scroll_to_bottom = false ;
3131 bool m_activate = false ;
3232 bool m_collapse = false ;
33- bool m_expand = true ;
33+ bool m_expand = false ;
3434 bool m_is_scrolled_to_bottom = true ;
3535
3636 std::deque<std::pair<std::string, Color>> m_messages;
You can’t perform that action at this time.
0 commit comments