- Timestamp:
- Sep 30, 2020, 11:57:40 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Start.pas
r282 r283 143 143 DefaultAI: string; 144 144 MiniMap: TMiniMap; 145 LastGame: string; 145 146 procedure DrawAction(y, IconIndex: integer; HeaderItem, TextItem: string); 146 147 procedure InitPopup(PlayerIndex: Integer); … … 626 627 if ValueExists('StartTab') then ShowTab := TStartTab(Reg.ReadInteger('StartTab')) 627 628 else ShowTab := tbNew; 629 if ValueExists('LastGame') then LastGame := Reg.ReadString('LastGame') 630 else LastGame := ''; 628 631 629 632 if ValueExists('ScreenMode') then … … 667 670 WriteInteger('MultiControl', MultiControl); 668 671 WriteInteger('StartTab', Integer(ShowTab)); 672 WriteString('LastGame', LastGame); 669 673 finally 670 674 Free; … … 1455 1459 until FindNext(F) <> 0; 1456 1460 FindClose(F); 1457 ListIndex[tbNew] := FormerGames.Count - 1; 1461 I := FormerGames.IndexOf(LastGame); 1462 if I >= 0 then ListIndex[tbPrevious] := I 1463 else ListIndex[tbPrevious] := FormerGames.Count - 1; 1458 1464 TurnValid := False; 1459 1465 end; … … 1617 1623 if Tab <> tbNew then 1618 1624 if List.Count > 0 then begin 1619 if (ListIndex[Tab] < List.Count) and (ListIndex[Tab] >= 0) then 1620 List.ItemIndex := ListIndex[Tab] 1621 1625 if (ListIndex[Tab] < List.Count) and (ListIndex[Tab] >= 0) then begin 1626 List.ItemIndex := ListIndex[Tab]; 1627 end else List.ItemIndex := 0; 1622 1628 end else List.ItemIndex := -1; 1623 1629 case Tab of … … 1962 1968 ShowTab := Tab; 1963 1969 Background.Enabled := True; 1970 LastGame := FormerGames[ListIndex[tbPrevious]]; 1964 1971 end; 1965 1972
Note:
See TracChangeset
for help on using the changeset viewer.