mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 14:49:42 -06:00
Merge pull request #7929 from spycrab/np_chat_toggle
NetPlayChatUI: Add activate chat hotkey
This commit is contained in:
@ -196,6 +196,10 @@ void HotkeyScheduler::Run()
|
||||
|
||||
auto& settings = Settings::Instance();
|
||||
|
||||
// Toggle Chat
|
||||
if (IsHotkey(HK_ACTIVATE_CHAT))
|
||||
emit ActivateChat();
|
||||
|
||||
// Recording
|
||||
if (IsHotkey(HK_START_RECORDING))
|
||||
emit StartRecording();
|
||||
|
@ -26,6 +26,7 @@ signals:
|
||||
void ChangeDisc();
|
||||
|
||||
void ExitHotkey();
|
||||
void ActivateChat();
|
||||
void FullScreenHotkey();
|
||||
void StopHotkey();
|
||||
void ResetHotkey();
|
||||
|
@ -106,6 +106,7 @@
|
||||
|
||||
#include "UICommon/UICommon.h"
|
||||
|
||||
#include "VideoCommon/NetPlayChatUI.h"
|
||||
#include "VideoCommon/VideoConfig.h"
|
||||
|
||||
#if defined(HAVE_XRANDR) && HAVE_XRANDR
|
||||
@ -482,6 +483,7 @@ void MainWindow::ConnectHotkeys()
|
||||
connect(m_hotkey_scheduler, &HotkeyScheduler::EjectDisc, this, &MainWindow::EjectDisc);
|
||||
connect(m_hotkey_scheduler, &HotkeyScheduler::ExitHotkey, this, &MainWindow::close);
|
||||
connect(m_hotkey_scheduler, &HotkeyScheduler::TogglePauseHotkey, this, &MainWindow::TogglePause);
|
||||
connect(m_hotkey_scheduler, &HotkeyScheduler::ActivateChat, this, &MainWindow::OnActivateChat);
|
||||
connect(m_hotkey_scheduler, &HotkeyScheduler::RefreshGameListHotkey, this,
|
||||
&MainWindow::RefreshGameList);
|
||||
connect(m_hotkey_scheduler, &HotkeyScheduler::StopHotkey, this, &MainWindow::RequestStop);
|
||||
@ -1587,6 +1589,12 @@ void MainWindow::OnExportRecording()
|
||||
Core::SetState(Core::State::Running);
|
||||
}
|
||||
|
||||
void MainWindow::OnActivateChat()
|
||||
{
|
||||
if (g_netplay_chat_ui)
|
||||
g_netplay_chat_ui->Activate();
|
||||
}
|
||||
|
||||
void MainWindow::ShowTASInput()
|
||||
{
|
||||
for (int i = 0; i < num_gc_controllers; i++)
|
||||
|
@ -168,6 +168,7 @@ private:
|
||||
void OnStartRecording();
|
||||
void OnStopRecording();
|
||||
void OnExportRecording();
|
||||
void OnActivateChat();
|
||||
void ShowTASInput();
|
||||
|
||||
void ChangeDisc();
|
||||
|
Reference in New Issue
Block a user