v1.0.0.15: Top/Bottom Info Bars, Repair %, order, fonts, colors
Made-with: Cursor
This commit is contained in:
@@ -278,7 +278,7 @@ public class MinimapOptionsTab : ITabItem
|
||||
|
||||
ImGuiHelpers.ScaledDummy(5.0f);
|
||||
|
||||
configChanged |= ImGui.DragFloat("Size", ref System.SystemConfig.MinimapSize, 5.0f, 80.0f, 400.0f, "%.0f");
|
||||
configChanged |= ImGui.DragFloat("Size", ref System.SystemConfig.MinimapSize, 5.0f, 200.0f, 400.0f, "%.0f");
|
||||
if (ImGui.IsItemHovered(ImGuiHoveredFlags.AllowWhenDisabled))
|
||||
ImGui.SetTooltip("Minimap size. Resize only via this setting (no corner grip).");
|
||||
configChanged |= ImGui.DragFloat2("Position", ref System.SystemConfig.MinimapPosition);
|
||||
@@ -312,12 +312,110 @@ public class MinimapOptionsTab : ITabItem
|
||||
if (ImGui.IsItemHovered(ImGuiHoveredFlags.AllowWhenDisabled))
|
||||
ImGui.SetTooltip("When enabled, the minimap hides during NPC dialogue, object interaction, and when the game hides nameplates (same as the main map). When disabled, the minimap stays visible in those situations.");
|
||||
configChanged |= ImGui.Checkbox("Lock Position", ref System.SystemConfig.MinimapLockPosition);
|
||||
configChanged |= ImGui.Checkbox("Show Top Info Bar", ref System.SystemConfig.MinimapShowMapInfoBar);
|
||||
if (ImGui.IsItemHovered(ImGuiHoveredFlags.AllowWhenDisabled))
|
||||
ImGui.SetTooltip("Show current map info (region, map, area, sub-area) at the top of the minimap. Respects the main map label settings (Show Region/Map/Area/Sub-Area Text).");
|
||||
|
||||
if (System.SystemConfig.MinimapShowMapInfoBar) {
|
||||
using (ImRaii.PushIndent()) {
|
||||
configChanged |= DrawMapInfoOrderControls();
|
||||
configChanged |= ImGuiTweaks.ColorEditWithDefault("Top Info Bar Text Color", ref System.SystemConfig.MinimapMapInfoColor, KnownColor.White.Vector());
|
||||
configChanged |= ImGui.DragFloat("Top Info Bar Font Scale", ref System.SystemConfig.MinimapMapInfoFontScale, 0.05f, 0.5f, 2.0f, "%.2f");
|
||||
configChanged |= ImGuiTweaks.ColorEditWithDefault("Top Info Bar Background", ref System.SystemConfig.MinimapMapInfoBarBackground, new Vector4(0f, 0f, 0f, 0.2f));
|
||||
var mapInfoFont = System.SystemConfig.MinimapMapInfoFontType;
|
||||
if (ImGui.Combo("Top Info Bar Font", ref mapInfoFont, "Default\0Game Font (Axis 12pt)\0Game Font (Axis 18pt)\0")) {
|
||||
System.SystemConfig.MinimapMapInfoFontType = mapInfoFont;
|
||||
configChanged = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
configChanged |= ImGui.Checkbox("Show Bottom Info Bar", ref System.SystemConfig.MinimapShowCoordinateBar);
|
||||
if (ImGui.IsItemHovered(ImGuiHoveredFlags.AllowWhenDisabled))
|
||||
ImGui.SetTooltip("Show player coordinates, repair % (most damaged item condition), and local time at the bottom of the minimap.");
|
||||
|
||||
if (System.SystemConfig.MinimapShowCoordinateBar) {
|
||||
using (ImRaii.PushIndent()) {
|
||||
configChanged |= DrawBottomBarOrderControls();
|
||||
configChanged |= ImGui.Checkbox("Show Coordinates", ref System.SystemConfig.MinimapCoordBarShowCoordinates);
|
||||
configChanged |= ImGui.Checkbox("Show Local Time", ref System.SystemConfig.MinimapCoordBarShowTime);
|
||||
configChanged |= ImGui.Checkbox("Show Repair %", ref System.SystemConfig.MinimapCoordBarShowRepairPercent);
|
||||
if (ImGui.IsItemHovered(ImGuiHoveredFlags.AllowWhenDisabled))
|
||||
ImGui.SetTooltip("Show condition % of your most damaged equipped item.");
|
||||
configChanged |= ImGuiTweaks.ColorEditWithDefault("Bottom Info Bar Text Color", ref System.SystemConfig.MinimapCoordBarColor, KnownColor.White.Vector());
|
||||
configChanged |= ImGuiTweaks.ColorEditWithDefault("Bottom Info Bar Background", ref System.SystemConfig.MinimapCoordBarBackground, new Vector4(0f, 0f, 0f, 0.2f));
|
||||
configChanged |= ImGui.DragFloat("Bottom Info Bar Font Scale", ref System.SystemConfig.MinimapCoordBarFontScale, 0.05f, 0.5f, 2.0f, "%.2f");
|
||||
var coordFont = System.SystemConfig.MinimapCoordBarFontType;
|
||||
if (ImGui.Combo("Bottom Info Bar Font", ref coordFont, "Default\0Game Font (Axis 12pt)\0Game Font (Axis 18pt)\0")) {
|
||||
System.SystemConfig.MinimapCoordBarFontType = coordFont;
|
||||
configChanged = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (configChanged) {
|
||||
SystemConfig.Save();
|
||||
}
|
||||
}
|
||||
|
||||
private static bool DrawMapInfoOrderControls()
|
||||
{
|
||||
var configChanged = false;
|
||||
var order = System.SystemConfig.MinimapMapInfoOrder;
|
||||
if (order.Length != 4) {
|
||||
System.SystemConfig.MinimapMapInfoOrder = [0, 1, 2, 3];
|
||||
order = System.SystemConfig.MinimapMapInfoOrder;
|
||||
}
|
||||
var labels = new[] { "Region", "Map", "Area", "SubArea" };
|
||||
if (ImGui.TreeNode("Top Info Bar Order (line 1: first two, line 2: next two)")) {
|
||||
for (var i = 0; i < 4; i++) {
|
||||
var idx = Math.Clamp(order[i], 0, 3);
|
||||
ImGui.Text($"{(i + 1)}. {labels[idx]}");
|
||||
ImGui.SameLine(120f * ImGuiHelpers.GlobalScale);
|
||||
if (ImGui.Button($"↑##up{i}") && i > 0) {
|
||||
(order[i], order[i - 1]) = (order[i - 1], order[i]);
|
||||
configChanged = true;
|
||||
}
|
||||
ImGui.SameLine();
|
||||
if (ImGui.Button($"↓##down{i}") && i < 3) {
|
||||
(order[i], order[i + 1]) = (order[i + 1], order[i]);
|
||||
configChanged = true;
|
||||
}
|
||||
}
|
||||
ImGui.TreePop();
|
||||
}
|
||||
return configChanged;
|
||||
}
|
||||
|
||||
private static bool DrawBottomBarOrderControls()
|
||||
{
|
||||
var configChanged = false;
|
||||
var order = System.SystemConfig.MinimapBottomBarOrder;
|
||||
if (order.Length != 3) {
|
||||
System.SystemConfig.MinimapBottomBarOrder = [0, 1, 2];
|
||||
order = System.SystemConfig.MinimapBottomBarOrder;
|
||||
}
|
||||
var labels = new[] { "Coordinates", "Repair %", "Local Time" };
|
||||
if (ImGui.TreeNode("Bottom Info Bar Order")) {
|
||||
for (var i = 0; i < 3; i++) {
|
||||
var idx = Math.Clamp(order[i], 0, 2);
|
||||
ImGui.Text($"{(i + 1)}. {labels[idx]}");
|
||||
ImGui.SameLine(140f * ImGuiHelpers.GlobalScale);
|
||||
if (ImGui.Button($"↑##bottomup{i}") && i > 0) {
|
||||
(order[i], order[i - 1]) = (order[i - 1], order[i]);
|
||||
configChanged = true;
|
||||
}
|
||||
ImGui.SameLine();
|
||||
if (ImGui.Button($"↓##bottomdown{i}") && i < 2) {
|
||||
(order[i], order[i + 1]) = (order[i + 1], order[i]);
|
||||
configChanged = true;
|
||||
}
|
||||
}
|
||||
ImGui.TreePop();
|
||||
}
|
||||
return configChanged;
|
||||
}
|
||||
}
|
||||
|
||||
public class PlayerOptionsTab : ITabItem
|
||||
|
||||
Reference in New Issue
Block a user