- Timestamp:
- Jan 7, 2024, 11:23:36 PM (11 months ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LocalPlayer/Term.pas
r522 r523 4789 4789 else if xw > xwd then 4790 4790 ProcessRect((xwd + MapWidth div (xxt * 2)) mod G.lx, ywd, 4791 (xw - xwd) * 2 + 1, MapHeight div yyt - ywd + yw, ProcessOptions) 4791 (xw - xwd) * 2 + 1, MapHeight div yyt - ywd + yw, ProcessOptions); 4792 4792 end 4793 4793 else if yw > ywd then begin … … 4957 4957 ImpImage(Panel.Canvas, ClientWidth - xPalace, yPalace, imPalace, -1, 4958 4958 GameMode <> cMovie 4959 { (GameMode <>cMovie) and (MyRO.Government<>gAnarchy) } )4959 { (GameMode <> cMovie) and (MyRO.Government <> gAnarchy) } ) 4960 4960 else 4961 4961 ImpImage(Panel.Canvas, ClientWidth - xPalace, yPalace, 21, -1, 4962 4962 GameMode <> cMovie 4963 { (GameMode <>cMovie) and (MyRO.Government<>gAnarchy) } );4963 { (GameMode <> cMovie) and (MyRO.Government <> gAnarchy) } ); 4964 4964 end; 4965 4965 … … 4995 4995 xSrcBase := -1; 4996 4996 case BrushTypes[I] of 4997 0 ..8:4997 0..8: 4998 4998 begin 4999 4999 xSrc := BrushTypes[I]; 5000 ySrc := 0 5000 ySrc := 0; 5001 5001 end; 5002 9 ..30:5002 9..30: 5003 5003 begin 5004 5004 xSrcBase := 2; … … 5010 5010 begin 5011 5011 xSrc := 7; 5012 ySrc := 14 5012 ySrc := 14; 5013 5013 end; 5014 5014 fRoad: 5015 5015 begin 5016 5016 xSrc := 0; 5017 ySrc := 9 5017 ySrc := 9; 5018 5018 end; 5019 5019 fRR: 5020 5020 begin 5021 5021 xSrc := 0; 5022 ySrc := 10 5022 ySrc := 10; 5023 5023 end; 5024 5024 fCanal: 5025 5025 begin 5026 5026 xSrc := 0; 5027 ySrc := 11 5027 ySrc := 11; 5028 5028 end; 5029 5029 fPoll: 5030 5030 begin 5031 5031 xSrc := 6; 5032 ySrc := 12 5032 ySrc := 12; 5033 5033 end; 5034 5034 fDeadLands, fDeadLands or fCobalt, fDeadLands or fUranium, … … 5043 5043 begin 5044 5044 xSrc := BrushTypes[I] shr 12 - 1; 5045 ySrc := 12 5045 ySrc := 12; 5046 5046 end; 5047 5047 tiFort: … … 5050 5050 ySrc := 12; 5051 5051 xSrcBase := 7; 5052 ySrcBase := 12 5052 ySrcBase := 12; 5053 5053 end; 5054 5054 fPrefStartPos: 5055 5055 begin 5056 5056 xSrc := 0; 5057 ySrc := 1 5057 ySrc := 1; 5058 5058 end; 5059 5059 fStartPos: 5060 5060 begin 5061 5061 xSrc := 0; 5062 ySrc := 2 5062 ySrc := 2; 5063 5063 end; 5064 5064 end; -
trunk/Packages/DpiControls/Dpi.Common.pas
r522 r523 89 89 uFlags: UINT): Boolean; 90 90 begin 91 LCLIntf.SetWindowPos(hWnd, hWndInsertAfter, ScaleToNative(X), ScaleToNative(Y),91 Result := LCLIntf.SetWindowPos(hWnd, hWndInsertAfter, ScaleToNative(X), ScaleToNative(Y), 92 92 ScaleToNative(cx), ScaleToNative(cy), uFlags); 93 93 end; … … 105 105 function ScaleFromNative(Value: Integer): Integer; 106 106 begin 107 Result := Round(Value * 96 / ScreenInfo.Dpi);107 Result := Floor(Value * 96 / ScreenInfo.Dpi); 108 108 end; 109 109 -
trunk/Packages/DpiControls/Dpi.Controls.pas
r482 r523 1028 1028 1029 1029 procedure TControl.NativeFormResize(Sender: TObject); 1030 begin 1031 BoundsRect := ScaleRectFromNative(GetNativeControl.BoundsRect); 1030 var 1031 R: TRect; 1032 begin 1033 R := ScaleRectFromNative(GetNativeControl.BoundsRect); 1034 FLeft := R.Left; 1035 FTop := R.Top; 1036 FWidth := R.Width; 1037 FHeight := R.Height; 1032 1038 DoFormResize; 1033 1039 end; … … 1070 1076 1071 1077 procedure TControl.UpdateBounds; 1072 var1073 R: TRect;1074 1078 begin 1075 1079 GetNativeControl.BoundsRect := ScaleRectToNative(BoundsRect); 1076 R := ScaleRectToNative(BoundsRect);1077 //WriteLog(Name + ' ' + IntToStr(R.Left) + ', ' + IntToStr(R.Top) + ', ' + IntToStr(R.Width) + ', ' + IntToStr(R.Height))1078 1080 end; 1079 1081
Note:
See TracChangeset
for help on using the changeset viewer.