Changeset 496 for trunk/LocalPlayer
- Timestamp:
- Dec 18, 2023, 10:31:54 PM (11 months ago)
- Location:
- trunk/LocalPlayer
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LocalPlayer/Battle.pas
r471 r496 239 239 FillRect(Rect(0, 0, ClientWidth, ClientHeight)); 240 240 Brush.Style := TBrushStyle.bsClear; 241 PaintBackground( self, 3 + Border, 3 + Border,241 PaintBackground(Self, 3 + Border, 3 + Border, 242 242 ClientWidth - (6 + 2 * Border), ClientHeight - (6 + 2 * Border)); 243 243 end; -
trunk/LocalPlayer/Enhance.pas
r468 r496 126 126 procedure TEnhanceDlg.OffscreenPaint; 127 127 var 128 I, stage, TerrType, TileImp, X, EndStage, Cost, LastJob: Integer;128 I, Stage, TerrType, TileImp, X, EndStage, Cost, LastJob: Integer; 129 129 S: string; 130 Done: set of jNone ..jTrans;130 Done: set of jNone..jTrans; 131 131 TypeChanged: Boolean; 132 132 begin 133 OffscreenUser := self;133 OffscreenUser := Self; 134 134 Offscreen.Canvas.Font.Assign(UniFont[ftSmall]); 135 135 FillOffscreen(0, 0, InnerWidth, InnerHeight); … … 145 145 Done := []; 146 146 Cost := 0; 147 for stage := 0 to EndStage do147 for Stage := 0 to EndStage do 148 148 begin 149 if stage > 0 then149 if Stage > 0 then 150 150 begin 151 151 Sprite(Offscreen, HGrSystem, X - 10, 66, 14, 14, 80, 1); 152 case MyData.EnhancementJobs[Page, stage - 1] of152 case MyData.EnhancementJobs[Page, Stage - 1] of 153 153 jRoad: 154 154 begin … … 192 192 end; 193 193 end; 194 Include(Done, MyData.EnhancementJobs[Page, stage - 1]);194 Include(Done, MyData.EnhancementJobs[Page, Stage - 1]); 195 195 end; 196 196 -
trunk/LocalPlayer/Help.pas
r474 r496 402 402 BitBltCanvas(ACanvas, X, Y - 4, 24, 24, HGrSystem.Data.Canvas, 1, 403 403 146); 404 BiColorTextOut(ACanvas, $FFFFFF, $7F007F, X + 10 - ACanvas.Text width(S[1]) div 2,404 BiColorTextOut(ACanvas, $FFFFFF, $7F007F, X + 10 - ACanvas.TextWidth(S[1]) div 2, 405 405 Y - 3, S[1]); 406 406 BiColorTextOut(ACanvas, CaptionColor, $7F007F, X + 24, Y - 3, Copy(S, 2, 255)); … … 578 578 Font.Assign(UniFont[ftSmall]); 579 579 BiColorTextOut(OffScreen.Canvas, $000000, $7F007F, 580 (InnerWidth - Text width(S)) div 2, I * 24 + 26, S);580 (InnerWidth - TextWidth(S)) div 2, I * 24 + 26, S); 581 581 Font.Assign(UniFont[ftNormal]); 582 582 end; -
trunk/LocalPlayer/NatStat.pas
r470 r496 498 498 pView := Me; 499 499 Tag := pView; 500 PlayerClick( self); // no, this is not nice500 PlayerClick(Self); // no, this is not nice 501 501 end 502 502 else -
trunk/LocalPlayer/Nego.pas
r474 r496 485 485 OkEnabled: Boolean; 486 486 begin 487 if (OffscreenUser <> nil) and (OffscreenUser <> self) then487 if (OffscreenUser <> nil) and (OffscreenUser <> Self) then 488 488 OffscreenUser.Update; 489 489 // complete working with old owner to prevent rebound 490 OffscreenUser := self;490 OffscreenUser := Self; 491 491 492 492 if (DipCommand >= 0) and (Page = History[Me].N) then -
trunk/LocalPlayer/Rates.pas
r468 r496 48 48 S, s1: string; 49 49 begin 50 if (OffscreenUser <> nil) and (OffscreenUser <> self) then50 if (OffscreenUser <> nil) and (OffscreenUser <> Self) then 51 51 OffscreenUser.Update; 52 52 // complete working with old owner to prevent rebound 53 OffscreenUser := self;53 OffscreenUser := Self; 54 54 55 55 Fill(Offscreen.Canvas, 0, 0, ClientWidth, ClientHeight, -
trunk/LocalPlayer/Select.pas
r487 r496 986 986 procedure TListDlg.InitLines; 987 987 var 988 required: array [0 .. nAdv - 1] of Integer;988 Required: array [0 .. nAdv - 1] of Integer; 989 989 990 990 procedure TryAddImpLine(Layer, Project: Integer); … … 1000 1000 procedure SortTechs; 1001 1001 var 1002 I, J, swap: Integer;1002 I, J, Swap: Integer; 1003 1003 begin // sort by advancedness 1004 1004 for I := 0 to Lines[0] - 2 do … … 1008 1008 nAdv + Code[0, J] then 1009 1009 begin 1010 swap := Code[0, I];1010 Swap := Code[0, I]; 1011 1011 Code[0, I] := Code[0, J]; 1012 Code[0, J] := swap;1012 Code[0, J] := Swap; 1013 1013 end; 1014 1014 end; … … 1016 1016 procedure SortCities; 1017 1017 var 1018 I, J, swap: Integer;1018 I, J, Swap: Integer; 1019 1019 begin 1020 1020 for I := 0 to Lines[0] - 2 do … … 1023 1023 then 1024 1024 begin 1025 swap := Code[0, I];1025 Swap := Code[0, I]; 1026 1026 Code[0, I] := Code[0, J]; 1027 Code[0, J] := swap;1027 Code[0, J] := Swap; 1028 1028 end; 1029 1029 end; … … 1039 1039 procedure SortModels; 1040 1040 var 1041 I, J, swap: Integer;1041 I, J, Swap: Integer; 1042 1042 begin // sort by code[2] 1043 1043 for I := 0 to Lines[0] - 2 do … … 1045 1045 if Code[2, I] > Code[2, J] then 1046 1046 begin 1047 swap := Code[0, I];1047 Swap := Code[0, I]; 1048 1048 Code[0, I] := Code[0, J]; 1049 Code[0, J] := swap;1050 swap := Code[1, I];1049 Code[0, J] := Swap; 1050 Swap := Code[1, I]; 1051 1051 Code[1, I] := Code[1, J]; 1052 Code[1, J] := swap;1053 swap := Code[2, I];1052 Code[1, J] := Swap; 1053 Swap := Code[2, I]; 1054 1054 Code[2, I] := Code[2, J]; 1055 Code[2, J] := swap;1055 Code[2, J] := Swap; 1056 1056 end; 1057 1057 end; … … 1059 1059 procedure MarkPreqs(I: Integer); 1060 1060 begin 1061 required[I] := 1;1061 Required[I] := 1; 1062 1062 if MyRO.Tech[I] < tsSeen then 1063 1063 begin … … 1147 1147 if MyData.FarTech <> adNone then 1148 1148 begin 1149 FillChar( required, SizeOf(required), 0);1149 FillChar(Required, SizeOf(Required), 0); 1150 1150 MarkPreqs(MyData.FarTech); 1151 1151 end; … … 1153 1153 if ((I in FutureTech) or (MyRO.Tech[I] < tsApplicable)) and 1154 1154 (Server(sSetResearch - sExecute, Me, I, nil^) >= rExecuted) and 1155 ((MyData.FarTech = adNone) or ( required[I] > 0)) then1155 ((MyData.FarTech = adNone) or (Required[I] > 0)) then 1156 1156 begin 1157 1157 Code[0, Lines[0]] := I; -
trunk/LocalPlayer/TechTree.pas
r468 r496 99 99 ClientHeight - BlackBorder, -BlackBorder - xOffset, 100 100 -BlackBorder - yOffset, Paper); 101 if xOffset + Image. width < ClientWidth - 2 * BlackBorder then102 FillRectSeamless(Canvas, BlackBorder + xOffset + Image. width, BlackBorder,101 if xOffset + Image.Width < ClientWidth - 2 * BlackBorder then 102 FillRectSeamless(Canvas, BlackBorder + xOffset + Image.Width, BlackBorder, 103 103 ClientWidth - BlackBorder, ClientHeight - BlackBorder, 104 104 -BlackBorder - xOffset, -BlackBorder - yOffset, Paper); 105 105 X := Max(BlackBorder, BlackBorder + xOffset); 106 W := Min(BlackBorder + xOffset + Image. width, ClientWidth - BlackBorder);106 W := Min(BlackBorder + xOffset + Image.Width, ClientWidth - BlackBorder); 107 107 if yOffset > 0 then 108 108 FillRectSeamless(Canvas, X, BlackBorder, W, BlackBorder + yOffset, 109 109 -BlackBorder - xOffset, -BlackBorder - yOffset, Paper); 110 if yOffset + Image. height < ClientHeight - 2 * BlackBorder then111 FillRectSeamless(Canvas, X, BlackBorder + yOffset + Image. height, W,110 if yOffset + Image.Height < ClientHeight - 2 * BlackBorder then 111 FillRectSeamless(Canvas, X, BlackBorder + yOffset + Image.Height, W, 112 112 ClientHeight - BlackBorder, -BlackBorder - xOffset, 113 113 -BlackBorder - yOffset, Paper); … … 115 115 BitBltCanvas(Canvas, Max(BlackBorder, BlackBorder + xOffset), 116 116 Max(BlackBorder, BlackBorder + yOffset), 117 Min(Image. width, Min(Image.width + xOffset,117 Min(Image.Width, Min(Image.Width + xOffset, 118 118 Min(ClientWidth - 2 * BlackBorder, ClientWidth - 2 * BlackBorder - xOffset)) 119 ), Min(Image. height, Min(Image.height + yOffset,119 ), Min(Image.Height, Min(Image.Height + yOffset, 120 120 Min(ClientHeight - 2 * BlackBorder, ClientHeight - 2 * BlackBorder - 121 121 yOffset))), Image.Canvas, Max(0, -xOffset), … … 177 177 (Screen.Height - NewHeight) div 2, 178 178 NewWidth, NewHeight); 179 CloseBtn.Left := width - CloseBtn.width - BlackBorder - 8;179 CloseBtn.Left := Width - CloseBtn.Width - BlackBorder - 8; 180 180 CloseBtn.Top := BlackBorder + 8; 181 181 xOffset := (ClientWidth - Image.Width + LeftBorder - RightBorder) div 2 - … … 213 213 if xOffset > LeftBorder then 214 214 xOffset := LeftBorder; 215 if xOffset < ClientWidth - 2 * BlackBorder - Image. width - RightBorder then216 xOffset := ClientWidth - 2 * BlackBorder - Image. width - RightBorder;215 if xOffset < ClientWidth - 2 * BlackBorder - Image.Width - RightBorder then 216 xOffset := ClientWidth - 2 * BlackBorder - Image.Width - RightBorder; 217 217 if yOffset > TopBorder then 218 218 yOffset := TopBorder; 219 if yOffset < ClientHeight - 2 * BlackBorder - Image. height - BottomBorder219 if yOffset < ClientHeight - 2 * BlackBorder - Image.Height - BottomBorder 220 220 then 221 yOffset := ClientHeight - 2 * BlackBorder - Image. height - BottomBorder;221 yOffset := ClientHeight - 2 * BlackBorder - Image.Height - BottomBorder; 222 222 223 223 SmartInvalidate; -
trunk/LocalPlayer/Term.pas
r486 r496 389 389 procedure PaintLoc_BeforeMove(FromLoc: Integer); 390 390 procedure PaintLocTemp(Loc: Integer; Style: TPaintLocTempStyle = pltsNormal); 391 procedure PaintBufferToScreen(xMap, yMap, width, height: Integer);391 procedure PaintBufferToScreen(xMap, yMap, Width, Height: Integer); 392 392 procedure PaintDestination; 393 393 procedure SetUnFocus(uix: Integer); … … 652 652 lxmax_xxx = 130; 653 653 LeftPanelWidth = 70; 654 overlap = PanelHeight - MidPanelHeight;654 Overlap = PanelHeight - MidPanelHeight; 655 655 yTroop = PanelHeight - 83; 656 656 xPalace = 66; … … 1790 1790 begin 1791 1791 Brush.Color := $000000; 1792 FillRect(Rect(0, 0, Panel. width, Panel.height));1792 FillRect(Rect(0, 0, Panel.Width, Panel.Height)); 1793 1793 Brush.Style := TBrushStyle.bsClear; 1794 1794 end; … … 1796 1796 begin 1797 1797 Brush.Color := $000000; 1798 FillRect(Rect(0, 0, TopBar. width, TopBar.height));1798 FillRect(Rect(0, 0, TopBar.Width, TopBar.Height)); 1799 1799 Brush.Style := TBrushStyle.bsClear; 1800 1800 end; … … 2806 2806 begin 2807 2807 Brush.Color := $000000; 2808 FillRect(Rect(0, 0, Panel. width, Panel.height));2808 FillRect(Rect(0, 0, Panel.Width, Panel.Height)); 2809 2809 Brush.Style := TBrushStyle.bsClear; 2810 2810 end; … … 2812 2812 begin 2813 2813 Brush.Color := $000000; 2814 FillRect(Rect(0, 0, TopBar. width, TopBar.height));2814 FillRect(Rect(0, 0, TopBar.Width, TopBar.Height)); 2815 2815 Brush.Style := TBrushStyle.bsClear; 2816 2816 end; … … 3565 3565 Buffer := TBitmap.Create; 3566 3566 Buffer.PixelFormat := TPixelFormat.pf24bit; 3567 if 2 * lxmax > 3 * xSizeBig then Buffer. width := 2 * lxmax3568 else Buffer. width := 3 * xSizeBig;3569 if lymax > 3 * ySizeBig then Buffer. height := lymax3570 else Buffer. height := 3 * ySizeBig;3567 if 2 * lxmax > 3 * xSizeBig then Buffer.Width := 2 * lxmax 3568 else Buffer.Width := 3 * xSizeBig; 3569 if lymax > 3 * ySizeBig then Buffer.Height := lymax 3570 else Buffer.Height := 3 * ySizeBig; 3571 3571 Buffer.Canvas.Font.Assign(UniFont[ftSmall]); 3572 3572 for I := 0 to nPl - 1 do … … 4208 4208 MapOffset := (ClientWidth - MapWidth) div 2; 4209 4209 end; 4210 MapHeight := ClientHeight - TopBarHeight - PanelHeight + overlap;4210 MapHeight := ClientHeight - TopBarHeight - PanelHeight + Overlap; 4211 4211 Panel.SetSize(ClientWidth, PanelHeight); 4212 4212 TopBar.SetSize(ClientWidth, TopBarHeight); … … 4268 4268 ResearchArea.Left := ClientWidth div 2; 4269 4269 ManagementArea.Left := ClientWidth - xPalace; 4270 ManagementArea.Top := TopBarHeight + MapHeight - overlap + yPalace;4270 ManagementArea.Top := TopBarHeight + MapHeight - Overlap + yPalace; 4271 4271 ArrangeMidPanel; 4272 4272 if RepaintOnResize then … … 4648 4648 // panel protusions are added 4649 4649 // NoMap must be set to buffer and bounds before 4650 procedure TMainScreen.PaintBufferToScreen(xMap, yMap, width, height: Integer);4651 begin 4652 if xMap + width > MapWidth then4653 width := MapWidth - xMap;4654 if yMap + height > MapHeight then4655 height := MapHeight - yMap;4656 if ( width <= 0) or (height <= 0) or (width + xMap <= 0) or (height + yMap <= 0)4650 procedure TMainScreen.PaintBufferToScreen(xMap, yMap, Width, Height: Integer); 4651 begin 4652 if xMap + Width > MapWidth then 4653 Width := MapWidth - xMap; 4654 if yMap + Height > MapHeight then 4655 Height := MapHeight - yMap; 4656 if (Width <= 0) or (Height <= 0) or (Width + xMap <= 0) or (Height + yMap <= 0) 4657 4657 then 4658 4658 Exit; 4659 4659 4660 NoMap.BitBltBitmap(Panel, -xMap - MapOffset, -yMap + MapHeight - overlap, xMidPanel,4661 overlap, 0, 0, SRCCOPY);4660 NoMap.BitBltBitmap(Panel, -xMap - MapOffset, -yMap + MapHeight - Overlap, xMidPanel, 4661 Overlap, 0, 0, SRCCOPY); 4662 4662 NoMap.BitBltBitmap(Panel, -xMap - MapOffset + xRightPanel, 4663 -yMap + MapHeight - overlap, Panel.width - xRightPanel, overlap,4663 -yMap + MapHeight - Overlap, Panel.Width - xRightPanel, Overlap, 4664 4664 xRightPanel, 0, SRCCOPY); 4665 4665 if yMap < 0 then 4666 4666 begin 4667 4667 if xMap < 0 then 4668 BitBltCanvas(Canvas, MapOffset, TopBarHeight, width + xMap,4669 height + yMap, Buffer.Canvas, -xMap, -yMap)4668 BitBltCanvas(Canvas, MapOffset, TopBarHeight, Width + xMap, 4669 Height + yMap, Buffer.Canvas, -xMap, -yMap) 4670 4670 else 4671 BitBltCanvas(Canvas, xMap + MapOffset, TopBarHeight, width,4672 height + yMap, Buffer.Canvas, 0, -yMap);4671 BitBltCanvas(Canvas, xMap + MapOffset, TopBarHeight, Width, 4672 Height + yMap, Buffer.Canvas, 0, -yMap); 4673 4673 end 4674 4674 else 4675 4675 begin 4676 4676 if xMap < 0 then 4677 BitBltCanvas(Canvas, MapOffset, TopBarHeight + yMap, width + xMap,4678 height, Buffer.Canvas, -xMap, 0)4677 BitBltCanvas(Canvas, MapOffset, TopBarHeight + yMap, Width + xMap, 4678 Height, Buffer.Canvas, -xMap, 0) 4679 4679 else 4680 BitBltCanvas(Canvas, xMap + MapOffset, TopBarHeight + yMap, width,4681 height, Buffer.Canvas, 0, 0);4680 BitBltCanvas(Canvas, xMap + MapOffset, TopBarHeight + yMap, Width, 4681 Height, Buffer.Canvas, 0, 0); 4682 4682 end; 4683 4683 end; … … 4729 4729 FillRect(Rect(0, 0, MapWidth, MapHeight)); 4730 4730 Brush.Style := TBrushStyle.bsClear; 4731 OffscreenUser := self;4731 OffscreenUser := Self; 4732 4732 Exit; 4733 4733 end; 4734 4734 4735 4735 MainMap.SetPaintBounds(0, 0, MapWidth, MapHeight); 4736 if OffscreenUser <> self then4736 if OffscreenUser <> Self then 4737 4737 begin 4738 4738 if OffscreenUser <> nil then … … 4772 4772 for DoInvalidate := False to FastScrolling do begin 4773 4773 if DoInvalidate then begin 4774 rec.Bottom := MapHeight - overlap;4774 rec.Bottom := MapHeight - Overlap; 4775 4775 {$IFDEF WINDOWS} 4776 4776 ScrollDC(Canvas.Handle, (xwd - xw) * (xxt * 2), (ywd - yw) * yyt, rec, … … 4795 4795 else if yw > ywd then begin 4796 4796 if DoInvalidate then 4797 RectInvalidate(MapOffset, TopBarHeight + MapHeight - overlap -4797 RectInvalidate(MapOffset, TopBarHeight + MapHeight - Overlap - 4798 4798 (yw - ywd) * yyt, MapOffset + MapWidth, TopBarHeight + MapHeight 4799 - overlap)4799 - Overlap) 4800 4800 else 4801 4801 ProcessRect(xw, (ywd + MapHeight div (yyt * 2) * 2), MapWidth div xxt, … … 4818 4818 if not FastScrolling then 4819 4819 RectInvalidate(MapOffset, TopBarHeight, MapOffset + MapWidth, 4820 TopBarHeight + MapHeight - overlap);4821 RectInvalidate(xMidPanel, TopBarHeight + MapHeight - overlap, xRightPanel,4820 TopBarHeight + MapHeight - Overlap); 4821 RectInvalidate(xMidPanel, TopBarHeight + MapHeight - Overlap, xRightPanel, 4822 4822 TopBarHeight + MapHeight); 4823 4823 end; … … 4852 4852 MiniMapPaint; 4853 4853 CopyMiniToPanel; 4854 RectInvalidate(xMini + 2, TopBarHeight + MapHeight - overlap + yMini + 2,4855 xMini + 2 + G.lx * 2, TopBarHeight + MapHeight - overlap + yMini +4854 RectInvalidate(xMini + 2, TopBarHeight + MapHeight - Overlap + yMini + 2, 4855 xMini + 2 + G.lx * 2, TopBarHeight + MapHeight - Overlap + yMini + 4856 4856 2 + G.ly); 4857 4857 end; … … 4908 4908 Fill(Panel.Canvas, 0, 3, xMidPanel + 7 - 10, PanelHeight - 3, 4909 4909 MainTexture.Width - (xMidPanel + 7 - 10), MainTexture.Height - PanelHeight); 4910 Fill(Panel.Canvas, xRightPanel + 10 - 7, 3, Panel. width - xRightPanel - 10 +4910 Fill(Panel.Canvas, xRightPanel + 10 - 7, 3, Panel.Width - xRightPanel - 10 + 4911 4911 7, PanelHeight - 3, -(xRightPanel + 10 - 7), MainTexture.Height - PanelHeight); 4912 4912 FillLarge(Panel.Canvas, xMidPanel - 2, PanelHeight - MidPanelHeight, … … 5337 5337 if TerrainBtn.Visible then 5338 5338 with TerrainBtn do 5339 RFrame(Panel.Canvas, Left - 1, Top - self.ClientHeight +5340 (PanelHeight - 1), Left + width, Top + height - self.ClientHeight +5339 RFrame(Panel.Canvas, Left - 1, Top - Self.ClientHeight + 5340 (PanelHeight - 1), Left + Width, Top + Height - Self.ClientHeight + 5341 5341 PanelHeight, MainTexture.ColorBevelShade, MainTexture.ColorBevelLight) 5342 5342 end; { if TroopLoc>=0 } … … 5349 5349 if Visible then 5350 5350 begin 5351 Dump(Panel, HGrSystem, Left, Top - self.ClientHeight + PanelHeight,5351 Dump(Panel, HGrSystem, Left, Top - Self.ClientHeight + PanelHeight, 5352 5352 25, 25, 169, 243); 5353 Sprite(Panel, HGrSystem, Left, Top - self.ClientHeight + PanelHeight,5353 Sprite(Panel, HGrSystem, Left, Top - Self.ClientHeight + PanelHeight, 5354 5354 25, 25, 1 + 26 * ButtonIndex, 337); 5355 RFrame(Panel.Canvas, Left - 1, Top - self.ClientHeight +5356 (PanelHeight - 1), Left + width, Top + height - self.ClientHeight +5355 RFrame(Panel.Canvas, Left - 1, Top - Self.ClientHeight + 5356 (PanelHeight - 1), Left + Width, Top + Height - Self.ClientHeight + 5357 5357 PanelHeight, MainTexture.ColorBevelShade, MainTexture.ColorBevelLight); 5358 5358 end; … … 5365 5365 with TButtonC(Controls[I]) do 5366 5366 begin 5367 Dump(Panel, HGrSystem, Left, Top - self.ClientHeight + PanelHeight,5367 Dump(Panel, HGrSystem, Left, Top - Self.ClientHeight + PanelHeight, 5368 5368 12, 12, 169, 178 + 13 * ButtonIndex); 5369 RFrame(Panel.Canvas, Left - 1, Top - self.ClientHeight +5370 (PanelHeight - 1), Left + width, Top + height - self.ClientHeight +5369 RFrame(Panel.Canvas, Left - 1, Top - Self.ClientHeight + 5370 (PanelHeight - 1), Left + Width, Top + Height - Self.ClientHeight + 5371 5371 PanelHeight, MainTexture.ColorBevelShade, MainTexture.ColorBevelLight); 5372 5372 end; … … 5620 5620 MiniMapPaint; 5621 5621 CopyMiniToPanel; 5622 RectInvalidate(xMini + 2, TopBarHeight + MapHeight - overlap + yMini + 2,5623 xMini + 2 + G.lx * 2, TopBarHeight + MapHeight - overlap + yMini +5622 RectInvalidate(xMini + 2, TopBarHeight + MapHeight - Overlap + yMini + 2, 5623 xMini + 2 + G.lx * 2, TopBarHeight + MapHeight - Overlap + yMini + 5624 5624 2 + G.ly); 5625 5625 Update; … … 5846 5846 MainTexture.ColorMark); 5847 5847 end; 5848 RectInvalidate(xMini + 2, TopBarHeight + MapHeight - overlap + yMini + 2,5849 xMini + 2 + G.lx * 2, TopBarHeight + MapHeight - overlap + yMini5848 RectInvalidate(xMini + 2, TopBarHeight + MapHeight - Overlap + yMini + 2, 5849 xMini + 2 + G.lx * 2, TopBarHeight + MapHeight - Overlap + yMini 5850 5850 + 2 + G.ly); 5851 5851 end … … 6029 6029 BattleDlg.uix := UnFocus; 6030 6030 BattleDlg.ToLoc := MouseLoc; 6031 BattleDlg.Left := X - BattleDlg. width div 2;6031 BattleDlg.Left := X - BattleDlg.Width div 2; 6032 6032 if BattleDlg.Left < 0 then 6033 6033 BattleDlg.Left := 0 6034 else if BattleDlg.Left + BattleDlg. width > Screen.width then6035 BattleDlg.Left := Screen. width - BattleDlg.width;6036 BattleDlg.Top := Y - BattleDlg. height div 2;6034 else if BattleDlg.Left + BattleDlg.Width > Screen.Width then 6035 BattleDlg.Left := Screen.Width - BattleDlg.Width; 6036 BattleDlg.Top := Y - BattleDlg.Height div 2; 6037 6037 if BattleDlg.Top < 0 then 6038 6038 BattleDlg.Top := 0 6039 else if BattleDlg.Top + BattleDlg. height > Screen.height then6040 BattleDlg.Top := Screen. height - BattleDlg.height;6039 else if BattleDlg.Top + BattleDlg.Height > Screen.Height then 6040 BattleDlg.Top := Screen.Height - BattleDlg.Height; 6041 6041 BattleDlg.IsSuicideQuery := False; 6042 6042 BattleDlg.Show; … … 7841 7841 Buffer.Canvas, 0, 0); 7842 7842 MainOffscreenPaint; 7843 RectInvalidate(xMini + 2, TopBarHeight + MapHeight - overlap + yMini + 2,7844 xMini + 2 + G.lx * 2, TopBarHeight + MapHeight - overlap + yMini +7843 RectInvalidate(xMini + 2, TopBarHeight + MapHeight - Overlap + yMini + 2, 7844 xMini + 2 + G.lx * 2, TopBarHeight + MapHeight - Overlap + yMini + 7845 7845 2 + G.ly); 7846 7846 Update; … … 7970 7970 if xMidPanel > MapOffset then 7971 7971 FillRect(Rect(0, TopBarHeight, MapOffset, TopBarHeight + MapHeight 7972 - overlap))7972 - Overlap)) 7973 7973 else 7974 7974 begin 7975 7975 FillRect(Rect(0, TopBarHeight, xMidPanel, TopBarHeight + MapHeight - 7976 overlap));7976 Overlap)); 7977 7977 FillRect(Rect(xMidPanel, TopBarHeight, MapOffset, 7978 7978 TopBarHeight + MapHeight)); … … 7980 7980 if xRightPanel < MapOffset + MapWidth then 7981 7981 FillRect(Rect(MapOffset + MapWidth, TopBarHeight, ClientWidth, 7982 TopBarHeight + MapHeight - overlap))7982 TopBarHeight + MapHeight - Overlap)) 7983 7983 else 7984 7984 begin … … 7986 7986 TopBarHeight + MapHeight)); 7987 7987 FillRect(Rect(xRightPanel, TopBarHeight, ClientWidth, 7988 TopBarHeight + MapHeight - overlap));7988 TopBarHeight + MapHeight - Overlap)); 7989 7989 end; 7990 7990 Brush.Style := TBrushStyle.bsClear; 7991 7991 end; 7992 BitBltCanvas(Canvas, MapOffset, TopBarHeight, MapWidth, MapHeight - overlap,7992 BitBltCanvas(Canvas, MapOffset, TopBarHeight, MapWidth, MapHeight - Overlap, 7993 7993 Offscreen.Canvas, 0, 0); 7994 7994 BitBltCanvas(Canvas, 0, 0, ClientWidth, TopBarHeight, TopBar.Canvas, 7995 7995 0, 0); 7996 7996 if xMidPanel > MapOffset then 7997 BitBltCanvas(Canvas, xMidPanel, TopBarHeight + MapHeight - overlap,7998 ClientWidth div 2 - xMidPanel, overlap, Offscreen.Canvas,7999 xMidPanel - MapOffset, MapHeight - overlap)7997 BitBltCanvas(Canvas, xMidPanel, TopBarHeight + MapHeight - Overlap, 7998 ClientWidth div 2 - xMidPanel, Overlap, Offscreen.Canvas, 7999 xMidPanel - MapOffset, MapHeight - Overlap) 8000 8000 else 8001 BitBltCanvas(Canvas, MapOffset, TopBarHeight + MapHeight - overlap,8002 ClientWidth div 2 - MapOffset, overlap, Offscreen.Canvas, 0,8003 MapHeight - overlap);8001 BitBltCanvas(Canvas, MapOffset, TopBarHeight + MapHeight - Overlap, 8002 ClientWidth div 2 - MapOffset, Overlap, Offscreen.Canvas, 0, 8003 MapHeight - Overlap); 8004 8004 if xRightPanel < MapOffset + MapWidth then 8005 BitBltCanvas(Canvas, ClientWidth div 2, TopBarHeight + MapHeight - overlap,8006 xRightPanel - ClientWidth div 2, overlap, Offscreen.Canvas,8007 ClientWidth div 2 - MapOffset, MapHeight - overlap)8005 BitBltCanvas(Canvas, ClientWidth div 2, TopBarHeight + MapHeight - Overlap, 8006 xRightPanel - ClientWidth div 2, Overlap, Offscreen.Canvas, 8007 ClientWidth div 2 - MapOffset, MapHeight - Overlap) 8008 8008 else 8009 BitBltCanvas(Canvas, ClientWidth div 2, TopBarHeight + MapHeight - overlap,8010 MapOffset + MapWidth - ClientWidth div 2, overlap,8009 BitBltCanvas(Canvas, ClientWidth div 2, TopBarHeight + MapHeight - Overlap, 8010 MapOffset + MapWidth - ClientWidth div 2, Overlap, 8011 8011 Offscreen.Canvas, ClientWidth div 2 - MapOffset, 8012 MapHeight - overlap);8013 BitBltCanvas(Canvas, 0, TopBarHeight + MapHeight - overlap, xMidPanel,8014 overlap, Panel.Canvas, 0, 0);8015 BitBltCanvas(Canvas, xRightPanel, TopBarHeight + MapHeight - overlap,8016 Panel. width - xRightPanel, overlap, Panel.Canvas, xRightPanel, 0);8017 BitBltCanvas(Canvas, 0, TopBarHeight + MapHeight, Panel. width,8018 PanelHeight - overlap, Panel.Canvas, 0, overlap);8012 MapHeight - Overlap); 8013 BitBltCanvas(Canvas, 0, TopBarHeight + MapHeight - Overlap, xMidPanel, 8014 Overlap, Panel.Canvas, 0, 0); 8015 BitBltCanvas(Canvas, xRightPanel, TopBarHeight + MapHeight - Overlap, 8016 Panel.Width - xRightPanel, Overlap, Panel.Canvas, xRightPanel, 0); 8017 BitBltCanvas(Canvas, 0, TopBarHeight + MapHeight, Panel.Width, 8018 PanelHeight - Overlap, Panel.Canvas, 0, Overlap); 8019 8019 if (pLogo >= 0) and (G.RO[pLogo] = nil) and (AILogo[pLogo] <> nil) then 8020 8020 BitBltCanvas(Canvas, xRightPanel + 10 - (16 + 64),
Note:
See TracChangeset
for help on using the changeset viewer.