- Timestamp:
- Oct 4, 2022, 3:53:47 PM (2 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/UEngine.pas
r106 r107 190 190 GrabbedTrainDirection: Integer; 191 191 function GetServedDaysCount: Integer; 192 procedure ResizeView ;192 procedure ResizeView(Force: Boolean); 193 193 function GetExistStationShapes: TStationShapeSet; 194 194 function GetStationOnPos(Pos: TPoint): TMapStation; … … 325 325 MaxPassengersOveloadTime = 2; 326 326 MetroLineThickness = 13; 327 TrackClickDistance = 1 0;327 TrackClickDistance = 15; 328 328 EndStationLength = 50; 329 329 ShowDistances = False; … … 1034 1034 1035 1035 // Need to see all stations on screen 1036 procedure TEngine.ResizeView ;1036 procedure TEngine.ResizeView(Force: Boolean); 1037 1037 var 1038 1038 NewPoint: TPoint; … … 1054 1054 Intersected := NewView.SourceRect; 1055 1055 Intersected.Union(View.SourceRect); 1056 if Intersected = View.SourceRectthen Exit;1056 if not Force and (Intersected = View.SourceRect) then Exit; 1057 1057 1058 1058 View.Assign(NewView); … … 2824 2824 LastNewStationTime := Time; 2825 2825 Stations.AddNew; 2826 ResizeView ;2826 ResizeView(False); 2827 2827 Redraw; 2828 2828 end; … … 3213 3213 if Key = KeyF6 then begin 3214 3214 Stations.AddNew; 3215 ResizeView ;3215 ResizeView(False); 3216 3216 Redraw; 3217 3217 end else … … 3283 3283 end; 3284 3284 3285 ResizeView ;3285 ResizeView(True); 3286 3286 3287 3287 SelectedLine := nil; -
trunk/UTrack.pas
r106 r107 130 130 UpPoint := BaseTrackPoint.GetNeighUp; 131 131 if Assigned(UpPoint) then begin 132 Result.Direction := SubPoint(UpPoint.Position, Position); 132 133 D := Distance(UpPoint.Position, Position); 133 134 if D > 0 then begin 134 Result.Direction := SubPoint(UpPoint.Position, Position);135 135 Result.Position := Point(Trunc(Position.X + Result.Direction.X * RelPos / D), 136 136 Trunc(Position.Y + Result.Direction.Y * RelPos / D)); 137 end else begin 138 Result.Position := Position; 137 139 end; 138 140 end;
Note:
See TracChangeset
for help on using the changeset viewer.