forked from Arecurius0/Delve
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDelveMenu.cs
More file actions
174 lines (168 loc) · 8.81 KB
/
DelveMenu.cs
File metadata and controls
174 lines (168 loc) · 8.81 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
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using CoPilot;
using ImGuiNET;
using System.Numerics;
namespace Delve
{
partial class DelveCore
{
public void DelveMenu(int idIn, out int idPop)
{
idPop = idIn;
if (ImGui.TreeNode("Delve Path's"))
{
ImGui.PushID(idPop);
Settings.DelvePathWays.Value = ImGuiExtension.Checkbox(Settings.DelvePathWays.Value ? "Show" : "Hidden", Settings.DelvePathWays);
ImGui.PopID();
idPop++;
ImGui.Spacing();
ImGui.PushID(idPop);
Settings.DelvePathWaysNodeSize.Value = ImGuiExtension.IntSlider("Size", Settings.DelvePathWaysNodeSize);
ImGui.PopID();
idPop++;
ImGui.PushID(idPop);
Settings.DelvePathWaysNodeColor = ImGuiExtension.ColorPicker("Color", Settings.DelvePathWaysNodeColor);
ImGui.PopID();
idPop++;
ImGui.Spacing();
ImGui.Spacing();
Settings.DelveWall.Value = ImGuiExtension.Checkbox($"Breakable Wall##{idPop}", Settings.DelveWall);
idPop++;
Settings.DelveWallSize.Value = ImGuiExtension.IntSlider($"Size##{idPop}", Settings.DelveWallSize);
idPop++;
Settings.DelveWallColor.Value = ImGuiExtension.ColorPicker($"Color##{idPop}", Settings.DelveWallColor);
idPop++;
ImGui.TreePop();
}
if (ImGui.TreeNode("Delve Chests"))
{
ImGui.PushID(idPop);
Settings.DelveChests.Value = ImGuiExtension.Checkbox(Settings.DelveChests.Value ? "Show" : "Hidden", Settings.DelveChests);
ImGui.PopID();
idPop++;
ImGui.Spacing();
ImGui.Spacing();
Settings.DelvePathwayChest.Value = ImGuiExtension.Checkbox($"Hidden Chests on the way##{idPop}", Settings.DelvePathwayChest);
idPop++;
Settings.DelvePathwayChestSize.Value = ImGuiExtension.IntSlider($"Size##{idPop}", Settings.DelvePathwayChestSize);
idPop++;
Settings.DelvePathwayChestColor.Value = ImGuiExtension.ColorPicker($"Color##{idPop}", Settings.DelvePathwayChestColor);
idPop++;
ImGui.Spacing();
ImGui.Spacing();
Settings.DelveMiningSuppliesDynamiteChest.Value = ImGuiExtension.Checkbox($"Dynamite Supplies##{idPop}", Settings.DelveMiningSuppliesDynamiteChest);
idPop++;
Settings.DelveMiningSuppliesDynamiteChestSize.Value = ImGuiExtension.IntSlider($"Size##{idPop}", Settings.DelveMiningSuppliesDynamiteChestSize);
idPop++;
Settings.DelveMiningSuppliesDynamiteChestColor.Value = ImGuiExtension.ColorPicker($"Color##{idPop}", Settings.DelveMiningSuppliesDynamiteChestColor);
idPop++;
ImGui.Spacing();
ImGui.Spacing();
Settings.DelveMiningSuppliesFlaresChest.Value = ImGuiExtension.Checkbox($"Flare Supplies##{idPop}", Settings.DelveMiningSuppliesFlaresChest);
idPop++;
Settings.DelveMiningSuppliesFlaresChestSize.Value = ImGuiExtension.IntSlider($"Size##{idPop}", Settings.DelveMiningSuppliesFlaresChestSize);
idPop++;
Settings.DelveMiningSuppliesFlaresChestColor.Value = ImGuiExtension.ColorPicker($"Color##{idPop}", Settings.DelveMiningSuppliesFlaresChestColor);
idPop++;
ImGui.Spacing();
ImGui.Spacing();
Settings.DelveCurrencyChest.Value = ImGuiExtension.Checkbox($"Currency Chests##{idPop}", Settings.DelveCurrencyChest);
idPop++;
Settings.DelveCurrencyChestSize.Value = ImGuiExtension.IntSlider($"Size##{idPop}", Settings.DelveCurrencyChestSize);
idPop++;
Settings.DelveCurrencyChestColor.Value = ImGuiExtension.ColorPicker($"Color##{idPop}", Settings.DelveCurrencyChestColor);
idPop++;
ImGui.Spacing();
ImGui.Spacing();
Settings.DelveAzuriteVeinChest.Value = ImGuiExtension.Checkbox($"Azurite Veins##{idPop}", Settings.DelveAzuriteVeinChest);
idPop++;
Settings.DelveAzuriteVeinChestSize.Value = ImGuiExtension.IntSlider($"Size##{idPop}", Settings.DelveAzuriteVeinChestSize);
idPop++;
Settings.DelveAzuriteVeinChestColor.Value = ImGuiExtension.ColorPicker($"Color##{idPop}", Settings.DelveAzuriteVeinChestColor);
idPop++;
ImGui.Spacing();
ImGui.Spacing();
Settings.DelveResonatorChest.Value = ImGuiExtension.Checkbox($"Resonator Chests##{idPop}", Settings.DelveResonatorChest);
idPop++;
Settings.DelveResonatorChestSize.Value = ImGuiExtension.IntSlider($"Size##{idPop}", Settings.DelveResonatorChestSize);
idPop++;
Settings.DelveResonatorChestColor.Value = ImGuiExtension.ColorPicker($"Color##{idPop}", Settings.DelveResonatorChestColor);
idPop++;
ImGui.Spacing();
ImGui.Spacing();
Settings.DelveFossilChest.Value = ImGuiExtension.Checkbox($"Fossil Chests##{idPop}", Settings.DelveFossilChest);
idPop++;
Settings.DelveFossilChestSize.Value = ImGuiExtension.IntSlider($"Size##{idPop}", Settings.DelveFossilChestSize);
idPop++;
Settings.DelveFossilChestColor.Value = ImGuiExtension.ColorPicker($"Color##{idPop}", Settings.DelveFossilChestColor);
idPop++;
ImGui.Spacing();
ImGui.Spacing();
ImGui.TreePop();
}
if(ImGui.TreeNode("Delve Mine Map Stuff"))
{
ImGui.PushID(idPop);
Settings.DelveMineMapConnections.Value = ImGuiExtension.Checkbox($"Show Connections###{idPop}", Settings.DelveMineMapConnections.Value);
ImGui.PopID();
idPop++;
Settings.ShowRadiusPercentage.Value = ImGuiExtension.IntSlider($"Radius (%)##{idPop}", Settings.ShowRadiusPercentage);
idPop++;
Settings.DrawPaths.Value = ImGuiExtension.Checkbox($"Draw Path's###{idPop}", Settings.DrawPaths.Value);
idPop++;
Settings.OnlyShowHiddenPaths.Value = ImGuiExtension.Checkbox($"Draw only Hidden Path's###{idPop}", Settings.OnlyShowHiddenPaths.Value);
idPop++;
Settings.ColoredPaths.Value = ImGuiExtension.Checkbox($"Draw Path's with Biom Color###{idPop}", Settings.ColoredPaths.Value);
idPop++;
Settings.DrawStraightPaths.Value = ImGuiExtension.Checkbox($"Draw Straight Path's###{idPop}", Settings.DrawStraightPaths.Value);
idPop++;
ImGui.TreePop();
}
if (ImGui.TreeNode("Delve Map Grid"))
{
ImGui.PushID(idPop);
Settings.DelveGridMap.Value = ImGuiExtension.Checkbox(Settings.DelveGridMap.Value ? "Show" : "Hidden", Settings.DelveGridMap);
ImGui.PopID();
idPop++;
ImGui.PushID(idPop);
if (ImGui.Button("Set current Delve Zoom as the zoom you want to show grid"))
{
Settings.DelveGridMapScale = CurrentDelveMapZoom;
}
ImGui.PopID();
idPop++;
ImGui.TreePop();
}
if (ImGui.TreeNode("Debug Mode"))
{
ImGui.PushID(idPop);
Settings.DebugHotkey.Value = ImGuiExtension.HotkeySelector($"Debug Mode Hotkey", Settings.DebugHotkey.Value);
ImGui.PopID();
idPop++;
Settings.DebugMode.Value = ImGuiExtension.Checkbox($"Debug Mode##{idPop}", Settings.DebugMode);
idPop++;
Settings.ShouldHideOnOpen.Value = ImGuiExtension.Checkbox($"Hide Chest Name When Opened##{idPop}", Settings.ShouldHideOnOpen);
idPop++;
ImGui.TreePop();
}
}
public override void DrawSettings()
{
ImGui.BulletText($"{Name}: v{PluginVersion}");
ImGui.BulletText($"Last Updated: {buildDate}");
idPop = 1;
var collapsingHeaderFlags = ImGuiTreeNodeFlags.CollapsingHeader;
ImGui.PushID(1000);
if (ImGui.TreeNodeEx("Settings", collapsingHeaderFlags))
{
DelveMenu(idPop, out var newInt);
idPop = newInt;
}
ImGui.EndChild();
}
}
}