feat: add context menu option

This commit is contained in:
Anna 2022-07-18 16:59:52 -04:00
parent 9aa1059e4d
commit 3d1a09937a
3 changed files with 6 additions and 0 deletions

View File

@ -11,6 +11,7 @@ internal class Configuration : IPluginConfiguration {
public int Version { get; set; } = 1;
public bool UseNativeToasts = true;
public bool ShowContextMenuItem = true;
public XivChatType DefaultChannel = XivChatType.Debug;
public Dictionary<ulong, ConfigInfo> Configs { get; } = new();

View File

@ -130,6 +130,10 @@ public class Plugin : IDalamudPlugin {
}
private void OnOpenGameObjectContextMenu(GameObjectContextMenuOpenArgs args) {
if (!this.Config.ShowContextMenuItem) {
return;
}
if (args.ObjectId != 0xE0000000) {
this.ObjectContext(args);
return;

View File

@ -171,6 +171,7 @@ internal class PluginUi : IDisposable {
private void DrawSettingsGeneral(ref bool anyChanged) {
anyChanged |= ImGui.Checkbox("Use native toasts", ref this.Plugin.Config.UseNativeToasts);
anyChanged |= ImGui.Checkbox("Add invite context menu item", ref this.Plugin.Config.ShowContextMenuItem);
// ImGui.Spacing();
//
// ImGui.TextUnformatted("Default channel");