Eduardo Bart 36c029fc69 Multiprotocol 8.1-9.6 finally working
Still have many minor issues, tests are needed
No recompilation needed anymore
9.60 messages is not fully implemented
2012-07-26 06:12:20 -03:00

34 lines
688 B
Lua

HOTKEY = 'Ctrl+Z'
bugReportWindow = nil
bugTextEdit = nil
function init()
g_ui.importStyle('bugreport.otui')
bugReportWindow = g_ui.createWidget('BugReportWindow', rootWidget)
bugReportWindow:hide()
bugTextEdit = bugReportWindow:getChildById('bugTextEdit')
g_keyboard.bindKeyDown(HOTKEY, show)
end
function terminate()
g_keyboard.unbindKeyDown(HOTKEY)
bugReportWindow:destroy()
end
function doReport()
g_game.reportBug(bugTextEdit:getText())
bugReportWindow:hide()
modules.game_textmessage.displayGameMessage(tr('Bug report sent.'))
end
function show()
bugTextEdit:setText('')
bugReportWindow:show()
bugReportWindow:raise()
bugReportWindow:focus()
end