-
-
Notifications
You must be signed in to change notification settings - Fork 7
/
BigPlayerDebuffsConfig.cs
67 lines (49 loc) · 1.71 KB
/
BigPlayerDebuffsConfig.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
using Dalamud.Configuration;
using Dalamud.Plugin;
using ImGuiNET;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Numerics;
using Dalamud.Game.Text;
namespace BigPlayerDebuffs
{
public class RouletteConfig {
public bool Enabled;
public bool Tank;
public bool Healer;
public bool DPS;
}
public class BigPlayerDebuffsConfig : IPluginConfiguration {
[NonSerialized]
private IDalamudPluginInterface pluginInterface;
[NonSerialized]
private BigPlayerDebuffs plugin;
//[NonSerialized] private bool showWebhookWindow;
public int Version { get; set; }
public float bScale = 1.4f;
public void Init(BigPlayerDebuffs plugin, IDalamudPluginInterface pluginInterface) {
this.plugin = plugin;
this.pluginInterface = pluginInterface;
}
public void Save() {
pluginInterface.SavePluginConfig(this);
plugin.InvalidateState();
}
public bool DrawConfigUI() {
var drawConfig = true;
var scale = ImGui.GetIO().FontGlobalScale;
var modified = false;
ImGui.SetNextWindowSize(new Vector2(500 * scale, 350), ImGuiCond.FirstUseEver);
ImGui.SetNextWindowSizeConstraints(new Vector2(500 * scale, 350), new Vector2(560 * scale, 650));
ImGui.Begin($"{plugin.Name} Config", ref drawConfig, ImGuiWindowFlags.NoCollapse);
modified |= ImGui.SliderFloat("Own Buff/Debuff Scale", ref bScale, 1.0F, 4.0F);
ImGui.End();
if (modified)
{
Save();
}
return drawConfig;
}
}
}