{*************************************************************************}
{                                                                         }
{ EditAnswerUnit.pas - answer editing window                              }
{                                                                         }
{ This file is a part of the project:                                     }
{   Dizzy Quest Editor - the quest editor for Dizzy-like games            }
{                                                                         }
{ © Parfenov Alexey Andreevich, 2007                                      }
{                                                                         }
{ e-mail: AlkatrazStudio@yandex.ru                                        }
{                                                                         }
{ This program is free software; you can redistribute it and/or modify    }
{ it under the terms of the GNU General Public License as published by    }
{ the Free Software Foundation; either version 2 of the License, or       }
{ (at your option) any later version.                                     }
{                                                                         }
{ This program is distributed in the hope that it will be useful,         }
{ but WITHOUT ANY WARRANTY; without even the implied warranty of          }
{ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the            }
{ GNU General Public License for more details.                            }
{                                                                         }
{ You may read GNU General Public License at:                             }
{   http://www.gnu.org/copyleft/gpl.html                                  }
{                                                                         }
{*************************************************************************}
unit EditAnswerUnit;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, Buttons,alkatraz;

type
  TForm_EditAnswer = class(TForm)
    Label1: TLabel;
    Edit1: TEdit;
    Memo1: TMemo;
    BitBtn1: TBitBtn;
    BitBtn2: TBitBtn;
    CheckBox1: TCheckBox;
    procedure CheckBox1Click(Sender: TObject);
    procedure BitBtn2Click(Sender: TObject);
    procedure BitBtn1Click(Sender: TObject);
    procedure FormShow(Sender: TObject);
    procedure Localize;
    procedure FormCreate(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form_EditAnswer: TForm_EditAnswer;
  ok:boolean;

implementation

uses MainUnit;

{$R *.dfm}

var lng:array of string;

procedure TForm_EditAnswer.BitBtn1Click(Sender: TObject);
begin
  ok:=true;
  close;
end;

procedure TForm_EditAnswer.BitBtn2Click(Sender: TObject);
begin
  close;
end;

procedure TForm_EditAnswer.CheckBox1Click(Sender: TObject);
begin
  Memo1.Visible:=CheckBox1.Checked;
end;

procedure TForm_EditAnswer.FormCreate(Sender: TObject);
begin
  SetLength(lng,3);
end;

procedure TForm_EditAnswer.FormShow(Sender: TObject);
begin
  ok:=false;
end;

procedure TForm_EditAnswer.Localize;
begin
  LoadStringsFromIni(MainUnit.lang_ini,Name,lng);
  Label1.Caption:=lng[0];
  CheckBox1.Caption:=lng[1];
  BitBtn2.Caption:=lng[2];
end;

end.
