Changeset 89 for trunk/LocalPlayer/Term.pas
- Timestamp:
- Jan 19, 2017, 8:40:22 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LocalPlayer/Term.pas
r88 r89 1474 1474 StayOnTop_Ensured := false; 1475 1475 1476 sb .Setup(0, 0, 0,Self);1476 sb := TPVScrollbar.Create(Self); 1477 1477 sb.OnUpdate := ScrollBarUpdate; 1478 1478 end; { InitModule } … … 3435 3435 SoundMode := smOn; 3436 3436 3437 sb := TPVScrollbar.Create;3438 3437 {$IFDEF WINDOWS}{ TODO } 3439 3438 Screen.Cursors[crImpDrag] := LoadCursor(HInstance, 'DRAG'); … … 3576 3575 EOT.Top := ClientHeight - 64; 3577 3576 EOT.Left := ClientWidth - 62; 3578 sb.ScrollBar.BorderSpacing.Top := ClientHeight - yTroop - 24; 3579 sb.ScrollBar.BorderSpacing.Right := ClientWidth - xRightPanel + 8; 3580 sb.ScrollBar.BorderSpacing.Bottom := 8; 3577 sb.SetBorderSpacing(ClientHeight - yTroop - 24, ClientWidth - xRightPanel + 8, 8); 3578 {TODO: 3581 3579 SetWindowPos(sb.ScrollBar.Handle, 0, xRightPanel + 10 - 14 - GetSystemMetrics(SM_CXVSCROLL), 3582 3580 ClientHeight - MidPanelHeight + 8, 0, 0, SWP_NOSIZE or SWP_NOZORDER); 3581 } 3583 3582 MapBtn0.Left := xMini + G.lx - 44; 3584 3583 MapBtn0.Top := ClientHeight - 15; … … 4414 4413 for i := 0 to nBrushTypes - 1 do 4415 4414 begin // display terrain types 4416 if (Count >= TrRow * sb. si.npos) and (Count < TrRow * (sb.si.npos+ 1))4415 if (Count >= TrRow * sb.Position) and (Count < TrRow * (sb.Position + 1)) 4417 4416 then 4418 4417 begin 4419 trix[Count - TrRow * sb. si.npos] := BrushTypes[i];4420 x := (Count - TrRow * sb. si.npos) * TrPitch;4418 trix[Count - TrRow * sb.Position] := BrushTypes[i]; 4419 x := (Count - TrRow * sb.Position) * TrPitch; 4421 4420 xSrcBase := -1; 4422 4421 case BrushTypes[i] of … … 4646 4645 if unx.Loc = TroopLoc then 4647 4646 begin 4648 if (Count >= TrRow * sb. si.npos) and4649 (Count < TrRow * (sb. si.npos+ 1)) then4647 if (Count >= TrRow * sb.Position) and 4648 (Count < TrRow * (sb.Position + 1)) then 4650 4649 begin 4651 trix[Count - TrRow * sb. si.npos] := uix;4650 trix[Count - TrRow * sb.Position] := uix; 4652 4651 MakeUnitInfo(me, unx, UnitInfo); 4653 x := (Count - TrRow * sb. si.npos) * TrPitch;4652 x := (Count - TrRow * sb.Position) * TrPitch; 4654 4653 if uix = UnFocus then 4655 4654 begin … … 4700 4699 Server(sGetUnits, me, TroopLoc, Count); 4701 4700 for i := 0 to Count - 1 do 4702 if (i >= TrRow * sb. si.npos) and (i < TrRow * (sb.si.npos+ 1)) then4701 if (i >= TrRow * sb.Position) and (i < TrRow * (sb.Position + 1)) then 4703 4702 begin // display enemy units 4704 trix[i - TrRow * sb. si.npos] := i;4705 x := (i - TrRow * sb. si.npos) * TrPitch;4703 trix[i - TrRow * sb.Position] := i; 4704 x := (i - TrRow * sb.Position) * TrPitch; 4706 4705 NoMap.SetOutput(Panel); 4707 4706 NoMap.PaintUnit(xTroop + 2 + x, yTroop + 1, … … 6348 6347 begin 6349 6348 sb.Init((TrCnt + TrRow - 1) div TrRow - 1, 1); 6350 with sb.si do 6351 if (nMax >= integer(nPage)) and (trixFocus >= 0) then 6352 begin 6353 sb.si.npos := trixFocus div TrRow; 6354 sb.si.FMask := SIF_POS; 6355 SetScrollInfo(sb.ScrollBar.Handle, SB_CTL, sb.si, true); 6356 end 6357 end 6349 if (sb.Max >= sb.PageSize) and (trixFocus >= 0) then 6350 sb.Position := trixFocus div TrRow; 6351 end; 6358 6352 end; 6359 6353
Note:
See TracChangeset
for help on using the changeset viewer.