| 109 | } |
| 110 | |
| 111 | void Chat::update(float dt) { |
| 112 | Pane::update(dt); |
| 113 | |
| 114 | if (m_scripted) |
| 115 | return; |
| 116 | |
| 117 | auto team = m_client->teamClient()->currentTeam(); |
| 118 | for (auto button : fetchChild<ButtonGroup>("filterGroup")->buttons()) { |
| 119 | auto mode = ChatSendModeNames.getLeft(button->data().getString("sendMode", "Broadcast")); |
| 120 | if (!team.isValid() && m_sendMode == ChatSendMode::Party && mode == ChatSendMode::Broadcast) |
| 121 | button->check(); |
| 122 | if (mode == ChatSendMode::Party) |
| 123 | button->setEnabled(team.isValid()); |
| 124 | } |
| 125 | } |
| 126 | |
| 127 | void Chat::startChat() { |
| 128 | if (m_scripted) |
no test coverage detected