From 36ab1f9a5cd59f0eb7ea3669fb0d29d98fc3863a Mon Sep 17 00:00:00 2001 From: Gregory A Lundberg Date: Tue, 25 Oct 2016 23:51:38 -0500 Subject: [PATCH] wesnoth.show_message_dialog: Don't expose has_input flag to Lua Adjustment of PR 841 (as PR #843) --- data/lua/wml/message.lua | 1 - src/scripting/lua_gui2.cpp | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/data/lua/wml/message.lua b/data/lua/wml/message.lua index 72da61186e90..78ba6218287a 100644 --- a/data/lua/wml/message.lua +++ b/data/lua/wml/message.lua @@ -230,7 +230,6 @@ local function message_user_choice(cfg, speaker, options, text_input) label = text_input.label or "", text = text_input.text or "", max_length = input_max_size, - text_input_was_specified = "yes", } end diff --git a/src/scripting/lua_gui2.cpp b/src/scripting/lua_gui2.cpp index c35ee1c9f843..5fc1c0ba75b1 100644 --- a/src/scripting/lua_gui2.cpp +++ b/src/scripting/lua_gui2.cpp @@ -280,7 +280,7 @@ int show_message_dialog(lua_State *L, CVideo & video) input.caption = txt_cfg["label"].str(); input.text = txt_cfg["text"].str(); input.maximum_length = txt_cfg["max_length"].to_int(256); - input.text_input_was_specified = txt_cfg["text_input_was_specified"].to_bool(false); + input.text_input_was_specified = has_input; gui2::twml_message_options options; if (!lua_isnoneornil(L, 2)) {