Merge pull request #573 from diath/patch-textwindow

Hide item image box when editing house lists
This commit is contained in:
Sam 2014-10-05 20:50:03 +02:00
commit e9628187f2
1 changed files with 9 additions and 0 deletions

View File

@ -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)