Ignore:
Timestamp:
Mar 25, 2021, 2:09:42 PM (3 years ago)
Author:
chronos
Message:
  • Modified: Use enumeration type for MapOptions and game options.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LocalPlayer/NatStat.pas

    r315 r327  
    141141  ScrollDownBtn.Visible := (CurrentReport.TurnOfCivilReport >= 0) and
    142142    (ReportText.Count > ReportLines);
    143   if OptionChecked and (1 shl soTellAI) <> 0 then
     143  if soTellAI in OptionChecked then
    144144    TellAIBtn.ButtonIndex := 3
    145145  else
     
    390390    end;
    391391
    392     if OptionChecked and (1 shl soTellAI) <> 0 then
    393     begin
     392    if soTellAI in OptionChecked then begin
    394393      Server(sGetAIInfo, me, pView, ps);
    395394      LoweredTextOut(Canvas, -1, MainTexture, 42, 445, ps);
    396     end
    397     else
     395    end else
    398396      LoweredTextOut(Canvas, -2, MainTexture, 42, 445,
    399397        Phrases2.Lookup('MENU_TELLAI'));
     
    537535procedure TNatStatDlg.TellAIBtnClick(Sender: TObject);
    538536begin
    539   OptionChecked := OptionChecked xor (1 shl soTellAI);
    540   if OptionChecked and (1 shl soTellAI) <> 0 then
     537  if soTellAI in OptionChecked then OptionChecked := OptionChecked - [soTellAI]
     538    else OptionChecked := OptionChecked + [soTellAI];
     539  if soTellAI in OptionChecked then
    541540    TellAIBtn.ButtonIndex := 3
    542541  else
Note: See TracChangeset for help on using the changeset viewer.