diff options
author | StapleButter <thetotalworm@gmail.com> | 2017-11-08 02:02:15 +0100 |
---|---|---|
committer | StapleButter <thetotalworm@gmail.com> | 2017-11-08 02:02:15 +0100 |
commit | bb87a709be9119e23a4d1ae1a593973d97fca488 (patch) | |
tree | b5d5bfbd55db0fdf7f86dc5fc9d1d18579bb5a83 | |
parent | e6e5f487487f53b6db54e7687ea2e3431031f1bd (diff) |
cooler screen positioning in horizontal mode
-rw-r--r-- | src/libui_sdl/main.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libui_sdl/main.cpp b/src/libui_sdl/main.cpp index 5023dac..9861366 100644 --- a/src/libui_sdl/main.cpp +++ b/src/libui_sdl/main.cpp @@ -439,7 +439,7 @@ horizontal = true; // TEST TopScreenRect.Height = heightreq; } TopScreenRect.X = startX; - TopScreenRect.Y = (height - TopScreenRect.Height) / 2; + TopScreenRect.Y = ((height - heightreq) / 2) + (heightreq - TopScreenRect.Height); BottomScreenRect.X = TopScreenRect.X + TopScreenRect.Width + ScreenGap; @@ -453,7 +453,7 @@ horizontal = true; // TEST BottomScreenRect.Width = width - TopScreenRect.Width; BottomScreenRect.Height = heightreq; } - BottomScreenRect.Y = (height - BottomScreenRect.Height) / 2; + BottomScreenRect.Y = ((height - heightreq) / 2) + (heightreq - BottomScreenRect.Height); } else { |