Skip to content

Commit 9e3cdc6

Browse files
hes a madman
1 parent e2d465a commit 9e3cdc6

File tree

7 files changed

+152
-78
lines changed

7 files changed

+152
-78
lines changed
Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
local collapsed = false
12
local t = Def.ActorFrame{
23
BeginCommand=function(self)
34
self:queuecommand("Set"):visible(false)
@@ -7,23 +8,36 @@ local t = Def.ActorFrame{
78
self:bouncebegin(0.2):xy(-500,0):diffusealpha(0)
89
end,
910
OnCommand=function(self)
10-
self:bouncebegin(0.2):xy(0,0):diffusealpha(1)
11+
self:bouncebegin(0.2):xy(SCREEN_LEFT,SCREEN_TOP - 10):diffusealpha(1)
1112
end,
1213
SetCommand=function(self)
13-
self:finishtweening()
14+
self:hurrytweening(1)
1415
if getTabIndex() == 6 then
1516
self:queuecommand("On")
1617
self:visible(true)
17-
else
18+
elseif collapsed and getTabIndex() == 0 then
19+
self:queuecommand("On")
20+
self:visible(true)
21+
elseif collapsed and getTabIndex() ~= 0 then
22+
self:queuecommand("Off")
23+
elseif not collapsed then
1824
self:queuecommand("Off")
1925
end
2026
end,
2127
TabChangedMessageCommand=function(self)
2228
self:queuecommand("Set")
2329
end,
30+
CollapseCommand=function(self)
31+
collapsed = true
32+
resetTabIndex()
33+
MESSAGEMAN:Broadcast("TabChanged")
34+
end,
35+
ExpandCommand=function(self)
36+
collapsed = true
37+
setTabIndex(6)
38+
MESSAGEMAN:Broadcast("TabChanged")
39+
end
2440
}
25-
26-
2741
t[#t+1] = LoadActor("../superscoreboard")
2842

2943
return t

Themes/Til Death/BGAnimations/ScreenSelectMusic decorations/score.lua

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -605,27 +605,11 @@ local netTab = Def.ActorFrame {
605605
InitCommand=function(self)
606606
self:zoomto(netPageButtonWidth*2, netPageButtonHeight):diffusealpha(0)
607607
end,
608-
MouseLeftClickMessageCommand=function(self)
609-
if ButtonActive(self) and update and nestedTab == 2 then
610-
FILTERMAN:ToggleCurrentRateOnlyForOnlineLeaderBoard()
611-
whee = SCREENMAN:GetTopScreen():GetMusicWheel()
612-
whee:Move(1)
613-
whee:Move(-1)
614-
whee:Move(0)
615-
end
616-
end
617608
},
618609
LoadFont("Common Large") .. {
619610
InitCommand=function(self)
620611
self:diffuse(getMainColor('positive')):maxwidth(netPageButtonWidth*3):maxheight(20):zoom(1)
621612
end,
622-
SetCommand=function(self)
623-
if FILTERMAN:IsCurrentRateOnlyForOnlineLeaderBoard() == 0 then
624-
self:settext("Displaying All Rates")
625-
else
626-
self:settext("Current Rate Only")
627-
end
628-
end,
629613
}
630614
}
631615
}

