hedgewars/uCaptions.pas
changeset 10105 8c5fa1d15bd5
parent 10015 4feced261c68
child 10108 c68cf030eded
equal deleted inserted replaced
10104:cb0b750bd8a3 10105:8c5fa1d15bd5
    21 unit uCaptions;
    21 unit uCaptions;
    22 
    22 
    23 interface
    23 interface
    24 uses uTypes;
    24 uses uTypes;
    25 
    25 
    26 procedure AddCaption(s: shortstring; Color: Longword; Group: TCapGroup);
    26 procedure AddCaption(caption: PChar; 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(s: shortstring; Color: Longword; Group: TCapGroup);
    45 procedure AddCaption(caption: PChar; Color: Longword; Group: TCapGroup);
       
    46 var
       
    47     s: shortstring;
    46 begin
    48 begin
       
    49     s:= caption;
    47     if cOnlyStats then exit;
    50     if cOnlyStats then exit;
    48     if Length(s) = 0 then
    51     if Length(s) = 0 then
    49         exit;
    52         exit;
    50     if Captions[Group].Text <> s then
    53     if Captions[Group].Text <> s then
    51         begin
    54         begin