Changeset 21


Ignore:
Timestamp:
Apr 8, 2015, 10:55:35 PM (9 years ago)
Author:
chronos
Message:
  • Added: Do not clear form background covered entirely by PaintBox.
Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/UFormMain.lfm

    r16 r21  
    2323    OnMouseUp = PaintBox1MouseUp
    2424    OnPaint = PaintBox1Paint
     25    OnResize = PaintBox1Resize
    2526  end
    2627  object Timer1: TTimer
  • trunk/UFormMain.pas

    r16 r21  
    77uses
    88  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, Menus,
    9   ExtCtrls, UEngine;
     9  ExtCtrls, UEngine, LCLType;
    1010
    1111type
     
    2828      Shift: TShiftState; X, Y: Integer);
    2929    procedure PaintBox1Paint(Sender: TObject);
     30    procedure PaintBox1Resize(Sender: TObject);
    3031    procedure Timer1Timer(Sender: TObject);
    3132  private
    32     { private declarations }
     33    procedure EraseBackground(DC: HDC); override;
    3334  public
    3435    Engine: TEngine;
     
    99100end;
    100101
     102procedure TFormMain.PaintBox1Resize(Sender: TObject);
     103begin
     104  //Engine.
     105end;
     106
    101107procedure TFormMain.Timer1Timer(Sender: TObject);
    102108begin
     109  Engine.Tick;
    103110  PaintBox1.Repaint;
    104   Engine.Tick;
     111end;
     112
     113procedure TFormMain.EraseBackground(DC: HDC);
     114begin
     115  // Do nothing, all background space covered by controls
    105116end;
    106117
Note: See TracChangeset for help on using the changeset viewer.