source: tags/1.3.6/LocalPlayer/LocalPlayer.pas

Last change on this file was 468, checked in by chronos, 12 months ago
  • Added: High DPI support integrated into trunk branch. It can be enabled by adding DPI define to compiler parameters for main project and packages.
File size: 848 bytes
Line 
1{$INCLUDE Switches.inc}
2unit LocalPlayer;
3
4interface
5
6procedure Client(Command, Player: Integer; var Data); stdcall;
7procedure SetAIName(P: Integer; Name: string);
8
9
10implementation
11
12uses
13 Term, CityScreen, Nego, BaseWin,
14 {$IFDEF DPI}Dpi.Forms{$ELSE}Forms{$ENDIF};
15
16var
17 FormsCreated: Boolean;
18
19procedure Client(Command, Player: Integer; var Data);
20begin
21 if not FormsCreated then
22 begin
23 FormsCreated := True;
24 // TODO: Changing application name in runtime will cause change of Linux XML registry file path
25// Application.MainForm := MainScreen;
26 Application.CreateForm(TMainScreen, MainScreen);
27 end;
28 MainScreen.Client(Command, Player, Data);
29end;
30
31procedure SetAIName(P: Integer; Name: string);
32begin
33 MainScreen.SetAIName(P, Name);
34end;
35
36initialization
37
38FormsCreated := False;
39
40end.
Note: See TracBrowser for help on using the repository browser.