Ignore:
Timestamp:
Dec 23, 2023, 8:59:07 PM (11 months ago)
Author:
chronos
Message:
  • Modified: Code cleanup.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LocalPlayer/Help.pas

    r502 r503  
    55
    66uses
    7   Protocol, ScreenTools, BaseWin, StringTables, Math, LCLIntf, LCLType,
    8   Messages, SysUtils, Classes, ButtonB, PVSB, Types, Generics.Collections, IsoEngine,
     7  Protocol, ScreenTools, BaseWin, StringTables, Math, LCLIntf, LCLType, Messages,
     8  SysUtils, Classes, ButtonB, PVSB, Types, Generics.Collections, IsoEngine,
    99  {$IFDEF DPI}Dpi.Graphics, Dpi.Controls, Dpi.Forms, Dpi.ExtCtrls, Dpi.Common,
    1010  System.UITypes{$ELSE}
     
    858858          x0[I] := x0[I] + 8;
    859859        end;
    860         Self.Line(OffScreen.Canvas, I, False)
     860        Self.Line(OffScreen.Canvas, I, False);
    861861      end;
    862862  end;
     
    11131113                Delete(S, 1, P)
    11141114              else
    1115                 Delete(S, 1, P - 1)
     1115                Delete(S, 1, P - 1);
    11161116            end;
    11171117          '!': // highlighted
     
    11461146        repeat
    11471147          repeat
    1148             Inc(P)
     1148            Inc(P);
    11491149          until (P > Length(S)) or (S[P] = ' ') or (S[P] = '\');
    11501150          if (BiColorTextWidth(OffScreen.Canvas, Copy(S, 1, P - 1)) <=
     
    12111211        MainText[Count - 1] := Format(HelpText.Lookup('REQUIRED'),
    12121212          [MainText[Count - 1]]);
    1213     end
     1213    end;
    12141214  end;
    12151215
     
    12531253    I: Integer;
    12541254    S: string;
    1255     sr: TSearchRec;
     1255    SearchRec: TSearchRec;
    12561256    List, Plus: TStringList;
    12571257  begin
    12581258    List := TStringList.Create;
    12591259    Plus := TStringList.Create;
    1260     if FindFirst(GetGraphicsDir + DirectorySeparator + '*.credits.txt', $27, sr) = 0 then
     1260    if FindFirst(GetGraphicsDir + DirectorySeparator + '*.credits.txt', $27, SearchRec) = 0 then
    12611261      repeat
    1262         Plus.LoadFromFile(GetGraphicsDir + DirectorySeparator + sr.Name);
     1262        Plus.LoadFromFile(GetGraphicsDir + DirectorySeparator + SearchRec.Name);
    12631263        List.AddStrings(Plus);
    1264       until FindNext(sr) <> 0;
    1265     FindClose(sr);
     1264      until FindNext(SearchRec) <> 0;
     1265    FindClose(SearchRec);
    12661266    FreeAndNil(Plus);
    12671267
     
    19591959  if (Sel + i0 >= MainText.Count) or (Sel >= 0) and
    19601960    (THelpLineInfo(MainText.Objects[Sel + i0]).Category = hkNoLink) and
    1961     (THelpLineInfo(MainText.Objects[Sel + i0]).Index = 0)then
     1961    (THelpLineInfo(MainText.Objects[Sel + i0]).Index = 0) then
    19621962    Sel := -1;
    19631963  if Sel <> Sel0 then
     
    21662166      SearchResult.AddLine(S, pkNormal, 0, hkImp, I, True);
    21672167      Include(mIMPHELP, I);
    2168     end
     2168    end;
    21692169  end;
    21702170  for I := 0 to nGov - 1 do
     
    21872187    begin
    21882188      if (I >= 0) and ((I <> PrevIndex) or (H <> PrevHandle)) and
    2189         not(I in mADVHELP) then
     2189        not (I in mADVHELP) then
    21902190      begin
    21912191        S := Phrases.Lookup('ADVANCES', I);
     
    22002200    begin
    22012201      if (I >= 0) and ((I <> PrevIndex) or (H <> PrevHandle)) and
    2202         not(I in mIMPHELP) then
     2202        not (I in mIMPHELP) then
    22032203      begin
    22042204        S := Phrases.Lookup('IMPROVEMENTS', I);
     
    22192219    begin
    22202220      if (I >= 0) and ((I <> PrevIndex) or (H <> PrevHandle)) and
    2221         not(I in mFEATUREHELP) then
     2221        not (I in mFEATUREHELP) then
    22222222      begin
    22232223        S := Phrases.Lookup('FEATURES', I);
     
    22712271    while BiColorTextWidth(OffScreen.Canvas, SearchResult[I]) >
    22722272      RightMargin - 32 do
    2273       SearchResult[I] := Copy(SearchResult[I], 1, Length(SearchResult[I]) - 1)
     2273      SearchResult[I] := Copy(SearchResult[I], 1, Length(SearchResult[I]) - 1);
    22742274  end;
    22752275end;
Note: See TracChangeset for help on using the changeset viewer.