Ignore:
Timestamp:
Nov 27, 2023, 12:10:57 AM (12 months ago)
Author:
chronos
Message:
  • Modified: Use enumeration type in Help unit for better readability.
  • Fixed: Corruption external help image referenced with incorrect file name case.
  • Fixed: Chinese translation converted to UTF-8.
  • Modified: Code cleanup.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LocalPlayer/TechTree.pas

    r447 r457  
    140140
    141141    with Image.Canvas do begin
    142       // write advance names
     142      // Write advance names
    143143      Font.Assign(UniFont[ftSmall]);
    144144      Font.Color := clBlack;
    145145      Brush.Style := bsClear;
    146       for X := 0 to (Image.width - xStart) div xPitch do
    147         for Y := 0 to (Image.height - yStart) div yPitch do
     146      for X := 0 to (Image.Width - xStart) div xPitch do
     147        for Y := 0 to (Image.Height - yStart) div yPitch do
    148148        begin
    149149          ad := Pixels[xStart + X * xPitch + 10, yStart + Y * yPitch - 1];
     
    156156            Pixels[xStart + X * xPitch + 10, yStart + Y * yPitch - 1]
    157157              := TransparentColor2;
    158           end
     158          end;
    159159        end;
    160160
    161       // write legend
     161      // Write legend
    162162      TextOut(xLegend, yLegend, Phrases2.Lookup('ADVTREE_UP0'));
    163163      TextOut(xLegend, yLegend + yLegendPitch, Phrases2.Lookup('ADVTREE_UP1'));
     
    173173  end;
    174174
    175   // fit window to image, center image in window, center window to screen
     175  // Fit window to image, center image in window, center window to screen
    176176  NewWidth := Min(Screen.Width - 40, Image.Width + LeftBorder + RightBorder + 2 * BlackBorder);
    177177  NewHeight := Min(Screen.Height - 40, Image.Height + TopBorder + BottomBorder + 2 * BlackBorder);
     
    191191  if Button = mbLeft then
    192192  begin
    193     dragging := True;
     193    Dragging := True;
    194194    xDown := X;
    195195    yDown := Y;
     
    200200  Shift: TShiftState; X, Y: Integer);
    201201begin
    202   dragging := False;
     202  Dragging := False;
    203203end;
    204204
     
    206206  X, Y: Integer);
    207207begin
    208   if dragging then
     208  if Dragging then
    209209  begin
    210210    xOffset := xOffset + X - xDown;
Note: See TracChangeset for help on using the changeset viewer.