Changeset 361 for branches/highdpi/LocalPlayer/MessgEx.pas
- Timestamp:
- Apr 9, 2021, 5:56:50 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/highdpi/LocalPlayer/MessgEx.pas
r349 r361 10 10 11 11 type 12 TMessageIconKind = (mikNone, mikImp, mikModel, mikTribe, mikBook, mikAge, 13 mikPureIcon, mikMyArmy, mikEnemyArmy, mikFullControl, mikShip, mikBigIcon, 14 mikEnemyShipComplete); 15 12 16 TMessgExDlg = class(TBaseMessgDlg) 13 17 Button1: TButtonA; … … 26 30 procedure RemoveBtnClick(Sender: TObject); 27 31 public 28 Kind, IconKind, IconIndex, HelpKind, HelpNo, CenterTo: integer; 32 Kind: TMessageKind; 33 IconIndex: Integer; 34 HelpKind: Integer; 35 HelpNo: Integer; 36 CenterTo: Integer; 37 IconKind: TMessageIconKind; 29 38 OpenSound: string; 30 39 function ShowModal: integer; override; … … 38 47 end; 39 48 40 const41 // extra message kinds42 mkYesNoCancel = 4;43 mkOkCancelRemove = 5;44 mkOkHelp = 6;45 mkModel = 7;46 47 // message icon kinds48 mikNone = -1;49 mikImp = 0;50 mikModel = 1;51 mikTribe = 2;52 mikBook = 3;53 mikAge = 4;54 mikPureIcon = 5;55 mikMyArmy = 6;56 mikEnemyArmy = 7;57 mikFullControl = 8;58 mikShip = 9;59 mikBigIcon = 10;60 mikEnemyShipComplete = 11;61 62 49 var 63 50 MessgExDlg: TMessgExDlg; … … 65 52 procedure SoundMessageEx(SimpleText, SoundItem: string); 66 53 procedure TribeMessage(p: integer; SimpleText, SoundItem: string); 67 function SimpleQuery(QueryKind: integer; SimpleText, SoundItem: string)54 function SimpleQuery(QueryKind: TMessageKind; SimpleText, SoundItem: string) 68 55 : integer; 69 56 procedure ContextMessage(SimpleText, SoundItem: string; … … 199 186 function TMessgExDlg.ShowModal: integer; 200 187 var 201 Ticks0, Ticks: TDateTime; 188 Ticks0: TDateTime; 189 Ticks: TDateTime; 202 190 begin 203 191 if GameMode = cMovie then … … 357 345 if (IconKind = mikImp) and (IconIndex = 27) then 358 346 begin // "YOU WIN" message 359 clSaveTextLight := MainTexture. clTextLight;360 clSaveTextShade := MainTexture. clTextShade;361 MainTexture. clTextLight := $000000; // gold362 MainTexture. clTextShade := $0FDBFF;347 clSaveTextLight := MainTexture.ColorTextLight; 348 clSaveTextShade := MainTexture.ColorTextShade; 349 MainTexture.ColorTextLight := $000000; // gold 350 MainTexture.ColorTextShade := $0FDBFF; 363 351 inherited; 364 MainTexture. clTextLight := clSaveTextLight;365 MainTexture. clTextShade := clSaveTextShade;352 MainTexture.ColorTextLight := clSaveTextLight; 353 MainTexture.ColorTextShade := clSaveTextShade; 366 354 end 367 355 else … … 411 399 end; 412 400 mikBook: 413 PaintBook(Canvas, ClientWidth div 2, 24, MainTexture. clPage,414 MainTexture. clCover);401 PaintBook(Canvas, ClientWidth div 2, 24, MainTexture.ColorPage, 402 MainTexture.ColorCover); 415 403 mikTribe: 416 404 if Assigned(Tribe[IconIndex].faceHGr) then … … 516 504 end; 517 505 518 function SimpleQuery(QueryKind: integer; SimpleText, SoundItem: string)506 function SimpleQuery(QueryKind: TMessageKind; SimpleText, SoundItem: string) 519 507 : integer; 520 508 begin … … 524 512 OpenSound := SoundItem; 525 513 Kind := QueryKind; 526 DpiApplication.ProcessMessages; // TODO: Needed for Gtk2, Lazarus gtk2 bug?527 514 ShowModal; 528 515 result := ModalResult;
Note:
See TracChangeset
for help on using the changeset viewer.