mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-21 16:09:19 +01:00
fix(Console): log drawing on scale != 1.0
This commit is contained in:
parent
ca2107d539
commit
2c4f858ced
1 changed files with 9 additions and 4 deletions
|
|
@ -222,6 +222,10 @@ namespace Dalamud.Interface.Internal.Windows
|
||||||
var childDrawList = ImGui.GetWindowDrawList();
|
var childDrawList = ImGui.GetWindowDrawList();
|
||||||
var childSize = ImGui.GetWindowSize();
|
var childSize = ImGui.GetWindowSize();
|
||||||
|
|
||||||
|
var cursorDiv = ImGuiHelpers.GlobalScale * 92;
|
||||||
|
var cursorLogLevel = ImGuiHelpers.GlobalScale * 100;
|
||||||
|
var cursorLogLine = ImGuiHelpers.GlobalScale * 135;
|
||||||
|
|
||||||
lock (this.renderLock)
|
lock (this.renderLock)
|
||||||
{
|
{
|
||||||
clipper.Begin(this.LogEntries.Count);
|
clipper.Begin(this.LogEntries.Count);
|
||||||
|
|
@ -247,15 +251,15 @@ namespace Dalamud.Interface.Internal.Windows
|
||||||
{
|
{
|
||||||
ImGui.TextUnformatted(line.TimeStamp.ToString("HH:mm:ss.fff"));
|
ImGui.TextUnformatted(line.TimeStamp.ToString("HH:mm:ss.fff"));
|
||||||
ImGui.SameLine();
|
ImGui.SameLine();
|
||||||
ImGui.SetCursorPosX(92);
|
ImGui.SetCursorPosX(cursorDiv);
|
||||||
ImGui.TextUnformatted("|");
|
ImGui.TextUnformatted("|");
|
||||||
ImGui.SameLine();
|
ImGui.SameLine();
|
||||||
ImGui.SetCursorPosX(100);
|
ImGui.SetCursorPosX(cursorLogLevel);
|
||||||
ImGui.TextUnformatted(this.GetTextForLogEventLevel(line.Level));
|
ImGui.TextUnformatted(this.GetTextForLogEventLevel(line.Level));
|
||||||
ImGui.SameLine();
|
ImGui.SameLine();
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui.SetCursorPosX(135);
|
ImGui.SetCursorPosX(cursorLogLine);
|
||||||
ImGui.TextUnformatted(line.Line);
|
ImGui.TextUnformatted(line.Line);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -273,7 +277,8 @@ namespace Dalamud.Interface.Internal.Windows
|
||||||
}
|
}
|
||||||
|
|
||||||
// Draw dividing line
|
// Draw dividing line
|
||||||
childDrawList.AddLine(new Vector2(childPos.X + 127, childPos.Y), new Vector2(childPos.X + 127, childPos.Y + childSize.Y), 0x4FFFFFFF, 1.0f);
|
var offset = ImGuiHelpers.GlobalScale * 127;
|
||||||
|
childDrawList.AddLine(new Vector2(childPos.X + offset, childPos.Y), new Vector2(childPos.X + offset, childPos.Y + childSize.Y), 0x4FFFFFFF, 1.0f);
|
||||||
|
|
||||||
ImGui.EndChild();
|
ImGui.EndChild();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue