Changeset 732


Ignore:
Timestamp:
Jan 17, 2026, 9:21:53 AM (4 hours ago)
Author:
chronos
Message:
  • Modified: Background form belongs to Start screen. Changed from global variable to local variable of StartDlg.
Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Back.pas

    r722 r732  
    2323    procedure UpdateInterface;
    2424  end;
    25 
    26 var
    27   Background: TBackground;
    2825
    2926
  • trunk/Direct.pas

    r666 r732  
    105105    ntEndInfo: begin
    106106      Hide;
    107       Background.Update;
     107      StartDlg.Background.Update;
    108108    end;
    109109    ntLoadError: begin
     
    133133      if not Quick then begin
    134134        StartDlg.Hide;
    135         Background.Update;
     135        StartDlg.Background.Update;
    136136      end;
    137137      if MusicEnabled then begin
     
    166166      end;
    167167    ntBackOn: begin
    168       Background.Show;
    169       Background.Update;
     168      StartDlg.Background.Show;
     169      StartDlg.Background.Update;
    170170      Sleep(50); // prevent flickering
    171171    end;
    172     ntBackOff: Background.Close;
     172    ntBackOff: StartDlg.Background.Close;
    173173  end;
    174174end;
     
    260260  end;
    261261  if not Quick then begin
    262     Background.Show;
     262    StartDlg.Background.Show;
    263263    StartDlg.Show;
    264264  end;
  • trunk/Integrated.lpr

    r731 r732  
    3737  Application.CreateForm(TDirectDlg, DirectDlg);
    3838  Application.CreateForm(TStartDlg, StartDlg);
    39   Application.CreateForm(TBackground, Background);
    4039  Application.Run;
    4140  ScreenTools.UnitDone;
  • trunk/Start.pas

    r725 r732  
    55
    66uses
    7   GameServer, Messg, ButtonBase, ButtonA, ButtonC, ButtonB, Area,
     7  GameServer, Messg, ButtonBase, ButtonA, ButtonC, ButtonB, Area, Back,
    88  LCLIntf, LCLType, SysUtils, Classes, BaseWin, ListBoxEx, LazFileUtils, Math,
    99  Registry, DrawDlg, Generics.Collections, Protocol, MiniMap, Brain, Translator,
     
    143143    procedure OffscreenPaint; override;
    144144  public
     145    Background: TBackground;
    145146    EmptyPicture: TBitmap;
    146147    Translator: TTranslator;
     
    156157
    157158uses
    158   Global, Directories, Direct, ScreenTools, Inp, Back, Settings, KeyBindings,
     159  Global, Directories, Direct, ScreenTools, Inp, Settings, KeyBindings,
    159160  Languages, Music;
    160161
     
    224225  AIBrains: TBrains;
    225226begin
     227  Background := TBackground.Create(nil);
     228
    226229  TitleHeight := 0;
    227230  PlayerSlots := TPlayerSlots.Create;
     
    340343  FreeAndNil(PlayerSlots);
    341344  FreeAndNil(MiniMap);
     345  FreeAndNil(Background);
    342346end;
    343347
Note: See TracChangeset for help on using the changeset viewer.