Changeset 89 for trunk/LocalPlayer/Select.pas
- Timestamp:
- Jan 19, 2017, 8:40:22 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LocalPlayer/Select.pas
r71 r89 102 102 inherited; 103 103 Canvas.Font.Assign(UniFont[ftNormal]); 104 sb := TPVScrollbar.Create ;105 sb.Set up(36, 10, 36, Self);104 sb := TPVScrollbar.Create(Self); 105 sb.SetBorderSpacing(36, 10, 36); 106 106 sb.OnUpdate := ScrollBarUpdate; 107 107 InitButtons(); … … 135 135 procedure TListDlg.OnScroll(var m: TMessage); 136 136 begin 137 { TODO: Handled by MouseWheel event 137 138 if sb.Process(m) then begin 138 139 Sel := -2; 139 140 SmartUpdateContent(true); 140 141 end; 142 } 141 143 end; 142 144 … … 234 236 CanGrow: boolean; 235 237 begin 236 lix := code[Layer, sb. si.npos+ l];238 lix := code[Layer, sb.Position + l]; 237 239 y0 := 2 + (l + 1) * LineDistance; 238 if sb. si.npos+ l >= FirstShrinkedLine[Layer] then239 ofs := (sb. si.npos+ l - FirstShrinkedLine[Layer]) and 1 * 33240 if sb.Position + l >= FirstShrinkedLine[Layer] then 241 ofs := (sb.Position + l - FirstShrinkedLine[Layer]) and 1 * 33 240 242 else { if FirstShrinkedLine[Layer]<Lines[Layer] then } 241 243 ofs := 33; … … 468 470 begin 469 471 s := Tribe[mox.Owner].ModelName[mox.mix]; 470 if (Kind = kAllEModels) and (code[1, sb. si.npos+ l] = 0) then472 if (Kind = kAllEModels) and (code[1, sb.Position + l] = 0) then 471 473 s := Format(Tribe[mox.Owner].TPhrase('OWNED'), [s]); 472 474 end … … 753 755 end; 754 756 for i := -1 to DispLines do 755 if (i + sb. si.npos >= 0) and (i + sb.si.npos< Lines[Layer]) then757 if (i + sb.Position >= 0) and (i + sb.Position < Lines[Layer]) then 756 758 Self.line(offscreen.Canvas, i, true, false) 757 759 end; … … 766 768 begin 767 769 y := y - TitleHeight; 768 i0 := sb. si.npos;770 i0 := sb.Position; 769 771 Sel0 := Sel; 770 772 if (x >= SideFrame) and (x < SideFrame + InnerWidth) and (y >= 0) and … … 891 893 lix: integer; 892 894 begin 893 if sb. si.npos+ Sel >= 0 then894 lix := code[Layer, sb. si.npos+ Sel];895 if sb.Position + Sel >= 0 then 896 lix := code[Layer, sb.Position + Sel]; 895 897 if Kind in [kScience, kCities, kCityEvents, kModels, kEModels, kAllEModels] 896 898 then … … 920 922 kEModels: 921 923 UnitStatDlg.ShowNewContent_EnemyModel(FWindowMode or wmPersistent, 922 code[1, sb. si.npos+ Sel]);924 code[1, sb.Position + Sel]); 923 925 kAllEModels, kChooseEModel: 924 926 if lix <> mixAll then … … 1599 1601 CaptionLeft := ToggleBtn.Left + ToggleBtn.Width; 1600 1602 CaptionRight := CloseBtn.Left; 1603 { TODO: 1601 1604 SetWindowPos(sb.ScrollBar.Handle, 0, SideFrame + InnerWidth - GetSystemMetrics(SM_CXVSCROLL), 1602 1605 TitleHeight, GetSystemMetrics(SM_CXVSCROLL), LineDistance * DispLines + 48, 1603 1606 SWP_NOZORDER or SWP_NOREDRAW); 1607 } 1604 1608 1605 1609 if WindowMode = wmModal then
Note:
See TracChangeset
for help on using the changeset viewer.