double-clicking on variables now resets them to some default value instead of just '0'

This commit is contained in:
zueuk
2006-03-25 17:36:12 +00:00
parent e568e64bd6
commit 9d535966a2
5 changed files with 66 additions and 5 deletions

View File

@ -26,6 +26,7 @@ type
function SetVariable(const Name: string; var value: double): boolean; override;
function GetVariable(const Name: string; var value: double): boolean; override;
function ResetVariable(const Name: string): boolean; override;
procedure CalcFunction; override;
procedure Prepare; override;
@ -119,6 +120,19 @@ begin
end
end;
function TVariationPerspective.ResetVariable(const Name: string): boolean;
begin
Result := False;
if Name = var_a_name then begin
angle := 0;
Result := True;
end
else if Name = var_f_name then begin
focus := 2;
Result := True;
end;
end;
///////////////////////////////////////////////////////////////////////////////
class function TVariationPerspective.GetNrVariables: integer;
begin