unit Menu;

interface

uses
  DGLEngine_header,windows,Math,SysUtils;
Type
Menu = class(Tobject)
  Background:Cardinal;
  procedure DrwBackground;
  procedure LoadImg;
end;

Button = class(Menu)
  Icon:Cardinal;
  Posx,Posy,Lenx,Leny:longint;
  Activity,Visibility:boolean;
  Link:longint;
  procedure DrawBtn;
end;

implementation

procedure Menu.DrwBackground;
begin
 Begin2D;
  DrawTexture2D(fon,0,0,800,600);
 End2D;
end;

procedure Button.DrawBtn;
begin
  Begin2D;
    if Activity then DrawSprite(Posx,Posy,Lenx,Leny,2,1,1) else
    DrawSprite(Posx,Posy,Lenx,Leny,2,1,2);
  End2D;
end;

procedure Button.LoadImg;     
 begin
  Background:=LoadFromFile('data\textures\igdc.jpg');
 end;

end.
