Eduardo Bart c54cd1fdf1 Use new coding style in game modules
Lots of refactoring and changes
Remove docs folder
2012-07-24 02:30:08 -03:00

34 lines
689 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.displayEventAdvance(tr('Bug report sent.'))
end
function show()
bugTextEdit:setText('')
bugReportWindow:show()
bugReportWindow:raise()
bugReportWindow:focus()
end