|
@@ -24,7 +24,14 @@ namespace HuntBuddy
|
|
|
|
|
|
|
|
ImGui.SetNextWindowSize(new Vector2(400 * ImGui.GetIO().FontGlobalScale, 500), ImGuiCond.Once);
|
|
ImGui.SetNextWindowSize(new Vector2(400 * ImGui.GetIO().FontGlobalScale, 500), ImGuiCond.Once);
|
|
|
|
|
|
|
|
- if (!ImGui.Begin($"{this.plugin.Name}", ref draw, ImGuiWindowFlags.NoDocking))
|
|
|
|
|
|
|
+ var windowFlags = ImGuiWindowFlags.NoDocking;
|
|
|
|
|
+
|
|
|
|
|
+ if (this.plugin.Configuration.LockWindowPositions)
|
|
|
|
|
+ {
|
|
|
|
|
+ windowFlags |= ImGuiWindowFlags.NoResize | ImGuiWindowFlags.NoMove;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (!ImGui.Begin($"{this.plugin.Name}", ref draw, windowFlags))
|
|
|
{
|
|
{
|
|
|
return draw;
|
|
return draw;
|
|
|
}
|
|
}
|
|
@@ -86,7 +93,7 @@ namespace HuntBuddy
|
|
|
return treeOpen;
|
|
return treeOpen;
|
|
|
}))
|
|
}))
|
|
|
{
|
|
{
|
|
|
- ImGui.Indent();
|
|
|
|
|
|
|
+ //ImGui.Indent();
|
|
|
foreach (var mobHuntEntry in entry.Value)
|
|
foreach (var mobHuntEntry in entry.Value)
|
|
|
{
|
|
{
|
|
|
if (Location.Database.ContainsKey(mobHuntEntry.MobHuntId))
|
|
if (Location.Database.ContainsKey(mobHuntEntry.MobHuntId))
|
|
@@ -110,38 +117,39 @@ namespace HuntBuddy
|
|
|
|
|
|
|
|
ImGui.SameLine();
|
|
ImGui.SameLine();
|
|
|
|
|
|
|
|
- if (Interface.IconButton(FontAwesomeIcon.Compass, $"openRadius##{mobHuntEntry.MobHuntId}"))
|
|
|
|
|
- {
|
|
|
|
|
- Location.CreateMapMarker(
|
|
|
|
|
- mobHuntEntry.TerritoryType,
|
|
|
|
|
- mobHuntEntry.MapId,
|
|
|
|
|
- mobHuntEntry.MobHuntId,
|
|
|
|
|
- mobHuntEntry.Name,
|
|
|
|
|
- Location.OpenType.ShowOpen);
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- if (ImGui.IsItemHovered())
|
|
|
|
|
- {
|
|
|
|
|
- ImGui.BeginTooltip();
|
|
|
|
|
- ImGui.Text("Show hunt location on the map");
|
|
|
|
|
- ImGui.EndTooltip();
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- ImGui.SameLine();
|
|
|
|
|
-
|
|
|
|
|
if (Interface.IconButton(FontAwesomeIcon.MapMarkedAlt, $"open##{mobHuntEntry.MobHuntId}"))
|
|
if (Interface.IconButton(FontAwesomeIcon.MapMarkedAlt, $"open##{mobHuntEntry.MobHuntId}"))
|
|
|
{
|
|
{
|
|
|
|
|
+ var includeArea = this.plugin.Configuration.IncludeAreaOnMap;
|
|
|
|
|
+ if (ImGui.IsKeyDown(ImGuiKey.ModShift))
|
|
|
|
|
+ {
|
|
|
|
|
+ includeArea = !includeArea;
|
|
|
|
|
+ }
|
|
|
Location.CreateMapMarker(
|
|
Location.CreateMapMarker(
|
|
|
mobHuntEntry.TerritoryType,
|
|
mobHuntEntry.TerritoryType,
|
|
|
mobHuntEntry.MapId,
|
|
mobHuntEntry.MapId,
|
|
|
mobHuntEntry.MobHuntId,
|
|
mobHuntEntry.MobHuntId,
|
|
|
- mobHuntEntry.Name);
|
|
|
|
|
|
|
+ mobHuntEntry.Name,
|
|
|
|
|
+ includeArea ? Location.OpenType.ShowOpen : Location.OpenType.MarkerOpen);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if (ImGui.IsItemHovered())
|
|
if (ImGui.IsItemHovered())
|
|
|
{
|
|
{
|
|
|
|
|
+ var color = ImGui.IsKeyDown(ImGuiKey.ModShift) ? new Vector4(0f, 0.7f, 0f, 1f) : new Vector4(0.7f, 0.7f, 0.7f, 1f);
|
|
|
ImGui.BeginTooltip();
|
|
ImGui.BeginTooltip();
|
|
|
- ImGui.Text("Show hunt location on the map");
|
|
|
|
|
|
|
+ if (this.plugin.Configuration.IncludeAreaOnMap)
|
|
|
|
|
+ {
|
|
|
|
|
+ ImGui.Text("Show hunt area on the map");
|
|
|
|
|
+ ImGui.TextColored(
|
|
|
|
|
+ color,
|
|
|
|
|
+ "Hold [SHIFT] to show the location only");
|
|
|
|
|
+ }
|
|
|
|
|
+ else
|
|
|
|
|
+ {
|
|
|
|
|
+ ImGui.Text("Show hunt location on the map");
|
|
|
|
|
+ ImGui.TextColored(
|
|
|
|
|
+ color,
|
|
|
|
|
+ "Hold [SHIFT] to include the area");
|
|
|
|
|
+ }
|
|
|
ImGui.EndTooltip();
|
|
ImGui.EndTooltip();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -192,7 +200,7 @@ namespace HuntBuddy
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- ImGui.Unindent();
|
|
|
|
|
|
|
+ //ImGui.Unindent();
|
|
|
ImGui.TreePop();
|
|
ImGui.TreePop();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -230,6 +238,11 @@ namespace HuntBuddy
|
|
|
windowFlags |= ImGuiWindowFlags.NoBackground;
|
|
windowFlags |= ImGuiWindowFlags.NoBackground;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ if (this.plugin.Configuration.LockWindowPositions)
|
|
|
|
|
+ {
|
|
|
|
|
+ windowFlags |= ImGuiWindowFlags.NoResize | ImGuiWindowFlags.NoMove;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
if (!ImGui.Begin("Hunts in current area", windowFlags))
|
|
if (!ImGui.Begin("Hunts in current area", windowFlags))
|
|
|
{
|
|
{
|
|
|
return;
|
|
return;
|
|
@@ -278,7 +291,7 @@ namespace HuntBuddy
|
|
|
if (ImGui.IsItemHovered())
|
|
if (ImGui.IsItemHovered())
|
|
|
{
|
|
{
|
|
|
ImGui.BeginTooltip();
|
|
ImGui.BeginTooltip();
|
|
|
- ImGui.Text("Show hunt location on the map");
|
|
|
|
|
|
|
+ ImGui.Text("Show hunt area on the map");
|
|
|
ImGui.EndTooltip();
|
|
ImGui.EndTooltip();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -320,13 +333,22 @@ namespace HuntBuddy
|
|
|
{
|
|
{
|
|
|
ImGui.SetNextWindowSize(Vector2.Zero, ImGuiCond.Always);
|
|
ImGui.SetNextWindowSize(Vector2.Zero, ImGuiCond.Always);
|
|
|
|
|
|
|
|
- if (!ImGui.Begin($"{this.plugin.Name} settings", ImGuiWindowFlags.NoDocking))
|
|
|
|
|
|
|
+ var windowFlags = ImGuiWindowFlags.NoDocking;
|
|
|
|
|
+
|
|
|
|
|
+ if (this.plugin.Configuration.LockWindowPositions)
|
|
|
|
|
+ {
|
|
|
|
|
+ windowFlags |= ImGuiWindowFlags.NoResize | ImGuiWindowFlags.NoMove;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (!ImGui.Begin($"{this.plugin.Name} settings", windowFlags))
|
|
|
{
|
|
{
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
var save = false;
|
|
var save = false;
|
|
|
|
|
|
|
|
|
|
+ save |= ImGui.Checkbox("Lock plugin window positions", ref this.plugin.Configuration.LockWindowPositions);
|
|
|
|
|
+ save |= ImGui.Checkbox("Include hunt area on map by default", ref this.plugin.Configuration.IncludeAreaOnMap);
|
|
|
save |= ImGui.Checkbox("Show hunts in local area", ref this.plugin.Configuration.ShowLocalHunts);
|
|
save |= ImGui.Checkbox("Show hunts in local area", ref this.plugin.Configuration.ShowLocalHunts);
|
|
|
save |= ImGui.Checkbox(
|
|
save |= ImGui.Checkbox(
|
|
|
"Show icons of hunts in local area",
|
|
"Show icons of hunts in local area",
|