#!/usr/bin/env instantfpc

{ Show the 1st command-line parameter in a CGE window. }

uses CastleParameters, CastleWindow, CastleControls, CastleColors, CastleUIControls;

var
  Window: TCastleWindowBase;
  L: TCastleLabel;
begin
  Window := TCastleWindowBase.Create(Application);
  Window.Open;

  L := TCastleLabel.Create(Application);
  L.FontSize := 40;
  L.Color := White;
  L.Anchor(vpMiddle);
  L.Anchor(hpMiddle);
  if Parameters.High >= 1 then
    L.Caption := Parameters[1];
  Window.Controls.InsertFront(L);

  Application.Run;
end.
