Skip to content

Commit

Permalink
Fixed a crash with hotkey's when selecting None from the drop down
Browse files Browse the repository at this point in the history
  • Loading branch information
fdsprod committed Apr 22, 2017
1 parent 6bb27f4 commit 5acf46e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion lua/Mods/tech/Twitch/Options/optionsDb.lua
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ return
lockUIPosition = DbOption.new():setValue(false):checkbox(),
showJoinPart = DbOption.new():setValue(false):checkbox(),
hideShowHotkey = DbOption.new():setValue(0):combo({
DbOption.Item(_('None')):Value("NONE"),
DbOption.Item(_('None')):Value(""),
DbOption.Item(_('NumPad .')):Value("[.]"),
DbOption.Item(_('NumPad -')):Value("[-]"),
DbOption.Item(_('NumPad /')):Value("[/]"),
Expand Down
11 changes: 4 additions & 7 deletions lua/Scripts/twitch/ui.lua
Original file line number Diff line number Diff line change
Expand Up @@ -77,16 +77,13 @@ function UI:new()
ui._x = position.x
ui._y = position.y

ui.window:addMouseMoveCallback(function(self, x, y)
if ui:isInBounds(x,y) then
ui.hideTimerTime = os.time()
end
end)

ui.vsScroll.onChange = ui.onChange_vsScroll
ui.eMessage.onChange = ui.onChange_eMessage

ui.window:addHotKeyCallback(hideShowHotkey, function() ui:nextMode() end)
if hideShowHotkey and hideShowHotkey ~= "NONE" then
ui.window:addHotKeyCallback(hideShowHotkey, function() ui:nextMode() end)
end

ui.pMsg:addMouseWheelCallback(function(self, x, y, clicks) ui:onMouseWheel_eMessage(x, y, clicks) end)

ui.vsScroll:setRange(1,1)
Expand Down

0 comments on commit 5acf46e

Please sign in to comment.