Changeset 300 for trunk/Packages


Ignore:
Timestamp:
Mar 8, 2021, 9:23:32 PM (4 years ago)
Author:
chronos
Message:
  • Modified: Code cleanup.
Location:
trunk/Packages/CevoComponents
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Packages/CevoComponents/ScreenTools.pas

    r296 r300  
    1313  TTexture = record
    1414    Image: TBitmap;
    15     clBevelLight, clBevelShade, clTextLight, clTextShade, clLitText, clMark,
    16     clPage, clCover: TColor;
     15    clBevelLight: TColor;
     16    clBevelShade: TColor;
     17    clTextLight: TColor;
     18    clTextShade: TColor;
     19    clLitText: TColor;
     20    clMark: TColor;
     21    clPage: TColor;
     22    clCover: TColor;
    1723  end;
    1824  TLoadGraphicFileOption = (gfNoError, gfNoGamma);
  • trunk/Packages/CevoComponents/StringTables.pas

    r286 r300  
    2222    function Search(const Content: string; var Handle, Index: integer): boolean;
    2323  end;
     24
    2425
    2526implementation
     
    7071  s: string;
    7172begin
    72   if Index < 0 then
     73  if Index < 0 then begin
    7374    if Handle < 0 then begin
    7475      Result := '';
     
    8687      end;
    8788      Result := S;
    88     end else
    89     if (Handle + Index + 1) >= Lines.Count then begin
    90       Result := '';
    91       Exit;
    92     end else Result := Lines[Handle + Index + 1];
     89    end;
     90  end else
     91  if (Handle + Index + 1) >= Lines.Count then begin
     92    Result := '';
     93    Exit;
     94  end else Result := Lines[Handle + Index + 1];
    9395  while (Result <> '') and ((Result[1] = ' ') or (Result[1] = #9)) do
    9496    Delete(Result, 1, 1);
     
    104106begin
    105107  Handle := GetHandle(Item);
    106   if Handle >= 0 then
    107     Result := LookupByHandle(Handle, Index)
    108   else
    109     Result := '';
    110   if Result = '' then
    111     if Index < 0 then
    112       Result := Format('[%s]', [Item])
    113     else
    114       Result := Format('[%s %d]', [Item, Index])
     108  if Handle >= 0 then Result := LookupByHandle(Handle, Index)
     109    else Result := '';
     110  if Result = '' then begin
     111    if Index < 0 then Result := Format('[%s]', [Item])
     112      else Result := Format('[%s %d]', [Item, Index]);
     113  end;
    115114end;
    116115
     
    153152    begin
    154153      result := false;
    155       exit
     154      exit;
    156155    end;
    157156    if Copy(Lines[h + i + 1], 1, 1) = '#' then
    158157    begin
    159158      h := h + i + 1;
    160       i := -1
     159      i := -1;
    161160    end;
    162161    if (h >= 0) and not ((Length(Lines[h + i + 1]) > 0) and (Lines[h + i + 1][1] in ['#', ':', ';'])) and
Note: See TracChangeset for help on using the changeset viewer.