X-Git-Url: https://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fgame%2Fg_holmes_ui.inc;h=0580a475a60f68178a479bf0f942162173155026;hb=5e0a71e1d35a9037be80c8912060a913d0e98b18;hp=a6daf4f491b4d6da83f65e0ffbcf53c5de212cec;hpb=b7279c74ac3d4b1e272d1b6f8d3263ec83f83467;p=d2df-sdl.git diff --git a/src/game/g_holmes_ui.inc b/src/game/g_holmes_ui.inc index a6daf4f..0580a47 100644 --- a/src/game/g_holmes_ui.inc +++ b/src/game/g_holmes_ui.inc @@ -664,6 +664,10 @@ end; procedure THControl.setScissorGLInternal (x, y, w, h: Integer); begin if not scallowed then exit; + x := trunc(x*g_holmes_ui_scale); + y := trunc(y*g_holmes_ui_scale); + w := trunc(w*g_holmes_ui_scale); + h := trunc(h*g_holmes_ui_scale); y := gWinSizeY-(y+h); if not intersectRect(x, y, w, h, scxywh[0], scxywh[1], scxywh[2], scxywh[3]) then glScissor(0, 0, 0, 0) else glScissor(x, y, w, h); end; @@ -849,8 +853,8 @@ procedure THTopWindow.centerInScreen (); begin if (mWidth > 0) and (mHeight > 0) then begin - mX := (gWinSizeX-mWidth) div 2; - mY := (gWinSizeY-mHeight) div 2; + mX := trunc((gWinSizeX/g_holmes_ui_scale-mWidth)/2); + mY := trunc((gWinSizeY/g_holmes_ui_scale-mHeight)/2); end; end; @@ -870,12 +874,12 @@ var begin if mDragging then begin - drawRect(mX+4, mY+4, mWidth-8, mHeight-8, r, g, b); + drawRectUI(mX+4, mY+4, mWidth-8, mHeight-8, r, g, b); end else begin - drawRect(mX+3, mY+3, mWidth-6, mHeight-6, r, g, b); - drawRect(mX+5, mY+5, mWidth-10, mHeight-10, r, g, b); + drawRectUI(mX+3, mY+3, mWidth-6, mHeight-6, r, g, b); + drawRectUI(mX+5, mY+5, mWidth-10, mHeight-10, r, g, b); setScissor(mFrameWidth, 0, 3*8, 8); fillRect(mX+mFrameWidth, mY, 3*8, 8, 0, 0, 128); drawText8(mX+mFrameWidth, mY, '[ ]', r, g, b);