Changeset 179 for trunk/UCore.pas


Ignore:
Timestamp:
Feb 6, 2018, 3:47:23 PM (7 years ago)
Author:
chronos
Message:
  • Added: A preparation for gameplay over network.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/UCore.pas

    r178 r179  
    228228    if (DesignDPI.X <> DPI.X) or (DesignDPI.Y <> DPI.Y) then begin
    229229      //ApplyToAll(DesignDPI);
    230       FormNew.Show;
    231       FormNew.Hide;
    232230      for I := 0 to Screen.FormCount - 1 do
    233231      if (Screen.Forms[I].WindowState = wsNormal) or
     
    318316procedure TCore.AGameNewExecute(Sender: TObject);
    319317begin
    320   FormNew.Load(Game);
    321   if FormNew.ShowModal = mrOk then begin
    322     FormNew.Save(Game);
    323     StartNewGame;
     318  FormNew := TFormNew.Create(nil);
     319  try
     320    FormNew.Load(Server);
     321    if FormNew.ShowModal = mrOk then begin
     322      FormNew.Save(Server);
     323      StartNewGame;
     324    end;
     325  finally
     326    FormNew.Free;
    324327  end;
    325328end;
     
    361364      FormSettings.Save;
    362365      Game.SaveConfig(XMLConfig1, 'Game');
     366      Server.SaveConfig(XMLConfig1, 'Server');
    363367    end;
    364368  finally
     
    380384begin
    381385  UGame.InitStrings;
    382   FormNew.Translate;
    383386  FormPlayer.Translate;
    384387end;
     
    404407  FreeAndNil(StoredDimension);
    405408  Game.SaveConfig(XMLConfig1, 'Game');
     409  Server.SaveConfig(XMLConfig1, 'Server');
    406410  SaveConfig;
    407411  FreeAndNil(Server);
     
    478482    LoadConfig;
    479483    Game.LoadConfig(XMLConfig1, 'Game');
     484    Server.LoadConfig(XMLConfig1, 'Server');
    480485
    481486    CommandLineParams;
Note: See TracChangeset for help on using the changeset viewer.