feat: add context menu option
This commit is contained in:
parent
9aa1059e4d
commit
3d1a09937a
|
@ -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();
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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");
|
||||
|
|
Loading…
Reference in New Issue