Ignore:
Timestamp:
Nov 28, 2023, 3:16:24 PM (12 months ago)
Author:
chronos
Message:
  • Modified: Do not initialize all local player windows at the start of the game but later when they are really opened. This also fixes window initialization under Qt5 widgetset.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Packages/CevoComponents/BaseWin.pas

    r447 r460  
    1414
    1515  TBufferedDrawDlg = class(TDrawDlg)
    16   public
    17     UserLeft: Integer;
    18     UserTop: Integer;
    19     constructor Create(AOwner: TComponent); override;
    20     destructor Destroy; override;
    21     procedure FormClose(Sender: TObject; var Action: TCloseAction);
    22     procedure FormPaint(Sender: TObject);
    23     procedure FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
    24     procedure FormDeactivate(Sender: TObject);
    25     procedure SmartUpdateContent(ImmUpdate: Boolean = False);
    26     procedure StayOnTop_Workaround;
    2716  protected
    2817    FWindowMode: TWindowMode;
     
    3423    procedure VPaint; virtual;
    3524  public
     25    UserLeft: Integer;
     26    UserTop: Integer;
    3627    UsedOffscreenWidth: Integer;
    3728    UsedOffscreenHeight: Integer;
    3829    Offscreen: TBitmap;
    3930    OffscreenUser: TForm;
     31    constructor Create(AOwner: TComponent); override;
     32    destructor Destroy; override;
     33    procedure FormClose(Sender: TObject; var Action: TCloseAction);
     34    procedure FormPaint(Sender: TObject);
     35    procedure FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
     36    procedure FormDeactivate(Sender: TObject);
     37    procedure SmartUpdateContent(ImmUpdate: Boolean = False);
     38    procedure StayOnTop_Workaround;
    4039    property WindowMode: TWindowMode read FWindowMode;
    4140  end;
    4241
    4342  TFramedDlg = class(TBufferedDrawDlg)
    44   public
    45     constructor Create(AOwner: TComponent); override;
    46     procedure FormCreate(Sender: TObject);
    47     procedure SmartInvalidate; override;
    4843  protected
    4944    CaptionLeft: Integer;
     
    5853    procedure VPaint; override;
    5954    procedure FillOffscreen(Left, Top, Width, Height: Integer);
     55  public
     56    constructor Create(AOwner: TComponent); override;
     57    procedure FormCreate(Sender: TObject);
     58    procedure SmartInvalidate; override;
    6059  end;
    6160
     
    120119    UserTop := Top;
    121120  end;
    122   if OffscreenUser = self then
     121  if OffscreenUser = Self then
    123122    OffscreenUser := nil;
    124123end;
     
    126125procedure TBufferedDrawDlg.FormPaint(Sender: TObject);
    127126begin
    128   if OffscreenUser <> self then
     127  if OffscreenUser <> Self then
    129128    OffscreenPaint;
    130129  VPaint;
Note: See TracChangeset for help on using the changeset viewer.