unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, SRGrad, StdCtrls, SRColBtn, ExtCtrls, RackCtls;

type
  TLauncher = class(TForm)
    lbl1: TLabel;
    BgGrad1: TSRGradient;
    lbl2: TLabel;
    btn1: TSRColorButton;
    btn2: TSRColorButton;
    btn3: TSRColorButton;
    Extadd: TTimer;
    ExtLow: TTimer;
    btn4: TLEDButton;
    procedure btn2MouseMove(Sender: TObject; Shift: TShiftState; X,
      Y: Integer);
    procedure BgGrad1MouseMove(Sender: TObject; Shift: TShiftState; X,
      Y: Integer);
    procedure ExtaddTimer(Sender: TObject);
    procedure ExtLowTimer(Sender: TObject);
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
    procedure btn2Click(Sender: TObject);
    procedure FormCreate(Sender: TObject);
    procedure btn1Click(Sender: TObject);
    procedure BgGrad1MouseDown(Sender: TObject; Button: TMouseButton;
      Shift: TShiftState; X, Y: Integer);
    procedure btn4Click(Sender: TObject);
    procedure btn3Click(Sender: TObject); private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Launcher: TLauncher;

implementation

uses Unit2;

{$R *.dfm}

procedure TLauncher.btn2MouseMove(Sender: TObject; Shift: TShiftState; X,
  Y: Integer);
begin
  Extadd.Enabled:= true;
  ExtLow.Enabled:= false;
end;

procedure TLauncher.BgGrad1MouseMove(Sender: TObject; Shift: TShiftState; X,
  Y: Integer);
begin
  Extadd.Enabled:= false;
  ExtLow.Enabled:= true;
end;

procedure TLauncher.ExtaddTimer(Sender: TObject);
begin
  if btn2.Top > 140 then
  begin
        btn2.Top   := btn2.Top - 3;
        btn2.Height:= btn2.Height + 3;
  end;
end;

procedure TLauncher.ExtLowTimer(Sender: TObject);
begin
  if btn2.Top < 158 then
  begin
        btn2.Top   := btn2.Top + 3;
        btn2.Height:= btn2.Height - 3;
  end;
end;

procedure TLauncher.FormClose(Sender: TObject; var Action: TCloseAction);
begin
  repeat
    AlphaBlendValue:=AlphaBlendValue-4;
  until(AlphaBlendValue<=6);

end;

procedure TLauncher.btn2Click(Sender: TObject);
begin
Close;
end;

procedure TLauncher.FormCreate(Sender: TObject);
var FirstRegion: THandle;
  begin
   FirstRegion := CreateRoundRectRGN(10, 10, 868, 248, 225, -212);
   SetWindowRGN(Handle, FirstRegion, true);
  end;

procedure TLauncher.btn1Click(Sender: TObject);
  begin
    WinExec('SGO\game.exe', 1);
  end;

procedure TLauncher.BgGrad1MouseDown(Sender: TObject; Button: TMouseButton;
  Shift: TShiftState; X, Y: Integer);
  begin
    ReleaseCapture;
    Perform(WM_SYSCOMMAND, $f012, 0);
  end;

procedure TLauncher.btn4Click(Sender: TObject);
begin
  Help.Show;
end;

procedure TLauncher.btn3Click(Sender: TObject);
begin
  WinExec('SGN\startpro.exe', 1);
end;

end.
