Changeset 78


Ignore:
Timestamp:
Jun 2, 2021, 6:27:13 PM (3 years ago)
Author:
chronos
Message:
  • Added: Snap package definition file.
  • Added: Detect language files in different system location.
  • Added: Two screenshots.
  • Fixed: Missing parallel track line ending shift.
  • Modified: Various small typos.
Location:
trunk
Files:
8 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormMain.pas

    r77 r78  
    6767
    6868procedure TFormMain.FormCreate(Sender: TObject);
    69 begin
     69const
     70  LinuxLanguagesDir = '/usr/share/BigMetro/languages';
     71begin
     72  {$IFDEF Linux}
     73  // If installed in Linux system then use installation directory for po files
     74  if not DirectoryExists(Translator1.POFilesFolder) and DirectoryExists(LinuxLanguagesDir) then
     75    Translator1.POFilesFolder := LinuxLanguagesDir;
     76  {$ENDIF}
     77
    7078  Engine := TEngine.Create;
    7179  LoadConfig;
  • trunk/UEngine.pas

    r77 r78  
    12571257    if ComparePoint(P2, Position) and not ComparePoint(P1, Position) then begin
    12581258      Angle := ArcTan2(P1.Y - Position.Y, P1.X - Position.X);
    1259     end else Angle := 0;// else raise Exception.Create('TrackLink angle rrror');
     1259    end else Angle := 0;// else raise Exception.Create('TrackLink angle error');
    12601260
    12611261    GroupItem := TPAngleGroup.SearchAngle(Angle);
     
    12651265      TPAngleGroup.Add(GroupItem);
    12661266    end;
    1267     GroupItem.TrackLinks.Add(TrackLinks[I])
     1267    GroupItem.TrackLinks.Add(TrackLinks[I]);
    12681268  end;
    12691269
     
    12781278        NewShift.X := Trunc(MetroLineThickness * Cos(HAngle) * (J - (TrackLinks.Count - 1) / 2));
    12791279        NewShift.Y := Trunc(MetroLineThickness * Sin(HAngle) * (J - (TrackLinks.Count - 1) / 2));
    1280         //NewShift.X := TrackLinks.Count;
    12811280        Shift := NewShift;
    12821281      end;
     
    19001899  for MetroLine in Lines do
    19011900  with MetroLine do begin
     1901    // Update start
    19021902    if Track.Points.Count > 1 then begin
    19031903      Track.Points[0].Position := Track.Points[0].PositionDesigned +
    19041904        Track.Points[0].LinkUp.Shift;
    19051905    end;
     1906
    19061907    for I := 1 to Track.Points.Count - 1 do
    19071908    with Track.Points[I] do
     
    19331934//      end;
    19341935    end;
     1936
     1937    // Update ending
     1938    if Track.Points.Count > 1 then begin
     1939      Track.Points[Track.Points.Count - 1].Position := Track.Points[Track.Points.Count - 1].PositionDesigned -
     1940        Track.Points[Track.Points.Count - 1].LinkDown.Shift;
     1941    end;
    19351942  end;
    19361943
    19371944  // Remove all temporal links
    19381945  for MetroLine in Lines do
    1939   with MetroLine do
     1946  with MetroLine do begin
    19401947    for J := 0 to Track.Points.Count - 1 do
    19411948    if Assigned(Track.Points[J].LinkUp) then begin
     
    19441951      Track.Points[J + 1].LinkDown := nil;
    19451952    end;
     1953  end;
    19461954end;
    19471955
     
    27262734  TrackStationUp := nil;
    27272735  SelectedTrain := nil;
     2736  Redraw;
    27282737end;
    27292738
Note: See TracChangeset for help on using the changeset viewer.