Ignore:
Timestamp:
Apr 6, 2021, 8:11:02 PM (4 years ago)
Author:
chronos
Message:
  • Modified: Merged trunk branch version r348 into highdpi branch.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/highdpi/LocalPlayer/NatStat.pas

    r303 r349  
    8282  ReportText := TStringList.Create;
    8383  InitButtons();
    84   ContactBtn.Template := Templates;
     84  ContactBtn.Template := Templates.Data;
    8585  HelpContext := 'DIPLOMACY';
    8686  ToggleBtn.Hint := Phrases.Lookup('BTN_SELECT');
     
    114114      (hMainTexture - ClientHeight) div 2);
    115115    ImageOp_B(Back, Template, 0, 0, 0, 0, ClientWidth, ClientHeight);
    116   end
     116  end;
    117117end;
    118118
     
    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
     
    279279    // show leader picture
    280280    Tribe[pView].InitAge(GetAge(pView));
    281     if Tribe[pView].faceHGr >= 0 then
     281    if Assigned(Tribe[pView].faceHGr) then
    282282    begin
    283283      Dump(offscreen, Tribe[pView].faceHGr, 18, yIcon - 4, 64, 48,
     
    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.