Changeset 144 for trunk/Components
- Timestamp:
- May 11, 2018, 11:57:25 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Components/ScreenTools.pas
r130 r144 51 51 function Play(Item: string; Index: integer = -1): boolean; 52 52 procedure PreparePlay(Item: string; Index: integer = -1); 53 procedure EmptyMenu(MenuItems: TMenuItem; Keep: integer = 0);53 procedure EmptyMenu(MenuItems: TMenuItem; Keep: Integer = 0); 54 54 function turntoyear(Turn: integer): integer; 55 55 function TurnToString(Turn: integer): string; … … 295 295 end; 296 296 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]; 297 procedure EmptyMenu(MenuItems: TMenuItem; Keep: Integer = 0); 298 var 299 MenuItem: TMenuItem; 300 begin 301 while MenuItems.Count > Keep do begin 302 MenuItem := MenuItems[MenuItems.Count - 1]; 304 303 MenuItems.Delete(MenuItems.Count - 1); 305 m.Free;304 MenuItem.Free; 306 305 end; 307 306 end;
Note:
See TracChangeset
for help on using the changeset viewer.