mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-27 19:09:18 +01:00
feat: add better IPC
This commit is contained in:
parent
02ea2abf4c
commit
ef3687f8d2
2 changed files with 57 additions and 0 deletions
|
|
@ -190,14 +190,29 @@ namespace Dalamud.Interface
|
|||
Log.Debug(msg.Expand);
|
||||
});
|
||||
|
||||
if (ImGui.Button("Add test sub any")) i1.SubscribeAny((o, a) => {
|
||||
dynamic msg = a;
|
||||
Log.Debug($"From {o}: {msg.Expand}");
|
||||
});
|
||||
|
||||
if (ImGui.Button("Remove test sub")) i1.Unsubscribe("DalamudTestPub");
|
||||
|
||||
if (ImGui.Button("Remove test sub any")) i1.UnsubscribeAny();
|
||||
|
||||
if (ImGui.Button("Send test message")) {
|
||||
dynamic testMsg = new ExpandoObject();
|
||||
testMsg.Expand = "dong";
|
||||
i2.SendMessage(testMsg);
|
||||
}
|
||||
|
||||
// This doesn't actually work, so don't mind it - impl relies on plugins being registered in PluginManager
|
||||
if (ImGui.Button("Send test message any"))
|
||||
{
|
||||
dynamic testMsg = new ExpandoObject();
|
||||
testMsg.Expand = "dong";
|
||||
i2.SendMessage("DalamudTestSub", testMsg);
|
||||
}
|
||||
|
||||
foreach (var sub in this.dalamud.PluginManager.IpcSubscriptions) {
|
||||
ImGui.Text($"Source:{sub.SourcePluginName} Sub:{sub.SubPluginName}");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue