From ec218f423abf60b6e776d7a5a9ebee408de45a60 Mon Sep 17 00:00:00 2001 From: oroborus Date: Sat, 9 Feb 2008 20:49:15 +0000 Subject: - 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 --- src/screen_gameType.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'src/screen_gameType.c') 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) ); -- cgit v1.2.3