fix: populate integrations menu when empty
This commit is contained in:
@@ -93,6 +93,8 @@ internal sealed class PayloadHandler {
|
|||||||
.FirstOrDefault(chunk => chunk is PlayerPayload) as PlayerPayload;
|
.FirstOrDefault(chunk => chunk is PlayerPayload) as PlayerPayload;
|
||||||
|
|
||||||
if (ImGui.BeginMenu(Language.Context_Integrations)) {
|
if (ImGui.BeginMenu(Language.Context_Integrations)) {
|
||||||
|
var cursor = ImGui.GetCursorPos();
|
||||||
|
|
||||||
foreach (var id in registered) {
|
foreach (var id in registered) {
|
||||||
try {
|
try {
|
||||||
this.Ui.Plugin.Ipc.Invoke(id, sender, contentId, payload, chunk.Message?.SenderSource, chunk.Message?.ContentSource);
|
this.Ui.Plugin.Ipc.Invoke(id, sender, contentId, payload, chunk.Message?.SenderSource, chunk.Message?.ContentSource);
|
||||||
@@ -101,6 +103,12 @@ internal sealed class PayloadHandler {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (cursor == ImGui.GetCursorPos()) {
|
||||||
|
ImGui.PushStyleColor(ImGuiCol.Text, ImGui.GetStyle().Colors[(int) ImGuiCol.TextDisabled]);
|
||||||
|
ImGui.Text("No integrations available");
|
||||||
|
ImGui.PopStyleColor();
|
||||||
|
}
|
||||||
|
|
||||||
ImGui.EndMenu();
|
ImGui.EndMenu();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user