fix: populate integrations menu when empty
This commit is contained in:
parent
9d0de2f386
commit
c1935b1491
|
@ -93,6 +93,8 @@ internal sealed class PayloadHandler {
|
|||
.FirstOrDefault(chunk => chunk is PlayerPayload) as PlayerPayload;
|
||||
|
||||
if (ImGui.BeginMenu(Language.Context_Integrations)) {
|
||||
var cursor = ImGui.GetCursorPos();
|
||||
|
||||
foreach (var id in registered) {
|
||||
try {
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue