Changeset 68 for trunk/UMenu.pas


Ignore:
Timestamp:
Nov 28, 2020, 12:17:21 PM (3 years ago)
Author:
chronos
Message:
  • Fixed: Canvas width and height is not updated correctly on Windows. Use additional CanvasSize parameter in drawing methods.
  • Fixed: Fullscreen was not working on Windows. Form border was not hidden.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/UMenu.pas

    r64 r68  
    8181    procedure MouseMove(Position: TPoint);
    8282    procedure MouseUp(Button: TMouseButton; Position: TPoint);
    83     procedure Paint(Canvas: TCanvas);
     83    procedure Paint(Canvas: TCanvas; CanvasSize: TPoint);
    8484    constructor Create;
    8585    destructor Destroy; override;
     
    216216end;
    217217
    218 procedure TMenu.Paint(Canvas: TCanvas);
     218procedure TMenu.Paint(Canvas: TCanvas; CanvasSize: TPoint);
    219219var
    220220  I: Integer;
     
    240240    end;
    241241
    242     X := (Width - TotalWidth) div 2;
    243     Y := (Height - TotalHeight) div 2;
     242    X := (CanvasSize.X - TotalWidth) div 2;
     243    Y := (CanvasSize.Y - TotalHeight) div 2;
    244244
    245245    // Menu items
Note: See TracChangeset for help on using the changeset viewer.