unit splash;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, FileVersion, StdCtrls, ExtCtrls, pngimage;

type
  TSplashScreen = class(TForm)
    FV: TFileVersion;
    loadlbl: TLabel;
    Image1: TImage;
    Label4: TLabel;
    Label1: TLabel;
    procedure FormCreate(Sender: TObject);
  private
    { Private declarations }
  public
    Procedure SetLoading(Str: String);
  end;

var
  SplashScreen: TSplashScreen;

implementation

{$R *.dfm}

Uses
 CM2MMRB, CM2PlugInTypes, fortunecookie;

procedure TSplashScreen.FormCreate(Sender: TObject);
begin
 FV.Filename := ParamStr(0);
 Label4.Caption := 'Version: ' + FV.FileVersion;
 Label1.Caption := GetCookie;
end;

procedure TSplashScreen.SetLoading(Str: String);
begin
 loadlbl.caption := Str;
 BringToFront;
 loadlbl.update;
 sleep(100);
end;

end.
