bug report module

* change modules authors and website
* avoid anchors recursivity crash
* update README
This commit is contained in:
Eduardo Bart
2012-05-01 10:06:38 -03:00
parent 69614da8cb
commit 788a831f24
39 changed files with 204 additions and 68 deletions

View File

@@ -0,0 +1,36 @@
BugReport = {}
local bugReportWindow
local bugTextEdit
local HOTKEY = 'Ctrl+Z'
function BugReport.init()
importStyle 'bugreport.otui'
bugReportWindow = createWidget('BugReportWindow', rootWidget)
bugReportWindow:hide()
bugTextEdit = bugReportWindow:getChildById('bugTextEdit')
Keyboard.bindKeyDown(HOTKEY, BugReport.show)
end
function BugReport.terminate()
Keyboard.unbindKeyDown(HOTKEY)
bugReportWindow:destroy()
bugReportWindow = nil
bugTextEdit = nil
end
function BugReport.doReport()
g_game.reportBug(bugTextEdit:getText())
bugReportWindow:hide()
TextMessage.displayEventAdvance(tr('Bug report sent.'))
end
function BugReport.show()
bugTextEdit:setText('')
bugReportWindow:show()
bugReportWindow:raise()
bugReportWindow:focus()
end