Changeset 14 for trunk/UOptionsForm.pas


Ignore:
Timestamp:
Feb 11, 2012, 6:27:10 PM (12 years ago)
Author:
chronos
Message:
  • Added: Support for memory cell up to Integer size. Default 256.
  • Fixed: Application now can be closed if running program is waiting to new key press.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/UOptionsForm.pas

    r13 r14  
    77uses
    88  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
    9   Spin;
     9  Spin, UBrainFuck;
    1010
    1111type
     
    1717    ButtonCancel: TButton;
    1818    Label1: TLabel;
     19    Label2: TLabel;
     20    SpinEditCellSize: TSpinEdit;
    1921    SpinEditMemorySize: TSpinEdit;
    2022  private
    2123    { private declarations }
    2224  public
    23     { public declarations }
     25    procedure LoadFromInterpretter(Interpretter: TBrainFuckInterpretter);
     26    procedure SaveToInterpretter(Interpretter: TBrainFuckInterpretter);
    2427  end;
    2528
     
    3134{$R *.lfm}
    3235
     36{ TOptionsForm }
     37
     38procedure TOptionsForm.LoadFromInterpretter(Interpretter: TBrainFuckInterpretter
     39  );
     40begin
     41  SpinEditCellSize.Value := Interpretter.CellSize;
     42  SpinEditMemorySize.Value := Interpretter.MemorySize;
     43end;
     44
     45procedure TOptionsForm.SaveToInterpretter(Interpretter: TBrainFuckInterpretter);
     46begin
     47  Interpretter.CellSize := SpinEditCellSize.Value;
     48  Interpretter.MemorySize := SpinEditMemorySize.Value;
     49end;
     50
    3351end.
    3452
Note: See TracChangeset for help on using the changeset viewer.