rsr: MusicWheel upgrades part 2
(Sourced from shakesoda/stepmania.)
This commit is contained in:
@@ -0,0 +1,30 @@
|
|||||||
|
local width = 330
|
||||||
|
local height = 46
|
||||||
|
local offset = -16
|
||||||
|
|
||||||
|
return Def.ActorFrame {
|
||||||
|
Def.Quad {
|
||||||
|
InitCommand=function(self)
|
||||||
|
self:setsize(4,SCREEN_HEIGHT)
|
||||||
|
self:x(-width/2+offset-2)
|
||||||
|
self:diffuse({0, 0, 0, 0.7})
|
||||||
|
end
|
||||||
|
},
|
||||||
|
Def.Quad {
|
||||||
|
InitCommand=function(self)
|
||||||
|
self:x(offset)
|
||||||
|
self:setsize(width,height)
|
||||||
|
self:blend('BlendMode_Add')
|
||||||
|
--self:thump()
|
||||||
|
self:diffuse({1, 0.8, 0.7, 0.1})
|
||||||
|
self:effectclock('beat')
|
||||||
|
end,
|
||||||
|
CurrentSongChangedMessageCommand=function(self, params)
|
||||||
|
if not GAMESTATE:GetCurrentSong() then
|
||||||
|
self:stopeffect()
|
||||||
|
else
|
||||||
|
self:thump()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -39,22 +39,4 @@ t[#t].InitCommand = function(self)
|
|||||||
self:texcoordvelocity(-0, 0.5)
|
self:texcoordvelocity(-0, 0.5)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- bottom border
|
|
||||||
t[#t+1] = Def.Quad {}
|
|
||||||
t[#t].InitCommand = function(self)
|
|
||||||
self:x(offset+10)
|
|
||||||
self:y(math.ceil(height/2)+1)
|
|
||||||
self:setsize(width+20, 2)
|
|
||||||
self:diffuse({0.0, 0.0, 0.0, 0.8})
|
|
||||||
end
|
|
||||||
|
|
||||||
-- left border
|
|
||||||
t[#t+1] = Def.Quad {}
|
|
||||||
t[#t].InitCommand = function(self)
|
|
||||||
self:x(-width/2+offset)
|
|
||||||
self:y(1)
|
|
||||||
self:setsize(2, height+2)
|
|
||||||
self:diffuse({0.0, 0.0, 0.0, 0.8})
|
|
||||||
end
|
|
||||||
|
|
||||||
return t
|
return t
|
||||||
|
|||||||
@@ -23,22 +23,4 @@ t[#t].InitCommand = function(self)
|
|||||||
self:diffuse({0, 0, 0, 0.6})
|
self:diffuse({0, 0, 0, 0.6})
|
||||||
end
|
end
|
||||||
|
|
||||||
-- bottom border
|
|
||||||
t[#t+1] = Def.Quad {}
|
|
||||||
t[#t].InitCommand = function(self)
|
|
||||||
self:x(offset+10)
|
|
||||||
self:y(math.ceil(height/2)+1)
|
|
||||||
self:setsize(width+20, 2)
|
|
||||||
self:diffuse({0.0, 0.0, 0.0, 0.8})
|
|
||||||
end
|
|
||||||
|
|
||||||
-- left border
|
|
||||||
t[#t+1] = Def.Quad {}
|
|
||||||
t[#t].InitCommand = function(self)
|
|
||||||
self:x(-width/2+offset)
|
|
||||||
self:y(1)
|
|
||||||
self:setsize(2, height+2)
|
|
||||||
self:diffuse({0.0, 0.0, 0.0, 0.8})
|
|
||||||
end
|
|
||||||
|
|
||||||
return t
|
return t
|
||||||
|
|||||||
@@ -23,22 +23,4 @@ t[#t].InitCommand = function(self)
|
|||||||
self:diffusetopedge({0.1, 0.1, 0.1, 0.6})
|
self:diffusetopedge({0.1, 0.1, 0.1, 0.6})
|
||||||
end
|
end
|
||||||
|
|
||||||
-- bottom border
|
|
||||||
t[#t+1] = Def.Quad {}
|
|
||||||
t[#t].InitCommand = function(self)
|
|
||||||
self:x(offset+10)
|
|
||||||
self:y(math.ceil(height/2)+1)
|
|
||||||
self:setsize(width+20, 2)
|
|
||||||
self:diffuse({0.0, 0.0, 0.0, 0.8})
|
|
||||||
end
|
|
||||||
|
|
||||||
-- left border
|
|
||||||
t[#t+1] = Def.Quad {}
|
|
||||||
t[#t].InitCommand = function(self)
|
|
||||||
self:x(-width/2+offset)
|
|
||||||
self:y(1)
|
|
||||||
self:setsize(2, height+2)
|
|
||||||
self:diffuse({0.0, 0.0, 0.0, 0.8})
|
|
||||||
end
|
|
||||||
|
|
||||||
return t
|
return t
|
||||||
|
|||||||
@@ -128,23 +128,4 @@ t[#t].SetMessageCommand = function(self, params)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
-- bottom border
|
|
||||||
t[#t+1] = Def.Quad {}
|
|
||||||
t[#t].InitCommand = function(self)
|
|
||||||
self:x(offset+10)
|
|
||||||
self:y(math.ceil(height/2)+1)
|
|
||||||
self:setsize(width+20, 2)
|
|
||||||
self:diffuse({0.0, 0.0, 0.0, 0.8})
|
|
||||||
end
|
|
||||||
|
|
||||||
-- left border
|
|
||||||
t[#t+1] = Def.Quad {}
|
|
||||||
t[#t].InitCommand = function(self)
|
|
||||||
self:x(-width/2+offset)
|
|
||||||
self:y(1)
|
|
||||||
self:setsize(2, height+2)
|
|
||||||
self:diffuse({0.0, 0.0, 0.0, 0.8})
|
|
||||||
end
|
|
||||||
|
|
||||||
return t
|
return t
|
||||||
|
|||||||
+118
-1
@@ -46,5 +46,122 @@ ScrollerColors="Exit:#ff0000"
|
|||||||
MusicWheelX=SCREEN_RIGHT-128-18
|
MusicWheelX=SCREEN_RIGHT-128-18
|
||||||
MusicWheelOnCommand=draworder,-1
|
MusicWheelOnCommand=draworder,-1
|
||||||
[MusicWheel]
|
[MusicWheel]
|
||||||
ItemTransformFunction=function(self,offsetFromCenter,itemIndex,numItems) self:x( (1-math.cos(offsetFromCenter/math.pi))*0 ); self:y( offsetFromCenter*48 ); end
|
ItemTransformFunction=function(self,offsetFromCenter,itemIndex,numItems) \
|
||||||
|
self:x( (1-math.cos(offsetFromCenter/math.pi))*0 ) \
|
||||||
|
self:y( offsetFromCenter*46 ) \
|
||||||
|
end
|
||||||
NumWheelItems=13
|
NumWheelItems=13
|
||||||
|
|
||||||
|
[MusicWheelItem]
|
||||||
|
WheelNotifyIconX=-128-16+0.5
|
||||||
|
WheelNotifyIconOnCommand=shadowlength,2;
|
||||||
|
SongNameX=-120
|
||||||
|
CourseX=-120
|
||||||
|
CourseOnCommand=maxwidth,208;horizalign,left
|
||||||
|
SectionExpandedX=-120
|
||||||
|
SectionExpandedY=0
|
||||||
|
SectionExpandedOnCommand=maxwidth,194;horizalign,left;shadowcolor,color("0.1,0.1,0.1,0.25")
|
||||||
|
SectionCollapsedX=-120
|
||||||
|
SectionCollapsedY=0
|
||||||
|
SectionCollapsedOnCommand=maxwidth,194;horizalign,left;shadowcolor,color("0.1,0.1,0.1,0.2")
|
||||||
|
SectionCountX=120
|
||||||
|
SectionCountOnCommand=zoom,0.75;strokecolor,Color("Outline")
|
||||||
|
RouletteOnCommand=maxwidth,400;shadowlength,1;basezoom,0.75;rainbowscroll,true;pulse;effectmagnitude,1,1.125,1;effectperiod,3
|
||||||
|
SortX=-132
|
||||||
|
SortY=-2
|
||||||
|
SortOnCommand=maxwidth,256;horizalign,left;shadowlength,1;shadowcolor,color("0,0,0,0.325")
|
||||||
|
ModeX=-132
|
||||||
|
ModeY=-2
|
||||||
|
ModeOnCommand=maxwidth,256;horizalign,left;strokecolor,Color("Outline")
|
||||||
|
GradeP1X=106+16
|
||||||
|
GradeP1Y=-8
|
||||||
|
GradeP2X=110+16
|
||||||
|
GradeP2Y=8
|
||||||
|
|
||||||
|
[TextBanner]
|
||||||
|
TitleOnCommand=horizalign,left;shadowlengthy,1;shadowcolor,color("0,0,0,0.5")
|
||||||
|
; lots of misc effects for songs
|
||||||
|
TitleSetMessageCommand=%function(self, params) \
|
||||||
|
local song = params.Song \
|
||||||
|
if not song then return end \
|
||||||
|
local title = song:GetDisplayFullTitle() \
|
||||||
|
local artist = song:GetDisplayArtist() \
|
||||||
|
if title == "Let It Flow" and artist == "BANTU" then \
|
||||||
|
self:jitter(true) \
|
||||||
|
else \
|
||||||
|
self:jitter(false) \
|
||||||
|
end \
|
||||||
|
if string.find(title, "Katamari") then \
|
||||||
|
self:rainbowscroll(true) \
|
||||||
|
else \
|
||||||
|
self:rainbowscroll(false) \
|
||||||
|
end \
|
||||||
|
if title == "KING of the SEA" then \
|
||||||
|
self:zoom(1.5) \
|
||||||
|
self:maxwidth(170) \
|
||||||
|
end \
|
||||||
|
if (string.find(string.lower(title), "hardstyle") or \
|
||||||
|
string.find(string.lower(title), "hardcore")) and \
|
||||||
|
params.HasFocus then \
|
||||||
|
self:diffuseramp() \
|
||||||
|
self:effectclock("bgm") \
|
||||||
|
self:effectcolor1(color("#ccaaaa")) \
|
||||||
|
else \
|
||||||
|
self:stopeffect() \
|
||||||
|
end \
|
||||||
|
if artist == "Angerfist" and params.HasFocus then \
|
||||||
|
self:diffuseramp() \
|
||||||
|
self:effectclock("bgm") \
|
||||||
|
self:effectcolor1(color("#ffaaaa")) \
|
||||||
|
else \
|
||||||
|
self:stopeffect() \
|
||||||
|
end \
|
||||||
|
end
|
||||||
|
SubtitleOnCommand=horizalign,left;shadowlengthy,1;shadowcolor,color("0,0,0,0.5")
|
||||||
|
SubtitleSetMessageCommand=%function(self, params) \
|
||||||
|
local song = params.Song \
|
||||||
|
if not song then return end \
|
||||||
|
--[[ I've got a few simfiles here with an annoying prefix here. ]] \
|
||||||
|
local subtitle = song:GetDisplaySubTitle() \
|
||||||
|
if string.sub(subtitle, 1, 2) == "- " then \
|
||||||
|
self:settext(string.sub(subtitle, 3)) \
|
||||||
|
end \
|
||||||
|
end
|
||||||
|
ArtistOnCommand=horizalign,left;shadowlengthy,1;shadowcolor,color("0,0,0,0.5")
|
||||||
|
ArtistSetMessageCommand=diffuse,color("#aaaaaa")
|
||||||
|
ArtistPrependString="/"
|
||||||
|
AfterSetCommand=%function(self,param) \
|
||||||
|
local mainMaxWidth = 228 \
|
||||||
|
local subMaxWidth = 420 \
|
||||||
|
local artistMaxWidth = 300/0.8 \
|
||||||
|
local Title = self:GetChild("Title") \
|
||||||
|
local Subtitle = self:GetChild("Subtitle") \
|
||||||
|
local Artist = self:GetChild("Artist") \
|
||||||
|
\
|
||||||
|
if Subtitle:GetText() == "" then \
|
||||||
|
Title:maxwidth(mainMaxWidth) \
|
||||||
|
Title:y(-8) \
|
||||||
|
Title:zoom(1) \
|
||||||
|
\
|
||||||
|
--[[ hide so that the game skips drawing. ]] \
|
||||||
|
Subtitle:visible(false) \
|
||||||
|
\
|
||||||
|
Artist:zoom(0.66) \
|
||||||
|
Artist:maxwidth(artistMaxWidth) \
|
||||||
|
Artist:y(8) \
|
||||||
|
else \
|
||||||
|
Title:maxwidth(mainMaxWidth*1.25) \
|
||||||
|
Title:y(-11) \
|
||||||
|
Title:zoom(0.75) \
|
||||||
|
\
|
||||||
|
--[[ subtitle below title ]] \
|
||||||
|
Subtitle:visible(true) \
|
||||||
|
Subtitle:zoom(0.55) \
|
||||||
|
Subtitle:y(0) \
|
||||||
|
Subtitle:maxwidth(subMaxWidth) \
|
||||||
|
\
|
||||||
|
Artist:zoom(0.6) \
|
||||||
|
Artist:maxwidth(artistMaxWidth) \
|
||||||
|
Artist:y(10) \
|
||||||
|
end \
|
||||||
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user