Ignore:
Timestamp:
Jan 15, 2019, 8:41:53 AM (6 years ago)
Author:
chronos
Message:
  • Fixed: Show correct win objective parameters in New game window Rules tab.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormNew.pas

    r265 r266  
    6767    OpenPictureDialog1: TOpenPictureDialog;
    6868    PageControl1: TPageControl;
    69     PageControl2: TPageControl;
     69    PageControlWinObjective: TPageControl;
    7070    Panel1: TPanel;
    7171    Panel2: TPanel;
     
    9191    SpinEditVoidPercent: TSpinEdit;
    9292    Splitter1: TSplitter;
     93    TabSheetCaptureEntireMap: TTabSheet;
     94    TabSheetNone: TTabSheet;
    9395    TabSheetCaptureCells: TTabSheet;
    9496    TabSheetCaptureCities: TTabSheet;
     
    330332
    331333procedure TFormNew.UpdateInterface;
     334var
     335  WinObjective: TWinObjective;
    332336begin
    333337  APlayerRemove.Enabled := Assigned(ListViewPlayers.Selected) and (Players.Count > MinPlayerCount);
     
    344348  AServerAdd.Enabled := RadioButtonModeNetworkClient.Checked;
    345349  AServerModify.Enabled := RadioButtonModeNetworkClient.Checked;
    346   PageControl2.TabIndex := ComboBoxWinObjective.ItemIndex;
     350  WinObjective := TWinObjective(ComboBoxWinObjective.ItemIndex);
     351  case WinObjective of
     352    woNone: PageControlWinObjective.TabIndex := PageControlWinObjective.IndexOf(TabSheetNone);
     353    woDefeatAllOponents: PageControlWinObjective.TabIndex := PageControlWinObjective.IndexOf(TabSheetDefeatEnemies);
     354    woDefeatAllOponentsCities: PageControlWinObjective.TabIndex := PageControlWinObjective.IndexOf(TabSheetCaptureCities);
     355    woSpecialCaptureCell: PageControlWinObjective.TabIndex := PageControlWinObjective.IndexOf(TabSheetCaptureCells);
     356    woStayAliveForDefinedTurns: PageControlWinObjective.TabIndex := PageControlWinObjective.IndexOf(TabSheetStayAliveTurns);
     357    woCaptureEntireMap: PageControlWinObjective.TabIndex := PageControlWinObjective.IndexOf(TabSheetCaptureEntireMap);
     358  end;
    347359end;
    348360
Note: See TracChangeset for help on using the changeset viewer.