summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Howard2006-09-24 13:27:55 +0000
committerSimon Howard2006-09-24 13:27:55 +0000
commit9a5c207939ed554e8ac00587cce3ec83798cfbc1 (patch)
tree5602cf157183a9c37b4e2970b448a2854ed9b89c
parentcacf93ccb478f52f097a16d545a2aeb515338c78 (diff)
downloadchocolate-doom-9a5c207939ed554e8ac00587cce3ec83798cfbc1.tar.gz
chocolate-doom-9a5c207939ed554e8ac00587cce3ec83798cfbc1.tar.bz2
chocolate-doom-9a5c207939ed554e8ac00587cce3ec83798cfbc1.zip
Add "extra parameters" dialog for specifying exra command-line parameters.
Move this and "UDP port" setting to a separate "Advanced" section. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 661
-rw-r--r--setup/multiplayer.c35
1 files changed, 31 insertions, 4 deletions
diff --git a/setup/multiplayer.c b/setup/multiplayer.c
index 1b11772c..08098125 100644
--- a/setup/multiplayer.c
+++ b/setup/multiplayer.c
@@ -26,6 +26,7 @@
#include "textscreen.h"
#define NUM_WADS 10
+#define NUM_EXTRA_PARAMS 10
typedef enum
{
@@ -53,6 +54,7 @@ char *player_name;
char *chatmacros[10];
char *wads[NUM_WADS] = {};
+char *extra_params[NUM_EXTRA_PARAMS] = {};
int skill = 0;
int nomonsters = 0;
int deathmatch = 0;
@@ -216,6 +218,20 @@ static void OpenWadsWindow(TXT_UNCAST_ARG(widget), TXT_UNCAST_ARG(user_data))
}
}
+static void OpenExtraParamsWindow(TXT_UNCAST_ARG(widget),
+ TXT_UNCAST_ARG(user_data))
+{
+ txt_window_t *window;
+ int i;
+
+ window = TXT_NewWindow("Extra command line parameters");
+
+ for (i=0; i<NUM_EXTRA_PARAMS; ++i)
+ {
+ TXT_AddWidget(window, TXT_NewInputBox(&extra_params[i], 70));
+ }
+}
+
static txt_window_action_t *WadWindowAction(void)
{
txt_window_action_t *action;
@@ -230,6 +246,7 @@ void StartMultiGame(void)
{
txt_window_t *window;
txt_table_t *table;
+ txt_button_t *button;
window = TXT_NewWindow("Start multiplayer game");
@@ -237,14 +254,11 @@ void StartMultiGame(void)
TXT_SetWindowAction(window, TXT_HORIZ_RIGHT, StartGameAction());
table = TXT_NewTable(2);
- TXT_AddWidget(table, TXT_NewStrut(12, 0));
- TXT_AddWidget(table, TXT_NewStrut(12, 0));
+ TXT_SetColumnWidths(table, 12, 12);
TXT_AddWidget(table, TXT_NewLabel("Skill"));
TXT_AddWidget(table, TXT_NewDropdownList(&skill, skills, 5));
TXT_AddWidget(table, TXT_NewLabel("Game type"));
TXT_AddWidget(table, TXT_NewDropdownList(&deathmatch, gamemodes, 3));
- TXT_AddWidget(table, TXT_NewLabel("UDP port"));
- TXT_AddWidget(table, TXT_NewIntInputBox(&udpport, 5));
TXT_AddWidget(table, TXT_NewLabel("Level warp"));
@@ -264,6 +278,19 @@ void StartMultiGame(void)
TXT_AddWidget(window, TXT_NewInvertedCheckBox("Monsters", &nomonsters));
TXT_AddWidget(window, TXT_NewCheckBox("Fast monsters", &fast));
TXT_AddWidget(window, TXT_NewCheckBox("Respawning monsters", &respawn));
+
+ TXT_AddWidget(window, TXT_NewSeparator("Advanced"));
+ table = TXT_NewTable(2);
+ TXT_SetColumnWidths(table, 12, 12);
+
+ TXT_AddWidget(table, TXT_NewLabel("UDP port"));
+ TXT_AddWidget(table, TXT_NewIntInputBox(&udpport, 5));
+ TXT_AddWidget(window, table);
+
+ button = TXT_NewButton("Add extra parameters...");
+ TXT_SignalConnect(button, "pressed", OpenExtraParamsWindow, NULL);
+ TXT_AddWidget(window, button);
+
}
static void SetChatMacroDefaults(void)