unit evo_menu;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, Buttons, jpeg, ExtCtrls, MPlayer, StdCtrls, pngimage;

type
  TEvoMenu = class(TForm)
    Bevel1: TBevel;
    evo: TImage;
    ad1: TImage;
    ad2: TImage;
    ad3: TImage;
    StartGame: TSpeedButton;
    Exit: TSpeedButton;
    menumusic: TMediaPlayer;
    evohelp: TSpeedButton;
    sc2: TButton;
    sc3: TButton;
    sc1: TButton;
    credits_timer: TTimer;
    credits: TImage;
    black: TImage;
    procedure ExitClick(Sender: TObject);
    procedure evohelpClick(Sender: TObject);
    procedure StartGameClick(Sender: TObject);
    procedure FormActivate(Sender: TObject);
    procedure menumusicNotify(Sender: TObject);
    procedure sc2Click(Sender: TObject);
    procedure sc3Click(Sender: TObject);
    procedure sc1Click(Sender: TObject);
    procedure credits_timerTimer(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  EvoMenu: TEvoMenu;

implementation

uses evo_intro, Picture1, Picture2, help_evo, Picture3, Picture4;



{$R *.dfm}


procedure TEvoMenu.ExitClick(Sender: TObject);
begin
 credits_timer.Enabled:=true;
 credits.Top:=72;
 credits.Left:=72;
 credits.Height:=480;
 credits.Width:=640;
 black.Align:=alclient;
 black.Visible:=true;
 credits.visible:=true;
end;

procedure TEvoMenu.evohelpClick(Sender: TObject);
begin
 evomenu.Hide;
 help.showmodal;
end;

procedure TEvoMenu.StartGameClick(Sender: TObject);
begin
 menumusic.notify:=false;
 menumusic.stop;

 evomenu.Hide;
 intro.show;
 startgame.enabled:=false;
end;

procedure TEvoMenu.FormActivate(Sender: TObject);
begin
 menumusic.filename:=('resources\music\end.avi');
 menumusic.Open;
 menumusic.Play;
 menumusic.Notify := True;
end;

procedure TEvoMenu.menumusicNotify(Sender: TObject);
begin
if menumusic.NotifyValue=nvSuccessful then
  begin
    menumusic.Play;
    menumusic.Notify := True;
  end
end;

procedure TEvoMenu.sc2Click(Sender: TObject);
begin
 menumusic.notify:=false;
 menumusic.stop;

 evomenu.Hide;
 pic3.show;

 pic2.drawerempty:=true;
 pic2.token:=true;
 Pic2.emptyflask:=true;
end;

procedure TEvoMenu.sc3Click(Sender: TObject);
begin
 menumusic.notify:=false;
 menumusic.stop;

 evomenu.Hide;
 pic4.show;

 pic2.drawerempty:=true;
 pic2.token:=true;
 Pic3.crowbar:=true;
end;

procedure TEvoMenu.sc1Click(Sender: TObject);
begin
 menumusic.notify:=false;
 menumusic.stop;

 evomenu.Hide;
 pic2.show;
end;

procedure TEvoMenu.credits_timerTimer(Sender: TObject);
begin
 close;
end;

end.
