mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
Add debug hotkey for test sub messages (#4037)
This commit is contained in:
parent
54129f76a3
commit
766a30240d
|
@ -158,6 +158,7 @@ inline const std::map<HotkeyCategory, ActionDefinitionMap> actionNames{
|
||||||
{"addMiscMessage", ActionDefinition{"Debug: Add misc test message"}},
|
{"addMiscMessage", ActionDefinition{"Debug: Add misc test message"}},
|
||||||
{"addRewardMessage",
|
{"addRewardMessage",
|
||||||
ActionDefinition{"Debug: Add reward test message"}},
|
ActionDefinition{"Debug: Add reward test message"}},
|
||||||
|
{"addSubMessage", ActionDefinition{"Debug: Add sub test message"}},
|
||||||
#endif
|
#endif
|
||||||
{"moveTab",
|
{"moveTab",
|
||||||
ActionDefinition{
|
ActionDefinition{
|
||||||
|
|
|
@ -249,6 +249,14 @@ void Window::addDebugStuff(HotkeyController::HotkeyMap &actions)
|
||||||
getApp()->twitch->addFakeMessage(msg);
|
getApp()->twitch->addFakeMessage(msg);
|
||||||
return "";
|
return "";
|
||||||
});
|
});
|
||||||
|
|
||||||
|
actions.emplace("addSubMessage", [=](std::vector<QString>) -> QString {
|
||||||
|
const auto &messages = getSampleSubMessages();
|
||||||
|
static int index = 0;
|
||||||
|
const auto &msg = messages[index++ % messages.size()];
|
||||||
|
getApp()->twitch->addFakeMessage(msg);
|
||||||
|
return "";
|
||||||
|
});
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue