unit U_Leveledit;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Grids, StdCtrls, ExtCtrls;
type
Tform_leveledit = class(TForm)
drawgrid_edit: TDrawGrid;
drawgrid_auswahl: TDrawGrid;
btn_laden: TButton;
btn_speichern: TButton;
btn_ok: TButton;
Image1: TImage;
procedure FormCreate(Sender: TObject);
procedure drawgrid_auswahldrawcell(Sender: TObject; ACol: Integer; Rect: TRect; State: TGridDrawState);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
form_leveledit: Tform_leveledit;
Bildfeld : Array[1..24] of TBitmap;
Spielfeld: Array[1..16,1..16] of TBitmap;
implementation
{$R *.dfm}
// Bilder in Auswahlliste laden
procedure Tform_leveledit.FormCreate(Sender: TObject);
begin
Bildfeld[1] := TBitmap.Create;
Bildfeld[1].LoadFromFile('Bilder\busch.bmp');
end;
procedure Tform_leveledit.drawgrid_auswahlDrawCell
(Sender: TObject; ACol : Integer; Rect: TRect; State: TGridDrawState);
begin
with sender as TDrawGrid do
Canvas.Draw(Rect.Left,Rect.Top,Bildfeld[1]);
end;
end.