Themes/Til Death/BGAnimations/goaldisplay.lua

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -101,15 +101,12 @@ local o = Def.ActorFrame{
101101
ind = ind - numgoals
102102
self:queuecommand("Update")
103103
end,
104-
WheeDoooMessageCommand=function(self)
105-
self:queuecommand("NextPage")
106-
end,
107-
104+
108105
Def.Quad{
109-
Name = "FrameDisplay",
110-
InitCommand=function(self)
111-
self:zoomto(width,height-headeroff):halign(0):valign(0):diffuse(color("#333333"))
112-
end
106+
Name = "FrameDisplay",
107+
InitCommand=function(self)
108+
self:zoomto(width,height-headeroff):halign(0):valign(0):diffuse(color("#333333"))
109+
end
113110
},
114111

115112
-- headers

Themes/Til Death/BGAnimations/superscoreboard.lua

Lines changed: 128 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ local pdh = 48 * tzoom
33
local ygap = 2
44
local packspaceY = pdh + ygap
55

6-
local numgoals = 12
6+
local numscores = 12
77
local ind = 0
88
local offx = 5
99
local width = SCREEN_WIDTH * 0.56
1010
local dwidth = width - offx * 2
11-
local height = (numgoals+2) * packspaceY
11+
local height = (numscores+2) * packspaceY
1212

1313
local adjx = 14
1414
local c0x = 10
@@ -21,6 +21,7 @@ local headeroff = packspaceY/1.5
2121
local row2yoff = 1
2222
local moving
2323
local cheese
24+
local collapsed = false
2425

2526
-- will eat any mousewheel inputs to scroll pages while mouse is over the background frame
2627
local function input(event)
@@ -66,7 +67,6 @@ local o = Def.ActorFrame{
6667
Name = "GoalDisplay",
6768
InitCommand=function(self)
6869
cheese = self
69-
self:xy(0,0)
7070
self:SetUpdateFunction(highlight)
7171
end,
7272
BeginCommand=function(self)
@@ -83,35 +83,94 @@ local o = Def.ActorFrame{
8383
end,
8484
UpdateCommand=function(self)
8585
if ind == #scoretable then
86-
ind = ind - numgoals
87-
elseif ind > #scoretable - (#scoretable % numgoals) then
88-
ind = #scoretable - (#scoretable % numgoals)
86+
ind = ind - numscores
87+
elseif ind > #scoretable - (#scoretable % numscores) then
88+
ind = #scoretable - (#scoretable % numscores)
8989
end
9090
if ind < 0 then
9191
ind = 0
9292
end
9393
end,
94-
DFRFinishedMessageCommand=function(self)
95-
GetPlayerOrMachineProfile(PLAYER_1):SetFromAll()
96-
self:queuecommand("GoalTableRefresh")
97-
end,
9894
NextPageCommand=function(self)
99-
ind = ind + numgoals
95+
ind = ind + numscores
10096
self:queuecommand("Update")
10197
end,
10298
PrevPageCommand=function(self)
103-
ind = ind - numgoals
99+
ind = ind - numscores
104100
self:queuecommand("Update")
105101
end,
106-
WheeDoooMessageCommand=function(self)
107-
self:queuecommand("NextPage")
102+
CollapseCommand=function(self)
103+
tzoom = 0.5 * 0.75
104+
pdh = 38 * tzoom
105+
ygap = 2
106+
packspaceY = pdh + ygap
107+
108+
numscores = 10
109+
ind = 0
110+
offx = 5
111+
width = math.max(SCREEN_WIDTH * 0.25,240)
112+
dwidth = width - offx * 2
113+
height = (numscores+2) * packspaceY
114+
115+
adjx = 14
116+
c0x = 10
117+
c1x = 10 + c0x
118+
c2x = c1x + (tzoom*7*adjx)
119+
c5x = dwidth
120+
c4x = c5x - adjx - (tzoom*3*adjx)
121+
c3x = c4x - adjx - (tzoom*10*adjx)
122+
headeroff = packspaceY/1.5
123+
row2yoff = 1
124+
collapsed = true
125+
self:diffusealpha(0.8)
126+
self:queuecommand("Init")
127+
end,
128+
ExpandCommand=function(self)
129+
tzoom = 0.5
130+
pdh = 48 * tzoom
131+
ygap = 2
132+
packspaceY = pdh + ygap
133+
134+
numscores = 12
135+
ind = 0
136+
offx = 5
137+
width = SCREEN_WIDTH * 0.56
138+
dwidth = width - offx * 2
139+
height = (numscores+2) * packspaceY
140+
141+
adjx = 14
142+
c0x = 10
143+
c1x = 20 + c0x
144+
c2x = c1x + (tzoom*7*adjx) -- guesswork adjustment for epxected text length
145+
c5x = dwidth -- right aligned cols
146+
c4x = c5x - adjx - (tzoom*3*adjx) -- right aligned cols
147+
c3x = c4x - adjx - (tzoom*10*adjx) -- right aligned cols
148+
headeroff = packspaceY/1.5
149+
row2yoff = 1
150+
collapsed = false
151+
self:diffusealpha(1)
152+
self:queuecommand("Init")
108153
end,
109154

110155
Def.Quad{
111-
Name = "FrameDisplay",
112-
InitCommand=function(self)
113-
self:zoomto(width,height-headeroff):halign(0):valign(0):diffuse(color("#333333"))
114-
end
156+
Name = "FrameDisplay",
157+
InitCommand=function(self)
158+
self:zoomto(width,height-headeroff):halign(0):valign(0):diffuse(color("#333333"))
159+
end,
160+
HighlightCommand=function(self)
161+
if isOver(self) and collapsed then
162+
self:diffusealpha(1)
163+
else
164+
self:diffusealpha(0.8)
165+
end
166+
end,
167+
MouseRightClickMessageCommand=function(self)
168+
if isOver(self) and not collapsed then
169+
self:GetParent():GetParent():queuecommand("Collapse")
170+
elseif isOver(self) then
171+
self:GetParent():GetParent():queuecommand("Expand")
172+
end
173+
end,
115174
},
116175

117176
-- headers
@@ -120,14 +179,6 @@ local o = Def.ActorFrame{
120179
self:xy(offx, headeroff):zoomto(dwidth,pdh):halign(0):diffuse(color("#111111"))
121180
end,
122181
},
123-
LoadFont("Common normal") .. { --index
124-
InitCommand=function(self)
125-
self:xy(width/2, headeroff):zoom(tzoom):halign(0.5)
126-
end,
127-
UpdateCommand=function(self)
128-
self:settextf("%i-%i", ind+1, ind+numgoals)
129-
end,
130-
},
131182

132183
LoadFont("Common normal") .. { --current rate toggle
133184
InitCommand=function(self)
@@ -158,10 +209,13 @@ local function makeGoalDisplay(i)
158209
local o = Def.ActorFrame{
159210
InitCommand=function(self)
160211
self:y(packspaceY*i + headeroff)
212+
if i > numscores then
213+
self:visible(false)
214+
end
161215
end,
162216
UpdateCommand=function(self)
163217
hs = scoretable[(i + ind)]
164-
if hs then
218+
if hs and i <= numscores then
165219
self:queuecommand("Display")
166220
self:visible(true)
167221
else
@@ -175,12 +229,22 @@ local function makeGoalDisplay(i)
175229
end,
176230
DisplayCommand=function(self)
177231
self:diffuse(color("#111111CC"))
178-
end
232+
end,
233+
HighlightCommand=function(self)
234+
if isOver(self) and collapsed then
235+
self:diffusealpha(1)
236+
else
237+
self:diffusealpha(0.6)
238+
end
239+
end,
179240
},
180241

181242
LoadFont("Common normal") .. { --rank
182243
InitCommand=function(self)
183244
self:x(c0x):zoom(tzoom):halign(0):valign(0)
245+
if collapsed then
246+
self:x(c0x):zoom(tzoom):halign(0):valign(0.5)
247+
end
184248
end,
185249
DisplayCommand=function(self)
186250
self:settextf("%i.", i + ind)
@@ -190,27 +254,38 @@ local function makeGoalDisplay(i)
190254
LoadFont("Common normal") .. { --ssr
191255
InitCommand=function(self)
192256
self:x(c2x - c1x + offx):zoom(tzoom+0.05):halign(0.5):valign(1)
257+
if collapsed then
258+
self:x(46):zoom(tzoom+0.15):halign(0.5):valign(0.5):maxwidth(20/tzoom)
259+
end
193260
end,
194261
DisplayCommand=function(self)
195262
local ssr = hs:GetSkillsetSSR("Overall")
196263
self:settextf("%.2f",ssr):diffuse(byMSD(ssr))
197264
end,
198265
},
199266

200-
201267
LoadFont("Common normal") .. { --rate
202268
InitCommand=function(self)
203269
self:x(c2x - c1x + offx):zoom(tzoom-0.05):halign(0.5):valign(0):addy(row2yoff)
270+
if collapsed then
271+
self:x(c4x - 14):zoom(tzoom):halign(1):valign(0.5):addy(-row2yoff):maxwidth(30/tzoom)
272+
end
204273
end,
205274
DisplayCommand=function(self)
206275
local ratestring = string.format("%.2f", hs:GetMusicRate()):gsub("%.?0$", "").."x"
207276
self:settext(ratestring)
208277
end,
278+
ExpandCommand=function(self)
279+
self:addy(-row2yoff)
280+
end,
209281
},
210282

211283
LoadFont("Common normal") .. { --name
212284
InitCommand=function(self)
213285
self:x(c2x):zoom(tzoom+0.1):maxwidth((c3x-c2x - capWideScale(10,40))/tzoom):halign(0):valign(1)
286+
if collapsed then
287+
self:x(c2x + 10):maxwidth(60/tzoom):zoom(tzoom+0.2):valign(0.5)
288+
end
214289
end,
215290
DisplayCommand=function(self)
216291
self:settext(hs:GetDisplayName())
@@ -228,12 +303,14 @@ local function makeGoalDisplay(i)
228303
local urlstringyo = "https://etternaonline.com/user/"..hs:GetUserid()
229304
GAMESTATE:ApplyGameCommand("urlnoexit,"..urlstringyo)
230305
end
231-
end
306+
end,
232307
},
233308

234309
LoadFont("Common normal") .. { --judgments
235310
InitCommand=function(self)
236-
self:x(c2x):zoom(tzoom-0.05):halign(0):valign(0):maxwidth(width/2/tzoom):addy(row2yoff)
311+
if not collapsed then
312+
self:x(c2x):zoom(tzoom-0.05):halign(0):valign(0):maxwidth(width/2/tzoom):addy(row2yoff)
313+
end
237314
end,
238315
DisplayCommand=function(self)
239316
self:settext(hs:GetJudgmentString())
@@ -251,12 +328,21 @@ local function makeGoalDisplay(i)
251328
local urlstringyo = "https://etternaonline.com/score/view/"..hs:GetScoreid()..hs:GetUserid()
252329
GAMESTATE:ApplyGameCommand("urlnoexit,"..urlstringyo)
253330
end
254-
end
331+
end,
332+
CollapseCommand=function(self)
333+
self:visible(false)
334+
end,
335+
ExpandCommand=function(self)
336+
self:visible(true):addy(-row2yoff)
337+
end,
255338
},
256339

257340
LoadFont("Common normal") .. { --percent
258341
InitCommand=function(self)
259342
self:x(c5x):zoom(tzoom+0.15):halign(1):valign(1)
343+
if collapsed then
344+
self:x(c5x):zoom(tzoom+0.15):halign(1):valign(0.5):maxwidth(30/tzoom)
345+
end
260346
end,
261347
DisplayCommand=function(self)
262348
self:settextf("%05.2f%%", hs:GetWifeScore()*10000/100):diffuse(byGrade(hs:GetWifeGrade()))
@@ -265,17 +351,25 @@ local function makeGoalDisplay(i)
265351

266352
LoadFont("Common normal") .. { --date
267353
InitCommand=function(self)
268-
self:x(c5x):zoom(tzoom-0.05):halign(1):valign(0):maxwidth(width/4/tzoom):addy(row2yoff)
354+
if not collapsed then
355+
self:x(c5x):zoom(tzoom-0.05):halign(1):valign(0):maxwidth(width/4/tzoom):addy(row2yoff)
356+
end
269357
end,
270358
DisplayCommand=function(self)
271359
self:settext(hs:GetDate())
272360
end,
361+
CollapseCommand=function(self)
362+
self:visible(false)
363+
end,
364+
ExpandCommand=function(self)
365+
self:visible(true):addy(-row2yoff)
366+
end,
273367
},
274368
}
275369
return o
276370
end
277371

278-
for i=1,numgoals do
372+
for i=1,numscores do
279373
o[#o+1] = makeGoalDisplay(i)
280374
end
281375

0 commit comments

Comments
 (0)