From 1bc4b3ac4a6de114e33e0e84e632eeace8f9ebb4 Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Sun, 25 Oct 2020 00:10:21 +0200 Subject: [PATCH] added request to use current setup values for newly created users --- src/screens.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/screens.c b/src/screens.c index e5741bc0..6f1e7f42 100644 --- a/src/screens.c +++ b/src/screens.c @@ -4102,6 +4102,7 @@ static void setTypeNameValues(char *name, struct TextPosInfo *pos, { boolean reset_setup = strEqual(name, ""); boolean remove_user = strEqual(name, EMPTY_PLAYER_NAME); + boolean create_user = strEqual(type_name_last, EMPTY_PLAYER_NAME); if (!changed) strcpy(name, type_name_last); @@ -4128,8 +4129,10 @@ static void setTypeNameValues(char *name, struct TextPosInfo *pos, // temporarily change active user to edited user user.nr = type_name_nr; - // load setup of edited user - LoadSetup(); + // load setup of edited user (unless creating user with current setup) + if (!create_user || + !Request("Use current setup values for the new player?", REQ_ASK)) + LoadSetup(); } // change name of edited user in setup structure -- 2.34.1