fix: round instead of truncate in pixel mode

This commit is contained in:
Anna 2021-03-13 19:30:42 -05:00
parent dd64edc012
commit 29944dcd3e
1 changed files with 2 additions and 2 deletions

View File

@ -483,7 +483,7 @@ namespace HUD_Manager {
var screen = ImGui.GetIO().DisplaySize;
ImGui.PushItemWidth(-1);
var x = (int) Math.Truncate(element.X * screen.X / 100);
var x = (int) Math.Round(element.X * screen.X / 100);
if (ImGui.InputInt($"##x-{kind}", ref x)) {
element.X = x / screen.X * 100;
update = true;
@ -494,7 +494,7 @@ namespace HUD_Manager {
DrawSettingName("Y");
ImGui.PushItemWidth(-1);
var y = (int) Math.Truncate(element.Y * screen.Y / 100);
var y = (int) Math.Round(element.Y * screen.Y / 100);
if (ImGui.InputInt($"##y-{kind}", ref y)) {
element.Y = y / screen.Y * 100;
update = true;