Changeset 266


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.
Location:
trunk/Forms
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormNew.lfm

    r265 r266  
    11object FormNew: TFormNew
    2   Left = 365
     2  Left = 546
    33  Height = 748
    4   Top = 167
     4  Top = 181
    55  Width = 1154
    66  Caption = 'New game'
     
    596596          TabOrder = 3
    597597        end
    598         object PageControl2: TPageControl
     598        object PageControlWinObjective: TPageControl
    599599          Left = 12
    600600          Height = 78
    601601          Top = 290
    602602          Width = 716
    603           ActivePage = TabSheetCaptureCities
     603          ActivePage = TabSheetCaptureEntireMap
    604604          Anchors = [akTop, akLeft, akRight]
    605605          ShowTabs = False
    606           TabIndex = 1
     606          TabIndex = 5
    607607          TabOrder = 4
    608608          object TabSheetDefeatEnemies: TTabSheet
     
    654654            end
    655655          end
     656          object TabSheetNone: TTabSheet
     657          end
     658          object TabSheetCaptureEntireMap: TTabSheet
     659          end
    656660        end
    657661        object CheckBoxEmptyCellsNeutral: TCheckBox
  • 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.