home *** CD-ROM | disk | FTP | other *** search
/ Big Green CD 8 / BGCD_8_Dev.iso / OPENSTEP / Games / Empire-0.6-MIS / NewGameController.h < prev    next >
Encoding:
Text File  |  1997-10-27  |  4.2 KB  |  134 lines

  1. //
  2. // $Id: NewGameController.h,v 1.6 1997/10/28 02:58:10 nygard Exp $
  3. //
  4.  
  5. //
  6. //  This file is a part of Empire, a game of exploration and conquest.
  7. //  Copyright (C) 1996  Steve Nygard
  8. //
  9. //  This program is free software; you can redistribute it and/or modify
  10. //  it under the terms of the GNU General Public License as published by
  11. //  the Free Software Foundation; either version 2 of the License, or
  12. //  (at your option) any later version.
  13. //
  14. //  This program is distributed in the hope that it will be useful,
  15. //  but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  17. //  GNU General Public License for more details.
  18. //
  19. //  You should have received a copy of the GNU General Public License
  20. //  along with this program; if not, write to the Free Software
  21. //  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  22. //
  23. //  You may contact the author by:
  24. //     e-mail:  nygard@telusplanet.net
  25. //
  26.  
  27. #import <AppKit/AppKit.h>
  28. #import "Empire.h"
  29. #import "EmpireProtocols.h" // For EmpireClientHostNotification -- should replace with NSNotificationCenter stuff.
  30.  
  31. @class Brain;
  32. @class DistributedGameManager;
  33. @class ServerController;
  34.  
  35. @interface NewGameController : NSObject <EmpireClientHostNotification>
  36. {
  37.     ServerController *serverController;
  38.  
  39.     IBOutlet NSWindow *newGamePanel;
  40.     IBOutlet NSButton *okayButton;
  41.  
  42.     IBOutlet NSWindow *aboutPanel;
  43.     IBOutlet NSButton *aboutPanelOkayButton;
  44.  
  45.     IBOutlet NSTextField *mapTextfield;
  46.  
  47.     IBOutlet NSTextField *player1NameTextfield;
  48.     IBOutlet NSTextField *player2NameTextfield;
  49.     IBOutlet NSTextField *player3NameTextfield;
  50.  
  51.     IBOutlet NSPopUpButton *player1TypePopup;
  52.     IBOutlet NSPopUpButton *player2TypePopup;
  53.     IBOutlet NSPopUpButton *player3TypePopup;
  54.  
  55.     IBOutlet NSMatrix *player1UnitImageMatrix;
  56.     IBOutlet NSMatrix *player2UnitImageMatrix;
  57.     IBOutlet NSMatrix *player3UnitImageMatrix;
  58.  
  59.     IBOutlet NSColorWell *player1ColorWell;
  60.     IBOutlet NSColorWell *player2ColorWell;
  61.     IBOutlet NSColorWell *player3ColorWell;
  62.  
  63.     IBOutlet NSSlider *player1ProductionEffSlider;
  64.     IBOutlet NSSlider *player2ProductionEffSlider;
  65.     IBOutlet NSSlider *player3ProductionEffSlider;
  66.  
  67.     IBOutlet NSSlider *player1CombatEffSlider;
  68.     IBOutlet NSSlider *player2CombatEffSlider;
  69.     IBOutlet NSSlider *player3CombatEffSlider;
  70.  
  71.     IBOutlet NSPopUpButton *player1RemoteClientPopup;
  72.     IBOutlet NSPopUpButton *player2RemoteClientPopup;
  73.     IBOutlet NSPopUpButton *player3RemoteClientPopup;
  74.  
  75.     //----------------------------------------
  76.  
  77.     IBOutlet NSWindow *newClientPanel;
  78.     IBOutlet NSWindow *ncOkayButton;
  79.  
  80.     int ncPlayerNumber;
  81.     IBOutlet NSBox *ncPlayerBox;
  82.     IBOutlet NSTextField *ncNameTextfield;
  83.     IBOutlet NSPopUpButton *ncTypePopup;
  84.     IBOutlet NSMatrix *ncUnitImageMatrix;
  85.     IBOutlet NSColorWell *ncColorWell;
  86.     IBOutlet NSSlider *ncProductionEffSlider;
  87.     IBOutlet NSSlider *ncCombatEffSlider;
  88.  
  89.     DistributedGameManager *clientGameManager;
  90. }
  91.  
  92. - (void) awakeFromNib;
  93.  
  94. - initWithBrain:(Brain *)theBrain;
  95. - (void) dealloc;
  96.  
  97. - (void) updatePlayer1Color:sender;
  98. - (void) updatePlayer2Color:sender;
  99. - (void) updatePlayer3Color:sender;
  100.  
  101. - (void) createNewGame:sender;
  102.  
  103. - (void) aboutPlayer1:sender;
  104. - (void) aboutPlayer2:sender;
  105. - (void) aboutPlayer3:sender;
  106. - (void) aboutStopAction:sender;
  107.  
  108. - (void) setMapPanel:sender;
  109.  
  110. - (void) showPanel;
  111. - (void) choosePlayer:(Player)number forGameManager:(DistributedGameManager *)gameManager;
  112. - (void) createNewClient:sender;
  113.  
  114. //======================================================================
  115. // Empire Image Vendor Notification
  116. //======================================================================
  117.  
  118. - (void) vendorImagesUpdated:(BOOL)player1:(BOOL)player2:(BOOL)player3:(BOOL)other;
  119.  
  120. //======================================================================
  121. // Window Delegate
  122. //======================================================================
  123.  
  124. - (void) windowDidBecomeKey:(NSNotification *)notification;
  125.   
  126. //======================================================================
  127. // Client Host Notification
  128. //======================================================================
  129.  
  130. - (void) newClientHost:(NSString *)hostname;
  131. - (void) removedClientHostNumber:(int)index;
  132.  
  133. @end
  134.