unit frmAbout;

{$mode ObjFPC}{$H+}

interface

uses
  Classes, SysUtils, Forms, Controls, Graphics, Dialogs, orca_scene2d, LCLIntf;

type

  { TFormAbout }

  TFormAbout = class(TForm)
    D2Resources1: TD2Resources;
    Image1: TD2Image;
    Label1: TD2Label;
    Label2: TD2Label;
    Label3: TD2Label;
    lblGitlab: TD2Label;
    Label5: TD2Label;
    Line1: TD2Line;
    Root1: TD2Background;
    Scene: TD2Scene;
    procedure FormKeyPress(Sender: TObject; var Key: char);
    procedure lblGitlabClick(Sender: TObject);
    procedure lblGitlabMouseEnter(Sender: TObject);
    procedure lblGitlabMouseLeave(Sender: TObject);
    procedure Root1Click(Sender: TObject);
  private

  public

  end;

var
  FormAbout: TFormAbout;

implementation

{$R *.lfm}

{ TFormAbout }

procedure TFormAbout.lblGitlabMouseEnter(Sender: TObject);
begin
  lblGitlab.Font.Style:= d2FontUnderline;
end;

procedure TFormAbout.FormKeyPress(Sender: TObject; var Key: char);
begin
  if (Key = #27) then Close;
end;

procedure TFormAbout.lblGitlabClick(Sender: TObject);
begin
  LCLIntf.OpenURL('https://code.moenext.com/rarnu/puzzle-editor');
end;

procedure TFormAbout.lblGitlabMouseLeave(Sender: TObject);
begin
  lblGitlab.Font.Style:= d2FontRegular;
end;

procedure TFormAbout.Root1Click(Sender: TObject);
begin
  Close;
end;

end.

