Changeset 22 for trunk/Forms


Ignore:
Timestamp:
Sep 28, 2011, 3:10:01 PM (13 years ago)
Author:
george
Message:
  • Added: Definition class for surface matter types.
Location:
trunk/Forms
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UMainForm.pas

    r21 r22  
    115115    PlayerCount := 4;
    116116    with TPlayer(Players[0]) do begin
     117      Name := 'Player 1';
    117118      Keys.Left := 65;
    118119      Keys.Down := 83;
     
    122123    end;
    123124    with TPlayer(Players[1]) do begin
     125      Name := 'Player 2';
    124126      Keys.Left := 37;
    125127      Keys.Down := 40;
     
    129131    end;
    130132    with TPlayer(Players[2]) do begin
     133      Name := 'Player 3';
    131134      Keys.Left := 76;
    132135      Keys.Down := 186;
     
    136139    end;
    137140    with TPlayer(Players[3]) do begin
     141      Name := 'Player 4';
    138142      Keys.Left := 100;
    139143      Keys.Down := 98;
  • trunk/Forms/UNewGameForm.lfm

    r21 r22  
    1717    Caption = 'Start'
    1818    ModalResult = 1
     19    OnClick = ButtonStartClick
    1920    TabOrder = 0
    2021  end
     
    5960    TabOrder = 2
    6061    ViewStyle = vsReport
     62    OnChange = ListView1Change
    6163  end
    6264end
  • trunk/Forms/UNewGameForm.pas

    r21 r22  
    1818    Label1: TLabel;
    1919    ListView1: TListView;
     20    procedure ButtonStartClick(Sender: TObject);
    2021    procedure FormCreate(Sender: TObject);
     22    procedure ListView1Change(Sender: TObject; Item: TListItem;
     23      Change: TItemChange);
    2124  private
    2225    { private declarations }
     
    5255      NewItem.SubItems.Add('');
    5356      NewItem.Checked := Enabled;
     57      NewItem.Data := Pointer(Engine.Players[I]);
    5458    end;
    5559  finally
     
    5862end;
    5963
     64procedure TNewGameForm.ListView1Change(Sender: TObject; Item: TListItem;
     65  Change: TItemChange);
     66begin
     67  if Change = ctState then
     68    TPlayer(Item.Data).Enabled := Item.Checked;
     69end;
     70
     71procedure TNewGameForm.ButtonStartClick(Sender: TObject);
     72begin
     73
     74end;
     75
    6076end.
    6177
Note: See TracChangeset for help on using the changeset viewer.