Changeset 218 for trunk/Forms


Ignore:
Timestamp:
Jun 6, 2018, 12:23:25 AM (6 years ago)
Author:
chronos
Message:
  • Modified: Allow multiselect and removal of players in new game dialog.
Location:
trunk/Forms
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormNew.lfm

    r212 r218  
    3939        OnChange = RadioButtonModeLocalChange
    4040        TabOrder = 0
     41        TabStop = True
    4142      end
    4243      object RadioButtonModeNetworkServer: TRadioButton
     
    173174            Width = 790
    174175          end>
     176        MultiSelect = True
    175177        OwnerData = True
    176178        PopupMenu = PopupMenuPlayers
     
    557559        end
    558560        object TabSheetCaptureCells: TTabSheet
    559           ClientHeight = 72
    560           ClientWidth = 714
     561          ClientHeight = 74
     562          ClientWidth = 716
    561563          object Label14: TLabel
    562564            Left = 8
     
    579581        end
    580582        object TabSheetStayAliveTurns: TTabSheet
    581           ClientHeight = 72
    582           ClientWidth = 714
     583          ClientHeight = 74
     584          ClientWidth = 716
    583585          object Label13: TLabel
    584586            Left = 8
  • trunk/Forms/UFormNew.pas

    r207 r218  
    410410
    411411procedure TFormNew.APlayerRemoveExecute(Sender: TObject);
    412 begin
    413   if Assigned(ListViewPlayers.Selected) then begin
    414     Players.Remove(ListViewPlayers.Selected.Data);
    415     ReloadView;
    416   end;
     412var
     413  I: Integer;
     414begin
     415  for I := ListViewPlayers.Items.Count - 1 downto 0 do
     416  if ListViewPlayers.Items[I].Selected then begin
     417    Players.Remove(ListViewPlayers.Items[I].Data);
     418  end;
     419  ReloadView;
    417420end;
    418421
Note: See TracChangeset for help on using the changeset viewer.