Changeset 568 for trunk/Start.pas


Ignore:
Timestamp:
May 13, 2024, 6:00:06 PM (3 weeks ago)
Author:
chronos
Message:
  • Fixed: Custom draw ListBox items to keep consistent style on Linux.
  • Fixed: Last game name index error if no saved games.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Start.pas

    r566 r568  
    66uses
    77  GameServer, Messg, ButtonBase, ButtonA, ButtonC, ButtonB, Area, Types,
    8   LCLIntf, LCLType, SysUtils, Classes, BaseWin,
     8  LCLIntf, LCLType, SysUtils, Classes, BaseWin, ListBoxEx,
    99  Registry, DrawDlg, Generics.Collections, Protocol, MiniMap, Brain, Translator,
    1010  {$IFDEF DPI}System.UITypes, Dpi.Graphics, Dpi.Controls, Dpi.Forms, Dpi.StdCtrls,
     
    4747    Down1Btn: TButtonC;
    4848    Up1Btn: TButtonC;
    49     List: TListBox;
     49    List: TListBoxEx;
    5050    RenameBtn: TButtonB;
    5151    DeleteBtn: TButtonB;
     
    17991799  ShowTab := Tab;
    18001800  Background.Enabled := True;
    1801   LastGame := FormerGames[ListIndex[tbPrevious]];
     1801  if (ListIndex[tbPrevious] >= 0) and (ListIndex[tbPrevious] < FormerGames.Count) then
     1802    LastGame := FormerGames[ListIndex[tbPrevious]]
     1803    else LastGame := '';
    18021804end;
    18031805
Note: See TracChangeset for help on using the changeset viewer.