bugfix for extensions
This commit is contained in:
parent
41566e68c1
commit
5fbf92bc07
@ -6,10 +6,12 @@
|
||||
#include <map>
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
#include <QComboBox>
|
||||
|
||||
std::map<int, std::wstring> LoadExtensions();
|
||||
std::wstring DispatchSentenceToExtensions(std::wstring sentence, std::unordered_map<std::string, int> miscInfo);
|
||||
|
||||
typedef std::wstring(*ExtensionFunction)(std::wstring, std::unordered_map<std::string, int>&);
|
||||
extern QComboBox* ttCombo;
|
||||
|
||||
#endif // EXTENSIONS_H
|
||||
|
@ -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;
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user