Skip to content

Commit

Permalink
Merge pull request #18 from Misterkister/patch-2
Browse files Browse the repository at this point in the history
profile.lua change for screennetselectmusic (following up mina's change)
  • Loading branch information
MinaciousGrace authored Jan 12, 2017
2 parents a02b719 + df9c2d9 commit b686dc5
Showing 1 changed file with 15 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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()
Expand All @@ -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
}
}
Expand Down

0 comments on commit b686dc5

Please sign in to comment.