diff --git a/GUI/extensions.h b/GUI/extensions.h index df0ce6a..3937f40 100644 --- a/GUI/extensions.h +++ b/GUI/extensions.h @@ -6,10 +6,12 @@ #include #include #include +#include std::map LoadExtensions(); std::wstring DispatchSentenceToExtensions(std::wstring sentence, std::unordered_map miscInfo); typedef std::wstring(*ExtensionFunction)(std::wstring, std::unordered_map&); +extern QComboBox* ttCombo; #endif // EXTENSIONS_H diff --git a/GUI/hostsignaller.cpp b/GUI/hostsignaller.cpp index 6d89421..7287f81 100644 --- a/GUI/hostsignaller.cpp +++ b/GUI/hostsignaller.cpp @@ -10,7 +10,10 @@ void HostSignaller::Initialize() emit AddThread(thread); thread->RegisterOutputCallBack([&](TextThread* thread, std::wstring output) { - output = DispatchSentenceToExtensions(output, {}); + output = DispatchSentenceToExtensions(output, + { + { "current select", ttCombo->currentText().split(":")[0].toInt() == thread->Number() ? 1 : 0 } + }); emit ThreadOutput(thread, QString::fromWCharArray(output.c_str())); return output; });