hedgewars/uCaptions.pas
changeset 10116 dd27562b6f21
parent 10108 c68cf030eded
child 10124 aabd1b75d5a3
equal deleted inserted replaced
10115:794af9339726 10116:dd27562b6f21
    21 unit uCaptions;
    21 unit uCaptions;
    22 
    22 
    23 interface
    23 interface
    24 uses uTypes;
    24 uses uTypes;
    25 
    25 
    26 procedure AddCaption(caption: PChar; Color: Longword; Group: TCapGroup);
    26 procedure AddCaption(s: shortstring; Color: Longword; Group: TCapGroup);
    27 procedure DrawCaptions;
    27 procedure DrawCaptions;
    28 procedure ReloadCaptions(unload: boolean);
    28 procedure ReloadCaptions(unload: boolean);
    29 
    29 
    30 procedure initModule;
    30 procedure initModule;
    31 procedure freeModule;
    31 procedure freeModule;
    40     Color: Longword
    40     Color: Longword
    41     end;
    41     end;
    42 var
    42 var
    43     Captions: array[TCapGroup] of TCaptionStr;
    43     Captions: array[TCapGroup] of TCaptionStr;
    44 
    44 
    45 procedure AddCaption(caption: PChar; Color: Longword; Group: TCapGroup);
    45 procedure AddCaption(s: shortstring; Color: Longword; Group: TCapGroup);
    46 var
       
    47     s: shortstring;
       
    48 begin
    46 begin
    49     s:= caption;
       
    50     if cOnlyStats then exit;
    47     if cOnlyStats then exit;
    51     if Length(s) = 0 then
    48     if Length(s) = 0 then
    52         exit;
    49         exit;
    53     if Captions[Group].Text <> s then
    50     if Captions[Group].Text <> s then
    54         begin
    51         begin