Skip to content

Commit

Permalink
add rebirth ctrl+l to login logout
Browse files Browse the repository at this point in the history
  • Loading branch information
poco0317 committed Oct 23, 2021
1 parent 23d4ab8 commit f2b11da
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions Themes/Rebirth/BGAnimations/playerInfoFrame/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -531,6 +531,17 @@ t[#t+1] = Def.ActorFrame {
if CONTEXTMAN:CheckContextSet(snm, ctx) then ctxBypasses = true break end
end

local ctrl = INPUTFILTER:IsControlPressed()

-- login logout shortcut
if ctrl and event.DeviceInput.button == "DeviceButton_l" then
if not DLMAN:IsLoggedIn() then
beginLoginProcess(self)
else
DLMAN:Logout()
end
end

-- allowing ctrl+n to go back to general tabs
if ctxBypasses then
if event.char and tonumber(event.char) and INPUTFILTER:IsControlPressed() then
Expand Down Expand Up @@ -573,6 +584,9 @@ t[#t+1] = Def.ActorFrame {
end
end)
end,
LoginStep2Command = function(self)
loginStep2()
end,

UIElements.SpriteButton(1, 1, THEME:GetPathG("", "exit")) .. {
Name = "Exit",
Expand Down

0 comments on commit f2b11da

Please sign in to comment.