forked from TehCheat/HealthBars
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathHealthBarsSettings.cs
More file actions
211 lines (178 loc) · 8.95 KB
/
HealthBarsSettings.cs
File metadata and controls
211 lines (178 loc) · 8.95 KB
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
using ExileCore.Shared.Attributes;
using ExileCore.Shared.Interfaces;
using ExileCore.Shared.Nodes;
using Newtonsoft.Json;
using SharpDX;
using Vector2 = System.Numerics.Vector2;
namespace HealthBars;
public class HealthBarsSettings : ISettings
{
public ToggleNode Enable { get; set; } = new(true);
public ToggleNode IgnoreUiElementVisibility { get; set; } = new(false);
public ToggleNode ShowInTown { get; set; } = new(false);
public ToggleNode ShowInHideout { get; set; } = new(true);
public ToggleNode EnableAbsolutePlayerBarPositioning { get; set; } = new(false);
[ConditionalDisplay(nameof(EnableAbsolutePlayerBarPositioning))]
public RangeNode<Vector2> PlayerBarPosition { get; set; } = new(new Vector2(1000, 1000), Vector2.Zero, Vector2.One * 4000);
public RangeNode<float> SmoothingFactor { get; set; } = new(0, 0, 0.99f);
[ConditionalDisplay(nameof(EnableAbsolutePlayerBarPositioning), false)]
public RangeNode<float> PlayerSmoothingFactor { get; set; } = new(1, 0, 1);
public RangeNode<int> GlobalZOffset { get; set; } = new(0, -300, 300);
[ConditionalDisplay(nameof(EnableAbsolutePlayerBarPositioning), false)]
public RangeNode<int> PlayerZOffset { get; set; } = new(0, -300, 300);
[Menu(null, "By default, bar is placed relative to the model top")]
public ToggleNode PlaceBarRelativeToGroundLevel { get; set; } = new(false);
[Menu(null, "By default, bar is placed relative to the model top")]
[ConditionalDisplay(nameof(EnableAbsolutePlayerBarPositioning), false)]
public ToggleNode PlacePlayerBarRelativeToGroundLevel { get; set; } = new(false);
public RangeNode<int> DrawDistanceLimit { get; set; } = new(133, 0, 1000);
public ToggleNode MultiThreading { get; set; } = new(false);
public RangeNode<int> MinimumEntitiesForMultithreading { get; set; } = new(10, 1, 200);
public RangeNode<int> ShowMinionOnlyWhenBelowHp { get; set; } = new(50, 1, 100);
public RangeNode<int> DpsEstimateDuration { get; set; } = new(2000, 500, 10000);
public RangeNode<int> CullPercent { get; set; } = new(10, 0, 100);
[Menu(null, "Combines Life and ES into a single bar that's filled proportionally to the total EHP")]
public ToggleNode CombineLifeAndEs { get; set; } = new(true);
[ConditionalDisplay(nameof(CombineLifeAndEs), false)]
public RangeNode<float> EsBarHeight { get; set; } = new(1 / 3f, 0, 1);
public ColorNode CombatDamageColor { get; set; } = Color.Red;
public ColorNode CombatHealColor { get; set; } = Color.Green;
public ToggleNode ResizeBarsToFitText { get; set; } = new(true);
public ToggleNode UseShadedTexture { get; set; } = new(true);
[JsonIgnore]
public ButtonNode ExportDefaultConfig { get; set; } = new ButtonNode();
public ToggleNode UseOldConfigFormat { get; set; } = new(false);
public BossOverlaySettings BossOverlaySettings { get; set; } = new();
public CommonCastBarSettings CommonCastBarSettings { get; set; } = new();
public UnitSettings Self { get; set; } = new()
{
LifeColor = Extensions.FromHex(0x008000),
TextFormat = { Value = "{percent}%" },
ShowDps = { Value = false },
};
public UnitSettings UniqueEnemy { get; set; } = new()
{
LifeColor = Extensions.FromHex(0xffa500),
OutlineColor = Extensions.FromHex(0xffa500),
TextColor = Extensions.FromHex(0x66ff99),
Width = { Value = 200 },
Height = { Value = 25 },
IncludeInBossOverlay = { Value = true },
};
public UnitSettings RareEnemy { get; set; } = new()
{
LifeColor = Extensions.FromHex(0xf4ff19),
OutlineColor = Extensions.FromHex(0xf4ff19),
TextColor = Extensions.FromHex(0x66ff99),
Width = { Value = 125 },
Height = { Value = 20 },
};
public UnitSettings MagicEnemy { get; set; } = new()
{
LifeColor = Extensions.FromHex(0x8888ff),
OutlineColor = Extensions.FromHex(0x8888ff),
TextColor = Extensions.FromHex(0x66ff99),
Width = { Value = 100 },
Height = { Value = 15 },
TextFormat = { Value = "" },
ShowDps = { Value = false },
};
public UnitSettings NormalEnemy { get; set; } = new()
{
LifeColor = Extensions.FromHex(0xff0000),
TextColor = Extensions.FromHex(0x66ff66),
Width = { Value = 75 },
Height = { Value = 10 },
TextFormat = { Value = "" },
ShowDps = { Value = false },
};
public UnitSettings Minions { get; set; } = new()
{
LifeColor = Extensions.FromHex(0x90ee90),
TextFormat = { Value = "" },
ShowDps = { Value = false },
};
public UnitSettings Players { get; set; } = new()
{
LifeColor = Extensions.FromHex(0x008000),
TextFormat = { Value = "{percent}%" },
ShowDps = { Value = false },
};
public LegionSettings LegionSettings { get; set; } = new LegionSettings();
}
[Submenu(CollapsedByDefault = true)]
public class UnitSettings
{
public ToggleNode Show { get; set; } = new(true);
public RangeNode<float> Width { get; set; } = new(100, 20, 250);
public RangeNode<float> Height { get; set; } = new(20, 5, 150);
public RangeNode<int> OutlineThickness { get; set; } = new(1, 0, 20);
public RangeNode<int> HealthSegments { get; set; } = new(1, 1, 10);
public RangeNode<float> HealthSegmentHeight { get; set; } = new(0.5f, 0, 1);
public ColorNode LifeColor { get; set; } = Color.White;
public ColorNode EsColor { get; set; } = Color.Aqua;
public ColorNode CullableColor { get; set; } = Color.White;
public ColorNode BackgroundColor { get; set; } = Color.Black;
public ColorNode OutlineColor { get; set; } = Color.Transparent;
public ColorNode TextColor { get; set; } = Color.White;
public ColorNode TextBackground { get; set; } = Color.Black;
public ColorNode HealthSegmentColor { get; set; } = Color.Black;
public RangeNode<Vector2> TextPosition { get; set; } = new(new Vector2(0, -1), new Vector2(-1, -1), new Vector2(1, 1));
public ToggleNode ShowDps { get; set; } = new(true);
public RangeNode<float> HoverOpacity { get; set; } = new(1, 0, 1);
public ToggleNode IncludeInBossOverlay { get; set; } = new(false);
[Menu(null,
"Text template to show next to the bar. Available variables are:\n" +
"{percent} - current percent of total HP (Life + ES)\n" +
"{current} - current HP (Life + ES) value\n" +
"{total} - total HP (Life + ES)\n" +
"{currentes} - current ES\n" +
"{currentlife} - current Life\n\n" +
"Example:\n" +
"{percent}% {current}/{total} -> 50% 5.00K/10.0K")]
public TextNode TextFormat { get; set; } = "{percent}% {current}/{total}";
public CastBarSettings CastBarSettings { get; set; } = new();
}
[Submenu]
public class CastBarSettings
{
public ToggleNode Show { get; set; } = new(false);
public RangeNode<float> Height { get; set; } = new(30, 5, 150);
public ColorNode BackgroundColor { get; set; } = Color.Black;
public ColorNode FillColor { get; set; } = Color.Aqua;
public ColorNode DangerTextColor { get; set; } = Color.Red;
public ColorNode NoDangerTextColor { get; set; } = Color.Blue;
public ColorNode StageTextColor { get; set; } = Color.White;
public RangeNode<float> YOffset { get; set; } = new(0, -5, 5);
public ToggleNode ShowStageNames { get; set; } = new(true);
}
[Submenu(CollapsedByDefault = true)]
public class CommonCastBarSettings
{
public RangeNode<int> MaxSkillNameLength { get; set; } = new(5, 0, 30);
public RangeNode<int> MaxSkillNameLengthForBossOverlay { get; set; } = new(20, 0, 30);
public ToggleNode ShowNextStageName { get; set; } = new(true);
public ToggleNode ShowNextStageNameInBossOverlay { get; set; } = new(true);
public ToggleNode DebugShowAllSkillStages { get; set; } = new(false);
[Menu(null, "Remove part of castbar after the last \"interesting\" point unless there are none in the animation")]
public ToggleNode CutOffBackswing { get; set; } = new(true);
}
[Submenu(CollapsedByDefault = true)]
public class BossOverlaySettings
{
public ToggleNode Show { get; set; } = new(true);
public RangeNode<int> ItemSpacing { get; set; } = new(100, 0, 500);
public RangeNode<int> BarHeight { get; set; } = new(20, 0, 150);
public RangeNode<int> Width { get; set; } = new(500, 0, 1000);
public RangeNode<Vector2> Location { get; set; } = new(new Vector2(10, 300), Vector2.Zero, Vector2.One * 4000);
public ToggleNode ShowCastBarStageNames { get; set; } = new ToggleNode(false);
public ToggleNode ShowMonsterNames { get; set; } = new ToggleNode(true);
public RangeNode<int> MaxEntries { get; set; } = new(5, 0, 10);
}
[Submenu(CollapsedByDefault = true)]
public class LegionSettings
{
public ToggleNode ShowHiddenNormalAndMagicMonsters { get; set; } = new ToggleNode(false);
public ToggleNode ShowHiddenRareMonsters { get; set; } = new ToggleNode(true);
public ToggleNode ShowHiddenUniqueMonsters { get; set; } = new ToggleNode(true);
}