Ignore:
Timestamp:
Apr 9, 2021, 9:51:17 AM (4 years ago)
Author:
chronos
Message:
  • Modified: Message kinds and message icons kinds changed to enumeration type.
  • Modified: Code cleanup.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LocalPlayer/MessgEx.pas

    r352 r358  
    1010
    1111type
     12  TMessageIconKind = (mikNone, mikImp, mikModel, mikTribe, mikBook, mikAge,
     13    mikPureIcon, mikMyArmy, mikEnemyArmy, mikFullControl, mikShip, mikBigIcon,
     14    mikEnemyShipComplete);
     15
    1216  TMessgExDlg = class(TBaseMessgDlg)
    1317    Button1: TButtonA;
     
    2630    procedure RemoveBtnClick(Sender: TObject);
    2731  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;
    2938    OpenSound: string;
    3039    function ShowModal: integer; override;
     
    3847  end;
    3948
    40 const
    41   // extra message kinds
    42   mkYesNoCancel = 4;
    43   mkOkCancelRemove = 5;
    44   mkOkHelp = 6;
    45   mkModel = 7;
    46 
    47   // message icon kinds
    48   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 
    6249var
    6350  MessgExDlg: TMessgExDlg;
     
    6552procedure SoundMessageEx(SimpleText, SoundItem: string);
    6653procedure TribeMessage(p: integer; SimpleText, SoundItem: string);
    67 function SimpleQuery(QueryKind: integer; SimpleText, SoundItem: string)
     54function SimpleQuery(QueryKind: TMessageKind; SimpleText, SoundItem: string)
    6855  : integer;
    6956procedure ContextMessage(SimpleText, SoundItem: string;
     
    199186function TMessgExDlg.ShowModal: integer;
    200187var
    201   Ticks0, Ticks: TDateTime;
     188  Ticks0: TDateTime;
     189  Ticks: TDateTime;
    202190begin
    203191  if GameMode = cMovie then
     
    516504end;
    517505
    518 function SimpleQuery(QueryKind: integer; SimpleText, SoundItem: string)
     506function SimpleQuery(QueryKind: TMessageKind; SimpleText, SoundItem: string)
    519507  : integer;
    520508begin
Note: See TracChangeset for help on using the changeset viewer.