mirror of
https://github.com/CorsixTH/CorsixTH.git
synced 2025-07-23 04:13:01 +02:00
Remove debugger from UI
This commit is contained in:
@@ -820,7 +820,6 @@ function UIMenuBar:makeGameMenu(app)
|
||||
if self.ui.app.config.debug then
|
||||
self:addMenu(_S.menu.debug, UIMenu() -- Debug
|
||||
:appendMenu(_S.menu_debug.jump_to_level, levels_menu)
|
||||
:appendItem(_S.menu_debug.connect_debugger:format(hotkey_value_label("global_connectDebugger", hotkeys)), function() self.ui:connectDebugger() end)
|
||||
:appendCheckItem(_S.menu_debug.limit_camera, true, limit_camera, nil, function() return self.ui.limit_to_visible_diamond end)
|
||||
:appendCheckItem(_S.menu_debug.disable_salary_raise, false, disable_salary_raise, nil, function() return self.ui.app.world.debug_disable_salary_raise end)
|
||||
:appendCheckItem(_S.menu_debug.allow_blocking_off_areas, false, allowBlockingAreas, nil, function() return self.ui.app.config.allow_blocking_off_areas end)
|
||||
|
@@ -224,13 +224,6 @@ function UI:setupGlobalKeyHandlers()
|
||||
self:addOrRemoveDebugModeKeyHandlers()
|
||||
end
|
||||
|
||||
function UI:connectDebugger()
|
||||
local error_message = TheApp:connectDebugger()
|
||||
if error_message then
|
||||
self:addWindow(UIInformation(self, {error_message}))
|
||||
end
|
||||
end
|
||||
|
||||
-- Used for everything except music and announcements
|
||||
function UI:playSound(name, played_callback, played_callback_delay)
|
||||
if self.app.config.play_sounds then
|
||||
@@ -1071,11 +1064,9 @@ function UI:getCursorPosition(window)
|
||||
end
|
||||
|
||||
function UI:addOrRemoveDebugModeKeyHandlers()
|
||||
self:removeKeyHandler("global_connectDebugger", self)
|
||||
self:removeKeyHandler("global_showLuaConsole", self)
|
||||
self:removeKeyHandler("global_runDebugScript", self)
|
||||
if self.app.config.debug then
|
||||
self:addKeyHandler("global_connectDebugger", self, self.connectDebugger)
|
||||
self:addKeyHandler("global_showLuaConsole", self, self.showLuaConsole)
|
||||
self:addKeyHandler("global_runDebugScript", self, self.runDebugScript)
|
||||
end
|
||||
|
Reference in New Issue
Block a user