Changeset 69 for trunk/LocalPlayer/Term.pas
- Timestamp:
- Jan 14, 2017, 10:33:42 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LocalPlayer/Term.pas
r67 r69 22 22 23 23 type 24 25 { TMainScreen } 26 24 27 TMainScreen = class(TDrawDlg) 25 28 Timer1: TTimer; … … 216 219 procedure BareBtnDownChanged(Sender: TObject); 217 220 procedure MovieSpeedBtnClick(Sender: TObject); 218 219 public220 procedure CreateParams(var p: TCreateParams); override;221 procedure Client(Command, NewPlayer: integer; var Data);222 procedure SetAIName(p: integer; Name: string);223 function ZoomToCity(Loc: integer; NextUnitOnClose: boolean = false;224 ShowEvent: integer = 0): boolean;225 procedure CityClosed(Activateuix: integer; StepFocus: boolean = false;226 SelectFocus: boolean = false);227 function DipCall(Command: integer): integer;228 function OfferCall(var Offer: TOffer): integer;229 procedure UpdateViews(UpdateCityScreen: boolean = false);230 function ContactRefused(p: integer; Item: String): boolean;231 232 221 private 233 222 xw, yw, xwd, ywd, xwMini, ywMini, xMidPanel, xRightPanel, xTroop, xTerrain, … … 242 231 Closable, RepaintOnResize, Tracking, TurnComplete, Edited, GoOnPhase, 243 232 HaveStrategyAdvice, FirstMovieTurn: boolean; 233 procedure ScrollBarUpdate(Sender: TObject); 244 234 procedure ArrangeMidPanel; 245 235 procedure MainOffscreenPaint; … … 282 272 procedure OnScroll(var m: TMessage); message WM_VSCROLL; 283 273 procedure OnEOT(var Msg: TMessage); message WM_EOT; 274 public 275 procedure CreateParams(var p: TCreateParams); override; 276 procedure Client(Command, NewPlayer: integer; var Data); 277 procedure SetAIName(p: integer; Name: string); 278 function ZoomToCity(Loc: integer; NextUnitOnClose: boolean = false; 279 ShowEvent: integer = 0): boolean; 280 procedure CityClosed(Activateuix: integer; StepFocus: boolean = false; 281 SelectFocus: boolean = false); 282 function DipCall(Command: integer): integer; 283 function OfferCall(var Offer: TOffer): integer; 284 procedure UpdateViews(UpdateCityScreen: boolean = false); 285 function ContactRefused(p: integer; Item: String): boolean; 284 286 end; 285 287 … … 1473 1475 StayOnTop_Ensured := false; 1474 1476 1475 CreatePVSB(sb, Handle, 100 - 200, 122, 100 + MidPanelHeight - 16 - 200); 1477 sb.Setup(0, 0, 0, Self); 1478 sb.OnUpdate := ScrollBarUpdate; 1476 1479 end; { InitModule } 1477 1480 … … 2656 2659 if Controls[i] is TButtonC then 2657 2660 Controls[i].Visible := false; 2658 InitPVSB(sb,0, 1);2661 sb.Init(0, 1); 2659 2662 for p1 := 0 to nPl - 1 do 2660 2663 if Tribe[p1] <> nil then … … 3577 3580 EOT.Top := ClientHeight - 64; 3578 3581 EOT.Left := ClientWidth - 62; 3579 SetWindowPos(sb.h, 0, xRightPanel + 10 - 14 - GetSystemMetrics(SM_CXVSCROLL), 3582 sb.ScrollBar.BorderSpacing.Top := ClientHeight - yTroop - 24; 3583 sb.ScrollBar.BorderSpacing.Right := ClientWidth - xRightPanel + 8; 3584 sb.ScrollBar.BorderSpacing.Bottom := 8; 3585 SetWindowPos(sb.ScrollBar.Handle, 0, xRightPanel + 10 - 14 - GetSystemMetrics(SM_CXVSCROLL), 3580 3586 ClientHeight - MidPanelHeight + 8, 0, 0, SWP_NOSIZE or SWP_NOZORDER); 3581 3587 MapBtn0.Left := xMini + G.lx - 44; … … 3615 3621 procedure TMainScreen.OnScroll(var m: TMessage); 3616 3622 begin 3617 if ProcessPVSB(sb, m) then 3618 begin 3623 if sb.Process(m) then begin 3619 3624 PanelPaint; 3620 Update 3621 end 3625 Update; 3626 end; 3622 3627 end; 3623 3628 … … 3962 3967 end; 3963 3968 3964 procedure TMainScreen.PaintLocTemp(Loc ,Style: integer);3969 procedure TMainScreen.PaintLocTemp(Loc: integer; Style: integer); 3965 3970 var 3966 3971 y0, x0, xMap, yMap: integer; … … 6341 6346 Server(sGetUnits, me, Loc, TrCnt); 6342 6347 if TrCnt = 0 then 6343 InitPVSB(sb,0, 1)6348 sb.Init(0, 1) 6344 6349 else 6345 6350 begin 6346 InitPVSB(sb,(TrCnt + TrRow - 1) div TrRow - 1, 1);6351 sb.Init((TrCnt + TrRow - 1) div TrRow - 1, 1); 6347 6352 with sb.si do 6348 6353 if (nMax >= integer(nPage)) and (trixFocus >= 0) then … … 6350 6355 sb.si.npos := trixFocus div TrRow; 6351 6356 sb.si.FMask := SIF_POS; 6352 SetScrollInfo(sb. h, SB_CTL, sb.si, true);6357 SetScrollInfo(sb.ScrollBar.Handle, SB_CTL, sb.si, true); 6353 6358 end 6354 6359 end … … 8005 8010 end; 8006 8011 8012 procedure TMainScreen.ScrollBarUpdate(Sender: TObject); 8013 begin 8014 PanelPaint; 8015 Update; 8016 end; 8017 8007 8018 initialization 8008 8019
Note:
See TracChangeset
for help on using the changeset viewer.