- fixed slider scaling.

This commit is contained in:
Christoph Oelckers 2019-03-19 18:50:38 +01:00
parent 561ce41723
commit 0abd9d4aec
2 changed files with 3 additions and 3 deletions

View file

@ -285,7 +285,7 @@ class Menu : Object native ui version("2.4")
static void DrawConText (int color, int x, int y, String str) static void DrawConText (int color, int x, int y, String str)
{ {
screen.DrawText (ConFont, color, x, y, str, DTA_CellX, 8 * CleanXfac, DTA_CellY, 8 * CleanYfac); screen.DrawText (ConFont, color, x, y, str, DTA_CellX, 16 * CleanXfac_1, DTA_CellY, 16 * CleanYfac_1);
} }
static int OptionColor(int color) static int OptionColor(int color)

View file

@ -744,13 +744,13 @@ class OptionMenuSliderBase : OptionMenuItem
if (!mSliderShort) if (!mSliderShort)
{ {
Menu.DrawConText(Font.CR_WHITE, x, cy, "\x10\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x12"); Menu.DrawConText(Font.CR_WHITE, x, cy, "\x10\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x12");
Menu.DrawConText(Font.FindFontColor(gameinfo.mSliderColor), x + int((5 + ((ccur * 78) / range)) * CleanXfac_1), cy, "\x13"); Menu.DrawConText(Font.FindFontColor(gameinfo.mSliderColor), x + int((5 + ((ccur * 78) / range)) * 2 * CleanXfac_1), cy, "\x13");
} }
else else
{ {
// On 320x200 we need a shorter slider // On 320x200 we need a shorter slider
Menu.DrawConText(Font.CR_WHITE, x, cy, "\x10\x11\x11\x11\x11\x11\x12"); Menu.DrawConText(Font.CR_WHITE, x, cy, "\x10\x11\x11\x11\x11\x11\x12");
Menu.DrawConText(Font.FindFontColor(gameinfo.mSliderColor), x + int((5 + ((ccur * 38) / range)) * CleanXfac_1), cy, "\x13"); Menu.DrawConText(Font.FindFontColor(gameinfo.mSliderColor), x + int((5 + ((ccur * 38) / range)) * 2 * CleanXfac_1), cy, "\x13");
right -= 5*8*CleanXfac; right -= 5*8*CleanXfac;
} }