From 7cfa9c38e03cb44f5fdfe523d52d3f460490702b Mon Sep 17 00:00:00 2001 From: Kamil Chojnowski Date: Sun, 5 Oct 2014 19:24:34 +0200 Subject: [PATCH] Hide item image box when editing house lists --- modules/game_textwindow/textwindow.lua | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/modules/game_textwindow/textwindow.lua b/modules/game_textwindow/textwindow.lua index 87b7c4ee..696157b8 100644 --- a/modules/game_textwindow/textwindow.lua +++ b/modules/game_textwindow/textwindow.lua @@ -35,6 +35,10 @@ function onGameEditText(id, itemId, maxLength, text, writer, time) local textScroll = textWindow:getChildById('textScroll') + if textItem:isHidden() then + textItem:show() + end + textItem:setItemId(itemId) textEdit:setMaxLength(maxLength) textEdit:setText(text) @@ -107,6 +111,11 @@ function onGameEditList(id, doorId, text) local okButton = textWindow:getChildById('okButton') local cancelButton = textWindow:getChildById('cancelButton') + local textItem = textWindow:getChildById('textItem') + if textItem and not textItem:isHidden() then + textItem:hide() + end + textEdit:setMaxLength(8192) textEdit:setText(text) textEdit:setEditable(true)