Changeset 447 for trunk/LocalPlayer/Battle.pas
- Timestamp:
- May 19, 2022, 10:39:34 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LocalPlayer/Battle.pas
r442 r447 32 32 uix, ToLoc: Integer; 33 33 Forecast: TBattleForecastEx; 34 IsSuicideQuery: boolean;34 IsSuicideQuery: Boolean; 35 35 end; 36 36 … … 63 63 TextSize: TSize; 64 64 LabelText: string; 65 FirstStrike: boolean;65 FirstStrike: Boolean; 66 66 begin 67 67 MaxBar := 65; … … 196 196 BitBltCanvas(Buffer.Canvas, 0, 0, 66, 48, ca, xm - 8 - 4 - 66, 197 197 ym + 8 + 12); 198 MakeUnitInfo( me, MyUn[uix], UnitInfo);198 MakeUnitInfo(Me, MyUn[uix], UnitInfo); 199 199 UnitInfo.Flags := UnitInfo.Flags and not unFortified; 200 200 IsoMap.PaintUnit(1, 0, UnitInfo, 0); … … 216 216 ClientWidth := 300; 217 217 ClientHeight := 288; 218 OKBtn.Visible := true;219 CancelBtn.Visible := true;218 OKBtn.Visible := True; 219 CancelBtn.Visible := True; 220 220 Left := (Screen.Width - ClientWidth) div 2; // center on screen 221 221 Top := (Screen.Height - ClientHeight) div 2; … … 225 225 ClientWidth := 178; 226 226 ClientHeight := 178; 227 OKBtn.Visible := false;228 CancelBtn.Visible := false;227 OKBtn.Visible := False; 228 CancelBtn.Visible := False; 229 229 end; 230 230 end; … … 232 232 procedure TBattleDlg.FormPaint(Sender: TObject); 233 233 var 234 ym, cix, p: Integer;235 s, s1: string;234 ym, cix, P: Integer; 235 S, s1: string; 236 236 begin 237 237 with Canvas do … … 253 253 begin 254 254 Canvas.Font.Assign(UniFont[ftCaption]); 255 s:= Phrases.Lookup('TITLE_SUICIDE');256 RisedTextOut(Canvas, (ClientWidth - BiColorTextWidth(Canvas, s)) div 2,257 7 + Border, s);255 S := Phrases.Lookup('TITLE_SUICIDE'); 256 RisedTextOut(Canvas, (ClientWidth - BiColorTextWidth(Canvas, S)) div 2, 257 7 + Border, S); 258 258 Canvas.Font.Assign(UniFont[ftNormal]); 259 s:= Phrases.Lookup('SUICIDE');260 p := pos('\', s);261 if p= 0 then262 RisedTextOut(Canvas, (ClientWidth - BiColorTextWidth(Canvas, s))263 div 2, 205, s)259 S := Phrases.Lookup('SUICIDE'); 260 P := Pos('\', S); 261 if P = 0 then 262 RisedTextOut(Canvas, (ClientWidth - BiColorTextWidth(Canvas, S)) 263 div 2, 205, S) 264 264 else 265 265 begin 266 s1 := copy(s, 1, p- 1);266 s1 := Copy(S, 1, P - 1); 267 267 RisedTextOut(Canvas, (ClientWidth - BiColorTextWidth(Canvas, s1)) div 2, 268 268 205 - MessageLineSpacing div 2, s1); 269 s1 := copy(s, p+ 1, 255);269 s1 := Copy(S, P + 1, 255); 270 270 RisedTextOut(Canvas, (ClientWidth - BiColorTextWidth(Canvas, s1)) div 2, 271 271 205 + (MessageLineSpacing - MessageLineSpacing div 2), s1);
Note:
See TracChangeset
for help on using the changeset viewer.