Skip to content

Commit

Permalink
Simplify outline drawing
Browse files Browse the repository at this point in the history
  • Loading branch information
MidoriKami committed Aug 10, 2024
1 parent 3548f82 commit 15ac9f2
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions Mappy/Classes/DrawHelpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -140,14 +140,12 @@ private static void DrawIcon(MarkerInfo markerInfo) {
ImGui.Image(texture.ImGuiHandle, iconSize, Vector2.Zero, Vector2.One, System.IconConfig.IconSettingMap[markerInfo.IconId].Color);

if (DebugMode) {
ImGui.GetWindowDrawList().AddRect(cursorScreenPos + new Vector2(1.0f, 0.0f), cursorScreenPos + iconSize, ImGui.GetColorU32(KnownColor.White.Vector()), 3.0f);
ImGui.GetWindowDrawList().AddRect(cursorScreenPos + new Vector2(-1.0f, 0.0f), cursorScreenPos + iconSize, ImGui.GetColorU32(KnownColor.White.Vector()), 3.0f);
ImGui.GetWindowDrawList().AddRect(cursorScreenPos + new Vector2(0.0f, 1.0f), cursorScreenPos + iconSize, ImGui.GetColorU32(KnownColor.White.Vector()), 3.0f);
ImGui.GetWindowDrawList().AddRect(cursorScreenPos + new Vector2(0.0f, -1.0f), cursorScreenPos + iconSize, ImGui.GetColorU32(KnownColor.White.Vector()), 3.0f);
ImGui.GetWindowDrawList().AddRect(cursorScreenPos + new Vector2(1.0f, 0.0f), cursorScreenPos + iconSize + new Vector2(1.0f, 0.0f), ImGui.GetColorU32(KnownColor.White.Vector()), 3.0f);
ImGui.GetWindowDrawList().AddRect(cursorScreenPos + new Vector2(-1.0f, 0.0f), cursorScreenPos + iconSize + new Vector2(-1.0f, 0.0f), ImGui.GetColorU32(KnownColor.White.Vector()), 3.0f);
ImGui.GetWindowDrawList().AddRect(cursorScreenPos + new Vector2(0.0f, 1.0f), cursorScreenPos + iconSize + new Vector2(0.0f, 1.0f), ImGui.GetColorU32(KnownColor.White.Vector()), 3.0f);
ImGui.GetWindowDrawList().AddRect(cursorScreenPos + new Vector2(0.0f, -1.0f), cursorScreenPos + iconSize + new Vector2(0.0f, -1.0f), ImGui.GetColorU32(KnownColor.White.Vector()), 3.0f);
foreach (var x in Enumerable.Range(-1, 3)) {
foreach (var y in Enumerable.Range(-1, 3)) {
ImGui.GetWindowDrawList().AddRect(cursorScreenPos + new Vector2(x, y), cursorScreenPos + iconSize, ImGui.GetColorU32(KnownColor.White.Vector()), 3.0f);
}
}

ImGui.GetWindowDrawList().AddRect(cursorScreenPos, cursorScreenPos + iconSize, ImGui.GetColorU32(KnownColor.Red.Vector()), 3.0f);
}
}
Expand Down

0 comments on commit 15ac9f2

Please sign in to comment.