Changeset 52 for trunk


Ignore:
Timestamp:
Nov 3, 2019, 8:42:25 PM (5 years ago)
Author:
chronos
Message:
  • Fixed: Board border width.
  • Fixed: Tile margin not calculated correctly for different canvas sizes.
  • Modified: Draw board rounded corners.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/UGame.pas

    r51 r52  
    599599begin
    600600  TopBarHeight := ScaleY(24, 96);
    601   TileMargin := Round(CanvasSize.X / Board.Size.X * 0.015);
    602601  Canvas.Brush.Style := bsSolid;
    603602  Canvas.Brush.Color := Core.ThemeManager1.Theme.ColorControl;
     
    625624    Frame.Top + Frame.Height div 2 + (Board.Size.Y * TileSize.Y) div 2);
    626625
     626  TileMargin := Round(Frame.Width / Board.Size.X * 0.025);
     627
    627628  Canvas.Brush.Style := bsSolid;
    628629  Canvas.Brush.Color := clGray;
    629   Canvas.FillRect(Frame);
     630  Canvas.Pen.Style := psClear;
     631  Canvas.RoundRect(Frame, ScaleX(Frame.Width div (20 * Board.Size.X), 96),
     632    ScaleY(Frame.Height div (20 * Board.Size.Y), 96));
     633
     634  Frame := Rect(Frame.Left + TileMargin, Frame.Top + TileMargin,
     635    Frame.Right - TileMargin, Frame.Bottom - TileMargin);
     636  TileSize := Point(Frame.Width div Board.Size.X, Frame.Height div Board.Size.Y);
    630637
    631638  Canvas.Font.Color := clBlack;
Note: See TracChangeset for help on using the changeset viewer.