From 41dcc15e566948e9b16c2a5d6fb28e6698a0d028 Mon Sep 17 00:00:00 2001 From: pedrosoutinho Date: Tue, 5 Sep 2023 20:17:54 -0300 Subject: [PATCH] rebirth right click to main --- .../ScreenHelpMenu overlay/helpDisplay.lua | 4 ++-- .../playerInfoFrame/assetsettings.lua | 24 +++++++++---------- .../playerInfoFrame/downloads.lua | 18 +++++++------- .../playerInfoFrame/searchfilter.lua | 16 ++++++------- .../BGAnimations/playerInfoFrame/settings.lua | 7 +++--- 5 files changed, 35 insertions(+), 34 deletions(-) diff --git a/Themes/Rebirth/BGAnimations/ScreenHelpMenu overlay/helpDisplay.lua b/Themes/Rebirth/BGAnimations/ScreenHelpMenu overlay/helpDisplay.lua index daf72da3f1..423d783ee2 100644 --- a/Themes/Rebirth/BGAnimations/ScreenHelpMenu overlay/helpDisplay.lua +++ b/Themes/Rebirth/BGAnimations/ScreenHelpMenu overlay/helpDisplay.lua @@ -530,7 +530,7 @@ local function helpMenu() local right = gameButton == "MenuRight" or gameButton == "Right" local left = gameButton == "MenuLeft" or gameButton == "Left" local enter = gameButton == "Start" - local back = key == "DeviceButton_escape" + local back = key == "DeviceButton_escape" or key == "DeviceButton_right mouse button" if up or left then moveCursor(-1) @@ -813,7 +813,7 @@ local t = Def.ActorFrame { end, }, }, - + } return t diff --git a/Themes/Rebirth/BGAnimations/playerInfoFrame/assetsettings.lua b/Themes/Rebirth/BGAnimations/playerInfoFrame/assetsettings.lua index bcc3224755..d265c2a0b1 100644 --- a/Themes/Rebirth/BGAnimations/playerInfoFrame/assetsettings.lua +++ b/Themes/Rebirth/BGAnimations/playerInfoFrame/assetsettings.lua @@ -407,7 +407,7 @@ local function assetList() if event.type ~= "InputEventType_Release" then local btn = event.DeviceInput.button local gbtn = event.button - if btn == "DeviceButton_escape" then + if btn == "DeviceButton_escape" or btn == "DeviceButton_right mouse button" then -- shortcut to exit back to general -- or back to settings screen if prevScreen == "Settings" then @@ -426,7 +426,7 @@ local function assetList() local enter = gbtn == "Start" local pageup = gbtn == "EffectUp" local pagedown = gbtn == "EffectDown" - + -- if ctrl is pressed with a number, let the general tab input handler deal with this if char ~= nil and tonumber(char) and INPUTFILTER:IsControlPressed() then return @@ -452,7 +452,7 @@ local function assetList() end end end - + end) end, UpdateItemListCommand = function(self) @@ -570,7 +570,7 @@ local function assetList() if name == curPath then curIndex = i end - + if curType == 3 then assetWidth = judgmentWidth else @@ -589,7 +589,7 @@ local function assetList() self:GetChild("Border"):zoomto(assetHeight+4,assetWidth+4) self:GetChild("Border"):diffuse(COLORS:getColor("assetSettings", "HoveredItem")):diffusealpha(0) end - + self:y(((math.floor((i-1)/maxColumns)+1)*assetYSpacing)-10+50) self:finishtweening() self:tween(0.5,"TweenType_Bezier",{0,0,0,0.5,0,1,1,1}) @@ -609,7 +609,7 @@ local function assetList() end end } - + t[#t+1] = Def.Quad { Name = "SelectedAssetIndicator", InitCommand = function(self) @@ -635,7 +635,7 @@ local function assetList() self:queuecommand("Set") end } - + t[#t+1] = Def.Quad { Name = "Border", InitCommand = function(self) @@ -670,7 +670,7 @@ local function assetList() end end, } - + t[#t+1] = UIElements.SpriteButton(1, 1, nil) .. { Name = "Image", InitCommand = function(self) @@ -749,7 +749,7 @@ local function assetList() end end, } - + t[#t+1] = Def.Sound { Name = "Sound", LoadAssetCommand = function(self) @@ -760,7 +760,7 @@ local function assetList() else self:load("") end - + end, CursorMovedMessageCommand = function(self, params) if params.index == i and curType == 1 and params.prevIndex ~= i then @@ -768,7 +768,7 @@ local function assetList() end end } - + return t end @@ -938,4 +938,4 @@ end t[#t+1] = assetList() -return t \ No newline at end of file +return t diff --git a/Themes/Rebirth/BGAnimations/playerInfoFrame/downloads.lua b/Themes/Rebirth/BGAnimations/playerInfoFrame/downloads.lua index ef4222c14f..5f904bb816 100644 --- a/Themes/Rebirth/BGAnimations/playerInfoFrame/downloads.lua +++ b/Themes/Rebirth/BGAnimations/playerInfoFrame/downloads.lua @@ -430,7 +430,7 @@ local function downloadsList() if pack ~= nil then self:diffusealpha(1) end - end + end end, LoadFont("Common Normal") .. { @@ -833,7 +833,7 @@ local function downloadsList() if event.type ~= "InputEventType_Release" then local btn = event.DeviceInput.button local gbtn = event.button - if btn == "DeviceButton_escape" then + if btn == "DeviceButton_escape" or btn == "DeviceButton_right mouse button" then -- shortcut to exit back to general MESSAGEMAN:Broadcast("GeneralTabSet") else @@ -844,7 +844,7 @@ local function downloadsList() local down = gbtn == "MenuDown" or gbtn == "Down" local ctrl = INPUTFILTER:IsControlPressed() local copypasta = btn == "DeviceButton_v" and ctrl - + -- if ctrl is pressed with a number, let the general tab input handler deal with this if char ~= nil and tonumber(char) and INPUTFILTER:IsControlPressed() then return @@ -882,7 +882,7 @@ local function downloadsList() end end end - + end) end, UpdateSearchCommand = function(self) @@ -960,7 +960,7 @@ local function downloadsList() local bg = self:GetChild("BG") local width = actuals.MSDColumnLeftGap - actuals.NameColumnLeftGap - actuals.MSDWidth / 2 self:xy(actuals.NameColumnLeftGap, actuals.HeaderLineUpperGap + actuals.TopLipHeight) - + txt:halign(0):valign(0) bg:halign(0):valign(0) txt:zoom(nameHeaderSize) @@ -991,7 +991,7 @@ local function downloadsList() local bg = self:GetChild("BG") local width = actuals.MSDWidth self:xy(actuals.MSDColumnLeftGap, actuals.HeaderLineUpperGap + actuals.TopLipHeight) - + txt:valign(0) bg:valign(0) txt:zoom(msdHeaderSize) @@ -1022,7 +1022,7 @@ local function downloadsList() local bg = self:GetChild("BG") local width = actuals.SizeColumnLeftGap - actuals.MSDColumnLeftGap - actuals.MSDWidth / 2 self:xy(actuals.SizeHeaderLeftGap, actuals.HeaderLineUpperGap + actuals.TopLipHeight) - + txt:valign(0) bg:valign(0) txt:zoom(sizeHeaderSize) @@ -1083,7 +1083,7 @@ local function downloadsList() end }, } - + for i = 1, itemCount do t[#t+1] = listItem(i) end @@ -1095,4 +1095,4 @@ end t[#t+1] = downloadsList() -return t \ No newline at end of file +return t diff --git a/Themes/Rebirth/BGAnimations/playerInfoFrame/searchfilter.lua b/Themes/Rebirth/BGAnimations/playerInfoFrame/searchfilter.lua index 7ec33f88fa..16c1adf85c 100644 --- a/Themes/Rebirth/BGAnimations/playerInfoFrame/searchfilter.lua +++ b/Themes/Rebirth/BGAnimations/playerInfoFrame/searchfilter.lua @@ -189,13 +189,13 @@ local function upperSection() local foundtitle = "" local foundsubtitle = "" local foundgroup = "" - + if artistpos ~= nil or authorpos ~= nil or titlepos ~= nil or subtitlepos ~= nil or mapperpos ~= nil or charterpos ~= nil or stepperpos ~= nil or grouppos ~= nil or packpos ~= nil then - + if artistpos ~= nil then local strend = input:find("[;]", artistpos+1) if strend == nil then strend = #input else strend = strend-1 end @@ -251,7 +251,7 @@ local function upperSection() end -- you know what im just going to update all the other entry fields based on this one - + end, -- "Title Search" function(input) @@ -436,7 +436,7 @@ local function upperSection() end if searchentry.Group ~= "" then finalstr = finalstr .. "group="..searchentry.Group..";" - end + end end self:GetChild("RowFrame_1"):GetChild("RowInput"):settext(finalstr) end @@ -468,7 +468,7 @@ local function upperSection() changeFocus(1) elseif event.type == "InputEventType_FirstPress" and (btn == "DeviceButton_tab" and shift) or btn == "DeviceButton_up" then changeFocus(-1) - elseif btn == "DeviceButton_escape" then + elseif btn == "DeviceButton_escape" or btn == "DeviceButton_right mouse button" then -- shortcut to escape out of search without searching MESSAGEMAN:Broadcast("GeneralTabSet") else @@ -1066,8 +1066,8 @@ local function lowerSection() else return end - - minrate = clamp(clamp(minrate + increment, 0.7, FILTERMAN:GetMaxFilterRate()), 0.7, 3) + + minrate = clamp(clamp(minrate + increment, 0.7, FILTERMAN:GetMaxFilterRate()), 0.7, 3) FILTERMAN:SetMinFilterRate(minrate) self:playcommand("UpdateText") end, @@ -1218,4 +1218,4 @@ t[#t+1] = Def.Quad { t[#t+1] = upperSection() t[#t+1] = lowerSection() -return t \ No newline at end of file +return t diff --git a/Themes/Rebirth/BGAnimations/playerInfoFrame/settings.lua b/Themes/Rebirth/BGAnimations/playerInfoFrame/settings.lua index 3bee8ec280..30f982b03a 100644 --- a/Themes/Rebirth/BGAnimations/playerInfoFrame/settings.lua +++ b/Themes/Rebirth/BGAnimations/playerInfoFrame/settings.lua @@ -846,7 +846,7 @@ local function leftFrame() local left = gameButton == "MenuLeft" or gameButton == "Left" local enter = gameButton == "Start" local ctrl = INPUTFILTER:IsBeingPressed("left ctrl") or INPUTFILTER:IsBeingPressed("right ctrl") - local back = key == "DeviceButton_escape" + local back = key == "DeviceButton_escape" or key == "DeviceButton_right mouse button" local rightclick = key == "DeviceButton_right mouse button" local leftclick = key == "DeviceButton_left mouse button" @@ -2048,7 +2048,7 @@ local function leftFrame() local rightclick = key == "DeviceButton_right mouse button" local leftclick = key == "DeviceButton_left mouse button" - if back then + if back or rightclick then if selectionstate == "editing" then -- pressing back while editing moves back to element seletion switchSelectionState("element") @@ -2056,6 +2056,7 @@ local function leftFrame() -- shortcut to exit back to settings -- press twice to exit back to general MESSAGEMAN:Broadcast("PlayerInfoFrameTabSet", {tab = "Settings"}) + -- goUpOneLayer() end elseif selectionstate == "editing" then -- editing a color, typing only on the color @@ -6797,7 +6798,7 @@ local function rightFrame() local enter = gameButton == "Start" local ctrl = INPUTFILTER:IsBeingPressed("left ctrl") or INPUTFILTER:IsBeingPressed("right ctrl") local previewbutton = key == "DeviceButton_space" - local back = key == "DeviceButton_escape" + local back = key == "DeviceButton_escape" or key == "DeviceButton_right mouse button" if up then cursorUp(1)