added setup option for upcoming new name selection screen
authorHolger Schemel <info@artsoft.org>
Sat, 17 Oct 2020 23:12:38 +0000 (01:12 +0200)
committerHolger Schemel <info@artsoft.org>
Sun, 13 Dec 2020 23:57:56 +0000 (00:57 +0100)
src/files.c
src/libgame/system.h
src/screens.c

index 66109470dfc7ab57007b5db46b0a43a23adc1fdb..ed885a434bbbaaf99cb00e41d8cb93f5d27dda6d 100644 (file)
@@ -8409,6 +8409,10 @@ static struct TokenInfo global_setup_tokens[] =
     TYPE_STRING,
     &setup.player_name,                                "player_name"
   },
+  {
+    TYPE_SWITCH,
+    &setup.multiple_users,                     "multiple_users"
+  },
   {
     TYPE_SWITCH,
     &setup.sound,                              "sound"
@@ -9192,6 +9196,8 @@ static void setSetupInfoToDefaults(struct SetupInfo *si)
 
   si->player_name = get_corrected_login_name(getLoginName());
 
+  si->multiple_users = TRUE;
+
   si->sound = TRUE;
   si->sound_loops = TRUE;
   si->sound_music = TRUE;
@@ -9818,7 +9824,8 @@ void SaveSetup(void)
   for (i = 0; i < ARRAY_SIZE(global_setup_tokens); i++)
   {
     // just to make things nicer :)
-    if (global_setup_tokens[i].value == &setup.sound                   ||
+    if (global_setup_tokens[i].value == &setup.multiple_users          ||
+       global_setup_tokens[i].value == &setup.sound                    ||
        global_setup_tokens[i].value == &setup.graphics_set             ||
        global_setup_tokens[i].value == &setup.volume_simple            ||
        global_setup_tokens[i].value == &setup.network_mode             ||
index 68a94cec543e27646cbc54344c64edcd974f1d49..ab7faa22ba5258aa2d988c26513d79098c0bba4a 100644 (file)
@@ -1390,6 +1390,8 @@ struct SetupInfo
 {
   char *player_name;
 
+  boolean multiple_users;
+
   boolean sound;
   boolean sound_loops;
   boolean sound_music;
index f0fca35b2ee9cf9c38feb9a2cf458b321fa068b5..040a45c56a47dbdadc2d61af9d8d63be172c2889 100644 (file)
@@ -6309,6 +6309,7 @@ static struct TokenInfo setup_info_game[] =
   { TYPE_PLAYER,       &setup.network_player_nr,"Preferred Network Player:" },
   { TYPE_TEXT_INPUT,   execGadgetNetworkServer, "Network Server Hostname:" },
   { TYPE_STRING,       &network_server_text,   ""                      },
+  { TYPE_SWITCH,       &setup.multiple_users,  "Multiple Users/Teams:" },
   { TYPE_YES_NO,       &setup.input_on_focus,  "Only Move Focussed Player:" },
   { TYPE_SWITCH,       &setup.time_limit,      "Time Limit:"           },
   { TYPE_SWITCH,       &setup.handicap,        "Handicap:"             },