diff options
| author | oroborus <oroborus@0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e> | 2008-02-09 20:49:15 +0000 |
|---|---|---|
| committer | oroborus <oroborus@0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e> | 2008-02-09 20:49:15 +0000 |
| commit | ec218f423abf60b6e776d7a5a9ebee408de45a60 (patch) | |
| tree | 47304e931ff78ad6dc62226d845ec6faa7b0af2e /src/screen_gameType.c | |
| parent | 601a366b8c665f760463259552fedd7be43e5754 (diff) | |
- oprava chyby, pri zmeneni zbrane zo samopala, alebo lassera ( informoval xHire )
- prepis sietoveho protokolu, teraz je bezpecnejsi
git-svn-id: http://opensvn.csie.org/tuxanci_ng@3 0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e
Diffstat (limited to 'src/screen_gameType.c')
| -rw-r--r-- | src/screen_gameType.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/src/screen_gameType.c b/src/screen_gameType.c index 3211d62..6a04da6 100644 --- a/src/screen_gameType.c +++ b/src/screen_gameType.c @@ -143,10 +143,23 @@ void initScreenGameType() button_back = newWidgetButton("Back", 100, WINDOW_SIZE_Y-100, eventWidget); button_play = newWidgetButton("Play", WINDOW_SIZE_X-200, WINDOW_SIZE_Y-100, eventWidget); - check_none = newWidgetCheck(100, 150, TRUE, eventWidget); + check_none = newWidgetCheck(100, 150, FALSE, eventWidget); check_server = newWidgetCheck(100, 200, FALSE, eventWidget); check_client = newWidgetCheck(100, 250, FALSE, eventWidget); + if( isParamFlag("--server") ) + { + check_server->status = TRUE; + } + else if( isParamFlag("--client") ) + { + check_client->status = TRUE; + } + else + { + check_none->status = TRUE; + } + label_none = newWidgetLabel("none", 130, 145, WIDGET_LABEL_LEFT); label_server = newWidgetLabel("server", 130, 195, WIDGET_LABEL_LEFT); label_client = newWidgetLabel("client", 130, 245, WIDGET_LABEL_LEFT); @@ -154,8 +167,8 @@ void initScreenGameType() label_ip = newWidgetLabel("IP address :", 300, 145, WIDGET_LABEL_LEFT); label_port = newWidgetLabel("net port :", 300, 245, WIDGET_LABEL_LEFT); - textfield_ip = newWidgetTextfield("127.0.0.1", 300, 180); - textfield_port = newWidgetTextfield("2200", 300, 280); + textfield_ip = newWidgetTextfield(getParamElse("--ip", "127.0.0.1"), 300, 180); + textfield_port = newWidgetTextfield(getParamElse("--port", "2200"), 300, 280); registerScreen( newScreen("gameType", startScreenGameType, eventScreenGameType, drawScreenGameType, stopScreenGameType) ); |