/[hegemonie]/hegemonie/Source/JoinFrame.m
ViewVC logotype

Diff of /hegemonie/Source/JoinFrame.m

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by dam, Tue Jul 29 12:46:16 2003 UTC revision 1.4 by zaral, Tue Aug 5 12:11:48 2003 UTC
# Line 22  Line 22 
22   */   */
23    
24  #include <Foundation/NSObject.h>  #include <Foundation/NSObject.h>
25    #include <Foundation/NSException.h>
26    
27  #include "Interface/UiImage.h"  #include "Interface/UiImage.h"
28  #include "Interface/UiButton.h"  #include "Interface/UiButton.h"
# Line 31  Line 32 
32  #include "GameWidget.h"  #include "GameWidget.h"
33  #include "JoinFrame.h"  #include "JoinFrame.h"
34    
35    #include "PlayerNameController.h"
36    
37  @interface JoinController : NSObject  @interface JoinController : NSObject
38  {  {
39  @private  @private
# Line 45  Line 48 
48    
49  - (id) initWithView: (JoinFrame *)view  - (id) initWithView: (JoinFrame *)view
50  {  {
51      NSParameterAssert (view);
52    
53    self = [super init];    self = [super init];
54    if (self != nil)    if (self != nil)
55      {      {
# Line 76  Line 81 
81    
82  - (id) initWithInterface: (Interface *)interface  - (id) initWithInterface: (Interface *)interface
83  {  {
84      NSParameterAssert (interface);
85    
86    self = [super initWithInterface: interface];    self = [super initWithInterface: interface];
87    if (self != nil)    if (self != nil)
88      {      {
# Line 89  Line 96 
96        UiButton *joinButton        UiButton *joinButton
97          = [[UiButton alloc] initWithText: @"join game"          = [[UiButton alloc] initWithText: @"join game"
98                                  position: NSMakePoint (200.0f, 200.0f)];                                  position: NSMakePoint (200.0f, 200.0f)];
99    
100          UiTextField *playerName
101            = [[UiTextField alloc]
102                initWithText: [NSString stringWithCString: "nom joueur"]
103                position: NSMakePoint (600.0f, 200.0f)
104                height: 18];
105    
106          PlayerNameController *playerNameController
107            = [[PlayerNameController alloc] initWithPlayerName: playerName];
108    
109        [joinButton setDelegate: controller];        [joinButton setDelegate: controller];
110          [playerName setDelegate: playerNameController];
111                
112        [self addWidget: logo];        [self addWidget: logo];
113        [self addWidget: joinButton];        [self addWidget: joinButton];
114          [self addWidget: playerName];
115    
116        RELEASE(logo);        RELEASE(logo);
117        RELEASE(joinButton);        RELEASE(joinButton);
118        RELEASE(controller);        RELEASE(controller);
119          RELEASE(playerName);
120      }      }
121    
122    return self;    return self;

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26