X-Git-Url: https://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fgame%2Fg_holmes_ui.inc;h=029b28062f7c1bd94daf27691224f354af275c40;hb=7d5ba44e3ea987adb8c846236613e8e5590ba750;hp=5175e95155a8663bf3a450283ff8015500202c48;hpb=9ab8e0d74b399aad6fd4793f427503bb857a4236;p=d2df-sdl.git diff --git a/src/game/g_holmes_ui.inc b/src/game/g_holmes_ui.inc index 5175e95..029b280 100644 --- a/src/game/g_holmes_ui.inc +++ b/src/game/g_holmes_ui.inc @@ -176,8 +176,14 @@ end; procedure uiDraw (); var f: Integer; + ctl: THControl; begin - for f := 0 to High(uiTopList) do uiTopList[f].draw(); + for f := 0 to High(uiTopList) do + begin + ctl := uiTopList[f]; + ctl.draw(); + if (f <> High(uiTopList)) then darkenRect(ctl.x0, ctl.y0, ctl.width, ctl.height, 128); + end; end; @@ -740,6 +746,7 @@ procedure THTopWindow.drawControlPost (sx, sy: Integer); var r, g, b: Integer; begin + { if getFocused then begin r := 255; @@ -752,6 +759,10 @@ begin g := 127; b := 127; end; + } + r := 255; + g := 255; + b := 255; drawRect(mX, mY, mWidth, mHeight, r, g, b); if (Length(mTitle) > 0) then begin @@ -834,6 +845,7 @@ begin SetLength(mChecks, Length(mChecks)+1); mChecks[High(mChecks)] := bv; if (Length(mItems)*8+4 > mHeight) then mHeight := Length(mItems)*8+4; + if (mCurIndex < 0) then mCurIndex := 0; end; @@ -847,9 +859,12 @@ begin for f := 0 to High(mItems) do begin if (mCurIndex = f) then fillRect(sx-2, sy, mWidth, 8, 0, 128, 0); - drawText8(sx, sy, '[ ]', 255, 255, 255); - if (mChecks[f] <> nil) and (mChecks[f]^) then drawText8(sx+6, sy, 'x', 255, 255, 255); - drawText8(sx+3*8+2, sy, mItems[f], 255, 255, 0); + if (mChecks[f] <> nil) then + begin + drawText8(sx, sy, '[ ]', 255, 255, 255); + if mChecks[f]^ then drawText8(sx+6, sy, 'x', 255, 255, 255); + drawText8(sx+3*8+2, sy, mItems[f], 255, 255, 0); + end; Inc(sy, 8); end; end; @@ -869,8 +884,11 @@ begin if (ly < 2) then ly := 2; ly := ly div 8; if (ly < 0) then ly := 0 else if (ly > High(mItems)) then ly := High(mItems); - mCurIndex := ly; - if (mChecks[ly] <> nil) then mChecks[ly]^ := not mChecks[ly]^; + if (mChecks[ly] <> nil) then + begin + mCurIndex := ly; + if (mChecks[ly] <> nil) then mChecks[ly]^ := not mChecks[ly]^; + end; end; end; end;