Changeset 502


Ignore:
Timestamp:
Dec 23, 2023, 1:50:31 PM (11 months ago)
Author:
chronos
Message:
  • Fixed: Non-DPI build.
  • Modified: Code cleanup.
Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LocalPlayer/Help.pas

    r496 r502  
    19181918      LineFeed;
    19191919
    1920     //Self.Show;
    19211920    ScrollBar.Init(Count - 1, InnerHeight div 24);
    19221921    ScrollBar.SetPos(sbPos);
  • trunk/LocalPlayer/Term.pas

    r498 r502  
    15751575        TestColorDistance := abs(Integer(UnusedTribeFiles.Objects[J])
    15761576          shr 16 and $FF - Tribe[I].Color shr 16 and $FF) +
    1577           abs(Integer(UnusedTribeFiles.Objects[J]) shr 8 and
     1577          Abs(Integer(UnusedTribeFiles.Objects[J]) shr 8 and
    15781578          $FF - Tribe[I].Color shr 8 and $FF) * 3 +
    1579           abs(Integer(UnusedTribeFiles.Objects[J]) and
     1579          Abs(Integer(UnusedTribeFiles.Objects[J]) and
    15801580          $FF - Tribe[I].Color and $FF) * 2;
    15811581        if TestColorDistance < ColorDistance then
     
    17211721  AdvIcon[adConscription] := 86 + dGround;
    17221722
    1723   UnusedTribeFiles := tstringlist.Create;
     1723  UnusedTribeFiles := TStringList.Create;
    17241724  UnusedTribeFiles.Sorted := True;
    17251725  TribeNames := tstringlist.Create;
  • trunk/Packages/CevoComponents/ScreenTools.pas

    r501 r502  
    100100{$IFNDEF DPI}
    101101function ScaleToNative(Value: Integer): Integer;
     102function ScaleToNativeDist(Base, Value: Integer): Integer;
    102103function ScaleFromNative(Value: Integer): Integer;
    103104{$ENDIF}
     
    16521653end;
    16531654
     1655function ScaleToNativeDist(Base, Value: Integer): Integer;
     1656begin
     1657  Result := Value;
     1658end;
     1659
    16541660function ScaleFromNative(Value: Integer): Integer;
    16551661begin
  • trunk/Packages/DpiControls/Dpi.StdCtrls.pas

    r476 r502  
    171171  protected
    172172    function GetNativeControl: Controls.TControl; override;
     173    function GetNativeScrollBar: StdCtrls.TScrollBar; virtual;
    173174  public
    174175    NativeScrollBar: StdCtrls.TScrollBar;
     
    392393function TScrollBar.GetKind: TScrollBarKind;
    393394begin
    394   Result := NativeScrollBar.Kind;
     395  Result := GetNativeScrollBar.Kind;
    395396end;
    396397
    397398function TScrollBar.GetMax: Integer;
    398399begin
    399   Result := NativeScrollBar.Max;
     400  Result := GetNativeScrollBar.Max;
    400401end;
    401402
    402403function TScrollBar.GetMin: Integer;
    403404begin
    404   Result := NativeScrollBar.Min;
     405  Result := GetNativeScrollBar.Min;
    405406end;
    406407
    407408function TScrollBar.GetOnChange: TNotifyEvent;
    408409begin
    409   Result := NativeScrollBar.OnChange;
     410  Result := GetNativeScrollBar.OnChange;
    410411end;
    411412
    412413function TScrollBar.GetPageSize: Integer;
    413414begin
    414   Result := NativeScrollBar.PageSize;
     415  Result := GetNativeScrollBar.PageSize;
    415416end;
    416417
    417418function TScrollBar.GetPosition: Integer;
    418419begin
    419   Result := NativeScrollBar.Position;
     420  Result := GetNativeScrollBar.Position;
    420421end;
    421422
    422423procedure TScrollBar.SetKind(AValue: TScrollBarKind);
    423424begin
    424   NativeScrollBar.Kind := AValue;
     425  GetNativeScrollBar.Kind := AValue;
    425426end;
    426427
    427428procedure TScrollBar.SetMax(AValue: Integer);
    428429begin
    429   NativeScrollBar.Max := AValue;
     430  GetNativeScrollBar.Max := AValue;
    430431end;
    431432
    432433procedure TScrollBar.SetMin(AValue: Integer);
    433434begin
    434   NativeScrollBar.Min := Avalue;
     435  GetNativeScrollBar.Min := Avalue;
    435436end;
    436437
    437438procedure TScrollBar.SetOnChange(AValue: TNotifyEvent);
    438439begin
    439   NativeScrollBar.OnChange := AValue;
     440  GetNativeScrollBar.OnChange := AValue;
    440441end;
    441442
    442443procedure TScrollBar.SetPageSize(AValue: Integer);
    443444begin
    444   NativeScrollBar.PageSize := AValue;
     445  GetNativeScrollBar.PageSize := AValue;
    445446end;
    446447
    447448procedure TScrollBar.SetPosition(AValue: Integer);
    448449begin
    449   NativeScrollBar.Position := AValue;
     450  GetNativeScrollBar.Position := AValue;
    450451end;
    451452
    452453function TScrollBar.GetNativeControl: Controls.TControl;
     454begin
     455  Result := GetNativeScrollBar;
     456end;
     457
     458function TScrollBar.GetNativeScrollBar: StdCtrls.TScrollBar;
    453459begin
    454460  if not Assigned(NativeScrollBar) then NativeScrollBar := StdCtrls.TScrollBar.Create(nil);
Note: See TracChangeset for help on using the changeset viewer.