Changeset 673


Ignore:
Timestamp:
Jul 25, 2025, 5:55:22 PM (18 hours ago)
Author:
chronos
Message:
  • Fixed: Black strip on the bottom of Draft dialog.
  • Fixed: Make selected book or map visible in the list on application start.
Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LocalPlayer/Draft.pas

    r622 r673  
    234234  UnshareBitmap(Back);
    235235
    236   ClientHeight := Template.Height - Cut;
    237   if ClientHeight > MainTexture.Height then
     236  Height := Template.Height - Cut;
     237  if Height > MainTexture.Height then
    238238  // assemble background from 2 texture tiles
    239239  begin
    240     BitBltBitmap(Back, 0, 0, ClientWidth, 64,
    241       MainTexture.Image, (MainTexture.Width - ClientWidth) div 2,
     240    BitBltBitmap(Back, 0, 0, Width, 64,
     241      MainTexture.Image, (MainTexture.Width - Width) div 2,
    242242      MainTexture.Height - 64);
    243     BitBltBitmap(Back, 0, 64, ClientWidth, ClientHeight - 64,
    244       MainTexture.Image, (MainTexture.Width - ClientWidth) div 2,
     243    BitBltBitmap(Back, 0, 64, Width, Height - 64,
     244      MainTexture.Image, (MainTexture.Width - Width) div 2,
    245245      0);
    246246  end
    247247  else
    248     BitBltBitmap(Back, 0, 0, ClientWidth, ClientHeight,
    249       MainTexture.Image, (MainTexture.Width - ClientWidth) div 2,
    250       (MainTexture.Height - ClientHeight) div 2);
     248    BitBltBitmap(Back, 0, 0, Width, Height,
     249      MainTexture.Image, (MainTexture.Width - Width) div 2,
     250      (MainTexture.Height - Height) div 2);
    251251  ImageOp_B(Back, Template, 0, 0, 0, 0, Template.Width, 64);
    252252  ImageOp_B(Back, Template, 0, 64, 0, 64 + Cut, Template.Width,
    253253    Template.Height - 64 - Cut);
    254254
    255   BitBltBitmap(Offscreen, 0, 0, ClientWidth, ClientHeight, Back, 0, 0);
     255  BitBltBitmap(Offscreen, 0, 0, Width, Height, Back, 0, 0);
    256256
    257257  Offscreen.Canvas.Font.Assign(UniFont[ftCaption]);
     
    400400      pix div 10 * 49 + 1);
    401401  end;
    402   MarkUsedOffscreen(ClientWidth, ClientHeight);
     402  MarkUsedOffscreen(Width, Height);
    403403end;
    404404
     
    525525    begin
    526526      I := (Y - yFeature) div LinePitch;
    527       if (X >= xFeature - 21) and (X < ClientWidth) and (ssShift in Shift) then
     527      if (X >= xFeature - 21) and (X < Width) and (ssShift in Shift) then
    528528        MainScreen.HelpDlg.ShowNewContent(WindowModeMakePersistent(FWindowMode), hkFeature, Code[I])
    529529      else if not (Code[I] in AutoFeature) then
  • trunk/Packages/DpiControls/Dpi.StdCtrls.pas

    r592 r673  
    147147    constructor Create(AOwner: TComponent); override;
    148148    destructor Destroy; override;
     149    procedure MakeCurrentVisible;
    149150    property ItemIndex: Integer read GetItemIndex write SetItemIndex;
    150151    property Items: TStrings read GetItems write SetItems;
     
    645646end;
    646647
     648procedure TListBox.MakeCurrentVisible;
     649begin
     650  GetNativeListBox.MakeCurrentVisible;
     651end;
     652
    647653
    648654initialization
  • trunk/Start.lfm

    r568 r673  
    1515  Font.Name = 'MS Sans Serif'
    1616  FormStyle = fsStayOnTop
     17  OnActivate = FormActivate
    1718  OnClose = FormClose
    1819  OnCreate = FormCreate
  • trunk/Start.pas

    r667 r673  
    5959    AutoEnemyDownBtn: TButtonC;
    6060    ReplayBtn: TButtonB;
     61    procedure FormActivate(Sender: TObject);
    6162    procedure ListKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
    6263    procedure ListKeyPress(Sender: TObject; var Key: Char);
     
    11011102  if Key = DelKey then DeleteBtnClick(Sender)
    11021103    else FormKeyDown(Sender, Key, Shift);
     1104end;
     1105
     1106procedure TStartDlg.FormActivate(Sender: TObject);
     1107begin
     1108  if List.Count > 0 then begin
     1109    List.MakeCurrentVisible;
     1110  end;
    11031111end;
    11041112
Note: See TracChangeset for help on using the changeset viewer.