diff --git a/Themes/Til Death/BGAnimations/ScreenNetSelectMusic decorations/profile.lua b/Themes/Til Death/BGAnimations/ScreenNetSelectMusic decorations/profile.lua index a5d13dfce0..69030b792b 100644 --- a/Themes/Til Death/BGAnimations/ScreenNetSelectMusic decorations/profile.lua +++ b/Themes/Til Death/BGAnimations/ScreenNetSelectMusic decorations/profile.lua @@ -22,7 +22,7 @@ local t = Def.ActorFrame{ local frameX = 10 local frameY = 45 -local frameWidth = capWideScale(320,400) +local frameWidth = capWideScale(360,400) local frameHeight = 350 local fontScale = 0.4 local scorestodisplay = 25 @@ -31,9 +31,9 @@ local offsetX = 10 local offsetY = 20 local rankingSkillset=0 local rankingPage=1 -local rankingWidth = frameWidth-50 +local rankingWidth = frameWidth-capWideScale(15,50) local rankingX = capWideScale(25,45) -local rankingY = capWideScale(80,60) +local rankingY = capWideScale(60,60) local rankingTitleWidth = (rankingWidth/(#ms.SkillSets + 1)) if GAMESTATE:IsPlayerEnabled(PLAYER_1) then @@ -46,20 +46,8 @@ t[#t+1] = Def.Quad{InitCommand=cmd(xy,frameX,frameY;zoomto,frameWidth,offsetY;ha t[#t+1] = LoadFont("Common Normal")..{InitCommand=cmd(xy,frameX+5,frameY+offsetY-9;zoom,0.6;halign,0;diffuse,getMainColor('positive');settext,"Profile Info (WIP)")} - -local function input(event) - if event.type ~= "InputEventType_Release" and active then - if event.DeviceInput.button == "DeviceButton_left mouse button" then - MESSAGEMAN:Broadcast("MouseLeftClick") - end - end - return false -end - - -local r = Def.ActorFrame{ - OnCommand=function(self) SCREENMAN:GetTopScreen():AddInputCallback(input) end, - } +-- The input callback for mouse clicks already exists within the tabmanager and redefining it within the local scope does nothing but create confusion - mina +local r = Def.ActorFrame{} local function rankingLabel(i) local ths -- the top highscore object - mina @@ -144,7 +132,7 @@ local function rankingLabel(i) }, Def.Quad{ InitCommand=cmd(xy,rankingX+rankingWidth/2,frameY+rankingY+105-(11-i)*10;zoomto,rankingWidth,10;halign,0.5;valign,0;diffuse,getMainColor('frames');diffusealpha,0), - MouseLeftClickMessageCommand=function(self) + MouseRightClickMessageCommand=function(self) if ths then if isOver(self) then ths:ToggleEtternaValidation() @@ -156,6 +144,15 @@ local function rankingLabel(i) end end end + end, + MouseLeftClickMessageCommand=function(self) + if ths then + if isOver(self) then + local whee = SCREENMAN:GetTopScreen():GetMusicWheel() + local ssrsong = profile:GetSongFromSSR(i+(20*(rankingPage-1)), rankingSkillset) + whee:SelectSong(ssrsong) + end + end end } }