Changeset 349 for branches/highdpi/LocalPlayer/NatStat.pas
- Timestamp:
- Apr 6, 2021, 8:11:02 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/highdpi/LocalPlayer/NatStat.pas
r303 r349 82 82 ReportText := TStringList.Create; 83 83 InitButtons(); 84 ContactBtn.Template := Templates ;84 ContactBtn.Template := Templates.Data; 85 85 HelpContext := 'DIPLOMACY'; 86 86 ToggleBtn.Hint := Phrases.Lookup('BTN_SELECT'); … … 114 114 (hMainTexture - ClientHeight) div 2); 115 115 ImageOp_B(Back, Template, 0, 0, 0, 0, ClientWidth, ClientHeight); 116 end 116 end; 117 117 end; 118 118 … … 141 141 ScrollDownBtn.Visible := (CurrentReport.TurnOfCivilReport >= 0) and 142 142 (ReportText.Count > ReportLines); 143 if OptionChecked and (1 shl soTellAI) <> 0then143 if soTellAI in OptionChecked then 144 144 TellAIBtn.ButtonIndex := 3 145 145 else … … 279 279 // show leader picture 280 280 Tribe[pView].InitAge(GetAge(pView)); 281 if Tribe[pView].faceHGr >= 0then281 if Assigned(Tribe[pView].faceHGr) then 282 282 begin 283 283 Dump(offscreen, Tribe[pView].faceHGr, 18, yIcon - 4, 64, 48, … … 390 390 end; 391 391 392 if OptionChecked and (1 shl soTellAI) <> 0 then 393 begin 392 if soTellAI in OptionChecked then begin 394 393 Server(sGetAIInfo, me, pView, ps); 395 394 LoweredTextOut(Canvas, -1, MainTexture, 42, 445, ps); 396 end 397 else 395 end else 398 396 LoweredTextOut(Canvas, -2, MainTexture, 42, 445, 399 397 Phrases2.Lookup('MENU_TELLAI')); … … 537 535 procedure TNatStatDlg.TellAIBtnClick(Sender: TObject); 538 536 begin 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 541 540 TellAIBtn.ButtonIndex := 3 542 541 else
Note:
See TracChangeset
for help on using the changeset viewer.