Changeset 507
- Timestamp:
- Dec 25, 2023, 12:01:22 PM (12 months ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LocalPlayer/Term.pas
r502 r507 4197 4197 MiniFrame, MaxMapWidth: Integer; 4198 4198 begin 4199 SmallScreen := ClientWidth < 1024;4199 SmallScreen := Width < 1024; 4200 4200 with MainMap do begin 4201 4201 MaxMapWidth := (G.lx * 2 - 3) * xxt; 4202 4202 // avoide the same tile being visible left and right 4203 if ClientWidth <= MaxMapWidth then begin4204 MapWidth := ClientWidth;4203 if Width <= MaxMapWidth then begin 4204 MapWidth := Width; 4205 4205 MapOffset := 0; 4206 4206 end else begin 4207 4207 MapWidth := MaxMapWidth; 4208 MapOffset := ( ClientWidth - MapWidth) div 2;4209 end; 4210 MapHeight := ClientHeight - TopBarHeight - PanelHeight + Overlap;4211 Panel.SetSize( ClientWidth, PanelHeight);4212 TopBar.SetSize( ClientWidth, TopBarHeight);4208 MapOffset := (Width - MapWidth) div 2; 4209 end; 4210 MapHeight := Height - TopBarHeight - PanelHeight + Overlap; 4211 Panel.SetSize(Width, PanelHeight); 4212 TopBar.SetSize(Width, TopBarHeight); 4213 4213 MiniFrame := (lxmax_xxx - G.ly) div 2; 4214 4214 xMidPanel := (G.lx + MiniFrame) * 2 + 1; 4215 xRightPanel := ClientWidth - LeftPanelWidth - 10;4215 xRightPanel := Width - LeftPanelWidth - 10; 4216 4216 if ClientMode = cEditMap then 4217 4217 TrPitch := 2 * xxt … … 4230 4230 else if yw > ywmax then 4231 4231 yw := ywmax; 4232 UnitInfoBtn.Top := ClientHeight - 29;4232 UnitInfoBtn.Top := Height - 29; 4233 4233 UnitInfoBtn.Left := xMidPanel + 7 + 99; 4234 UnitBtn.Top := ClientHeight - 29;4234 UnitBtn.Top := Height - 29; 4235 4235 UnitBtn.Left := xMidPanel + 7 + 99 + 31; 4236 TerrainBtn.Top := ClientHeight - 29;4236 TerrainBtn.Top := Height - 29; 4237 4237 TerrainBtn.Left := xMidPanel + 7 + 99 + 62; 4238 MovieSpeed1Btn.Top := ClientHeight - 91;4239 MovieSpeed1Btn.Left := ClientWidth div 2 - 62;4240 MovieSpeed2Btn.Top := ClientHeight - 91;4241 MovieSpeed2Btn.Left := ClientWidth div 2 - 62 + 29;4242 MovieSpeed3Btn.Top := ClientHeight - 91;4243 MovieSpeed3Btn.Left := ClientWidth div 2 - 62 + 2 * 29;4244 MovieSpeed4Btn.Top := ClientHeight - 91;4245 MovieSpeed4Btn.Left := ClientWidth div 2 - 62 + 3 * 29 + 12;4246 EOT.Top := ClientHeight - 64;4247 EOT.Left := ClientWidth - 62;4248 sb.SetBorderSpacing( ClientHeight - yTroop - 24, ClientWidth - xRightPanel + 8, 8);4238 MovieSpeed1Btn.Top := Height - 91; 4239 MovieSpeed1Btn.Left := Width div 2 - 62; 4240 MovieSpeed2Btn.Top := Height - 91; 4241 MovieSpeed2Btn.Left := Width div 2 - 62 + 29; 4242 MovieSpeed3Btn.Top := Height - 91; 4243 MovieSpeed3Btn.Left := Width div 2 - 62 + 2 * 29; 4244 MovieSpeed4Btn.Top := Height - 91; 4245 MovieSpeed4Btn.Left := Width div 2 - 62 + 3 * 29 + 12; 4246 EOT.Top := Height - 64; 4247 EOT.Left := Width - 62; 4248 sb.SetBorderSpacing(Height - yTroop - 24, Width - xRightPanel + 8, 8); 4249 4249 {TODO: 4250 4250 SetWindowPos(sb.ScrollBar.Handle, 0, xRightPanel + 10 - 14 - GetSystemMetrics(SM_CXVSCROLL), 4251 ClientHeight - MidPanelHeight + 8, 0, 0, SWP_NOSIZE or SWP_NOZORDER);4251 Height - MidPanelHeight + 8, 0, 0, SWP_NOSIZE or SWP_NOZORDER); 4252 4252 } 4253 4253 MapBtn0.Left := xMini + G.lx - 44; 4254 MapBtn0.Top := ClientHeight - 15;4254 MapBtn0.Top := Height - 15; 4255 4255 MapBtn1.Left := xMini + G.lx - 28; 4256 MapBtn1.Top := ClientHeight - 15;4257 { MapBtn2.Left :=xMini+G.lx-20;4258 MapBtn2.Top :=ClientHeight-15;4259 MapBtn3.Left :=xMini+G.lx-4;4260 MapBtn3.Top :=ClientHeight-15; }4256 MapBtn1.Top := Height - 15; 4257 { MapBtn2.Left := xMini + G.lx - 20; 4258 MapBtn2.Top := Height - 15; 4259 MapBtn3.Left := xMini + G.lx - 4; 4260 MapBtn3.Top := Height - 15; } 4261 4261 MapBtn5.Left := xMini + G.lx - 12; 4262 MapBtn5.Top := ClientHeight - 15;4262 MapBtn5.Top := Height - 15; 4263 4263 MapBtn4.Left := xMini + G.lx + 20; 4264 MapBtn4.Top := ClientHeight - 15;4264 MapBtn4.Top := Height - 15; 4265 4265 MapBtn6.Left := xMini + G.lx + 36; 4266 MapBtn6.Top := ClientHeight - 15;4267 TreasuryArea.Left := ClientWidth div 2 - 172;4268 ResearchArea.Left := ClientWidth div 2;4269 ManagementArea.Left := ClientWidth - xPalace;4266 MapBtn6.Top := Height - 15; 4267 TreasuryArea.Left := Width div 2 - 172; 4268 ResearchArea.Left := Width div 2; 4269 ManagementArea.Left := Width - xPalace; 4270 4270 ManagementArea.Top := TopBarHeight + MapHeight - Overlap + yPalace; 4271 4271 ArrangeMidPanel; 4272 4272 if RepaintOnResize then 4273 4273 begin 4274 RectInvalidate(0, TopBarHeight, ClientWidth, TopBarHeight + MapHeight);4274 RectInvalidate(0, TopBarHeight, Width, TopBarHeight + MapHeight); 4275 4275 MapValid := False; 4276 4276 PaintAll; -
trunk/Packages/DpiControls/Dpi.PixelPointer.pas
r506 r507 148 148 {$IFOPT R+} 149 149 var 150 B: Integer; 150 151 X: Integer; 151 152 Y: Integer; … … 155 156 if (PByte(Pixel) < PByte(Data)) or 156 157 (PByte(Pixel) >= PByte(Data) + Height * BytesPerLine) then begin 157 X:= PByte(Pixel) - PByte(Data);158 Y := Floor( X/ BytesPerLine);159 X := X- Y * BytesPerLine;158 B := PByte(Pixel) - PByte(Data); 159 Y := Floor(B / BytesPerLine); 160 X := B - Y * BytesPerLine; 160 161 X := Floor(X / BytesPerPixel); 161 162 raise Exception.Create(Format(SOutOfRange, [X, Y]));
Note:
See TracChangeset
for help on using the changeset viewer.