Skip to content

Commit

Permalink
Use separate buttons for stepstype toggling / rate changes instead of…
Browse files Browse the repository at this point in the history
… using left/right clicks
  • Loading branch information
ca25nada committed Jul 26, 2018
1 parent b7dd345 commit 2ae1efc
Showing 1 changed file with 48 additions and 17 deletions.
65 changes: 48 additions & 17 deletions BGAnimations/ScreenMusicInfo overlay/default.lua
Original file line number Diff line number Diff line change
Expand Up @@ -285,19 +285,34 @@ local function stepsListRow()

t[#t+1] = quadButton(6)..{
InitCommand = function(self)
self:zoomto(frameWidth, frameHeight)
self:zoomto(frameWidth/2, frameHeight)
self:xy(-topRowFrameWidth/2, topRowFrameHeight)
self:diffuse(color("#FFFFFF")):diffusealpha(0)
self:halign(0)
self:faderight(0.5)
end;
TopPressedCommand = function(self, params)
if params.input == "DeviceButton_right mouse button" then
MESSAGEMAN:Broadcast("SetStepsType", {st = getNextStepsType(1)})
self:GetParent():GetChild("TriangleRight"):playcommand("Tween")
else
MESSAGEMAN:Broadcast("SetStepsType", {st = getNextStepsType(-1)})
self:GetParent():GetChild("TriangleLeft"):playcommand("Tween")
end
MESSAGEMAN:Broadcast("SetStepsType", {st = getNextStepsType(-1)})
self:GetParent():GetChild("TriangleLeft"):playcommand("Tween")

self:finishtweening()
self:diffusealpha(0.2)
self:smooth(0.3)
self:diffusealpha(0)
end;
}
t[#t+1] = quadButton(6)..{
InitCommand = function(self)
self:zoomto(frameWidth/2, frameHeight)
self:xy(-topRowFrameWidth/2+frameWidth/2, topRowFrameHeight)
self:diffuse(color("#FFFFFF")):diffusealpha(0)
self:halign(0)
self:fadeleft(0.5)
end;
TopPressedCommand = function(self, params)
MESSAGEMAN:Broadcast("SetStepsType", {st = getNextStepsType(1)})
self:GetParent():GetChild("TriangleRight"):playcommand("Tween")

self:finishtweening()
self:diffusealpha(0.2)
self:smooth(0.3)
Expand Down Expand Up @@ -445,28 +460,44 @@ local function stepsBPMRow()
end;
}

t[#t+1] = quadButton(6) .. {
t[#t+1] = quadButton(6)..{
InitCommand = function(self)
self:zoomto(frameWidth, 25)
self:zoomto(frameWidth/2, frameHeight)
self:xy(topRowFrameWidth/2-frameWidth/2, topRowFrameHeight)
self:diffuse(color("#FFFFFF")):diffusealpha(0)
self:halign(1)
self:faderight(0.5)
end;
TopPressedCommand = function(self, params)
changeMusicRate(-0.05)
self:GetParent():GetChild("TriangleLeft"):playcommand("Tween")

self:finishtweening()
self:diffusealpha(0.2)
self:smooth(0.3)
self:diffusealpha(0)
end;
}
t[#t+1] = quadButton(6)..{
InitCommand = function(self)
self:zoomto(frameWidth/2, frameHeight)
self:xy(topRowFrameWidth/2, topRowFrameHeight)
self:diffuse(color("#FFFFFF")):diffusealpha(0)
self:halign(1)
self:fadeleft(0.5)
end;
TopPressedCommand = function(self, params)
if params.input == "DeviceButton_right mouse button" then
changeMusicRate(0.05)
self:GetParent():GetChild("TriangleRight"):playcommand("Tween")
else
changeMusicRate(-0.05)
self:GetParent():GetChild("TriangleLeft"):playcommand("Tween")
end
changeMusicRate(0.05)
self:GetParent():GetChild("TriangleRight"):playcommand("Tween")

self:finishtweening()
self:diffusealpha(0.2)
self:smooth(0.3)
self:diffusealpha(0)
end;
}


t[#t+1] = LoadActor(THEME:GetPathG("", "_triangle")) .. {
Name = "TriangleLeft";
InitCommand = function(self)
Expand Down

0 comments on commit 2ae1efc

Please sign in to comment.