Changeset 144 for trunk/Components


Ignore:
Timestamp:
May 11, 2018, 11:57:25 PM (6 years ago)
Author:
chronos
Message:
  • Modified: More code refactoring related to players brain selection.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Components/ScreenTools.pas

    r130 r144  
    5151function Play(Item: string; Index: integer = -1): boolean;
    5252procedure PreparePlay(Item: string; Index: integer = -1);
    53 procedure EmptyMenu(MenuItems: TMenuItem; Keep: integer = 0);
     53procedure EmptyMenu(MenuItems: TMenuItem; Keep: Integer = 0);
    5454function turntoyear(Turn: integer): integer;
    5555function TurnToString(Turn: integer): string;
     
    295295end;
    296296
    297 procedure EmptyMenu(MenuItems: TMenuItem; Keep: integer = 0);
    298 var
    299   m: TMenuItem;
    300 begin
    301   while MenuItems.Count > Keep do
    302   begin
    303     m := MenuItems[MenuItems.Count - 1];
     297procedure EmptyMenu(MenuItems: TMenuItem; Keep: Integer = 0);
     298var
     299  MenuItem: TMenuItem;
     300begin
     301  while MenuItems.Count > Keep do begin
     302    MenuItem := MenuItems[MenuItems.Count - 1];
    304303    MenuItems.Delete(MenuItems.Count - 1);
    305     m.Free;
     304    MenuItem.Free;
    306305  end;
    307306end;
Note: See TracChangeset for help on using the changeset viewer.