大改暂停界面ui
This commit is contained in:
@@ -29,7 +29,7 @@ local trophyColor--Current trophy color
|
|||||||
|
|
||||||
function scene.sceneInit(org)
|
function scene.sceneInit(org)
|
||||||
if org:find("setting")then
|
if org:find("setting")then
|
||||||
TEXT.show(text.needRestart,640,440,50,'fly',.6)
|
TEXT.show(text.needRestart,640,410,50,'fly',.6)
|
||||||
end
|
end
|
||||||
local P=PLAYERS[1]
|
local P=PLAYERS[1]
|
||||||
local S=P.stat
|
local S=P.stat
|
||||||
@@ -174,7 +174,7 @@ function scene.draw()
|
|||||||
|
|
||||||
--Dark BG
|
--Dark BG
|
||||||
local _=T
|
local _=T
|
||||||
if GAME.result then _=_*.7 end
|
if GAME.result then _=_*.76 end
|
||||||
gc.setColor(.15,.15,.15,_)
|
gc.setColor(.15,.15,.15,_)
|
||||||
gc.replaceTransform(SCR.origin)
|
gc.replaceTransform(SCR.origin)
|
||||||
gc.rectangle('fill',0,0,SCR.w,SCR.h)
|
gc.rectangle('fill',0,0,SCR.w,SCR.h)
|
||||||
@@ -183,111 +183,91 @@ function scene.draw()
|
|||||||
--Pause Info
|
--Pause Info
|
||||||
setFont(25)
|
setFont(25)
|
||||||
if GAME.pauseCount>0 then
|
if GAME.pauseCount>0 then
|
||||||
gc.setColor(1,.4,.4,T)
|
gc.setColor(.96,.92,.92,T)
|
||||||
gc.print(("%s:[%d] %.2fs"):format(text.pauseCount,GAME.pauseCount,GAME.pauseTime),40,180)
|
mStr(("%s:[%d] %.2fs"):format(text.pauseCount,GAME.pauseCount,GAME.pauseTime),640,510)
|
||||||
end
|
end
|
||||||
|
|
||||||
gc.setColor(1,1,1,T)
|
gc.setColor(.97,.97,.97,T)
|
||||||
|
|
||||||
--Result Text
|
--Result Text
|
||||||
setFont(35)
|
setFont(35)
|
||||||
mDraw(GAME.result and drawableText[GAME.result]or drawableText.pause,640,100-10*(5-timer*.1)^1.5)
|
mDraw(GAME.result and drawableText[GAME.result]or drawableText.pause,640,90-10*(5-timer*.1)^1.5)
|
||||||
|
|
||||||
--Mode Info
|
--Mode Info
|
||||||
gc.draw(drawableText.modeName,40,240)
|
mDraw(drawableText.modeName,640,180)
|
||||||
|
|
||||||
--Infos
|
|
||||||
if PLAYERS[1].frameRun>180 then
|
|
||||||
gc.setLineWidth(2)
|
|
||||||
--Finesse rank & trophy
|
|
||||||
if rank then
|
|
||||||
gc.setColor(1,1,1,T*.2)
|
|
||||||
gc.rectangle('fill',35,305,465,405)
|
|
||||||
|
|
||||||
setFont(60)
|
|
||||||
local c=fnsRankColor[rank]
|
|
||||||
gc.setColor(c[1],c[2],c[3],T)
|
|
||||||
gc.print(rank,420,635)
|
|
||||||
if trophy then
|
|
||||||
setFont(40)
|
|
||||||
gc.setColor(trophyColor[1],trophyColor[2],trophyColor[3],T*2-1)
|
|
||||||
gc.printf(trophy,100-120*(1-T^.5),650,300,'right')
|
|
||||||
end
|
|
||||||
|
|
||||||
gc.setColor(1,1,1,T)
|
|
||||||
gc.rectangle('line',35,305,465,405)
|
|
||||||
gc.line(35,620,500,620)
|
|
||||||
else
|
|
||||||
gc.setColor(1,1,1,T*.2)
|
|
||||||
gc.rectangle('fill',35,305,465,350)
|
|
||||||
gc.setColor(1,1,1,T)
|
|
||||||
gc.rectangle('line',35,305,465,350)
|
|
||||||
end
|
|
||||||
|
|
||||||
_=form
|
|
||||||
setFont(25)
|
|
||||||
for i=1,10 do
|
|
||||||
gc.print(text.pauseStat[i],40,270+35*i)
|
|
||||||
gc.printf(_[i],195,270+35*i,300,'right')
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
--Mods
|
|
||||||
if #GAME.mod>0 then
|
|
||||||
if scoreValid()then
|
|
||||||
gc.setColor(.7,.7,.7,T)
|
|
||||||
gc.rectangle('line',775,560,490,140)
|
|
||||||
gc.setColor(.7,.7,.7,T*.26)
|
|
||||||
gc.rectangle('fill',775,560,490,140)
|
|
||||||
else
|
|
||||||
gc.setColor(1,0,0,T)
|
|
||||||
gc.rectangle('line',775,560,490,140)
|
|
||||||
gc.setColor(1,0,0,T*.26)
|
|
||||||
gc.rectangle('fill',775,560,490,140)
|
|
||||||
end
|
|
||||||
setFont(35)
|
|
||||||
for _,M in next,MODOPT do
|
|
||||||
if M.sel>0 then
|
|
||||||
_=M.color
|
|
||||||
gc.setColor(_[1],_[2],_[3],T)
|
|
||||||
mStr(M.id,810+M.no%8*60,560+math.floor(M.no/8)*45)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
--Level rank
|
--Level rank
|
||||||
if GAME.rank>0 then
|
if GAME.rank>0 then
|
||||||
|
gc.push('transform')
|
||||||
|
gc.translate(1090,50)
|
||||||
local str=text.ranks[GAME.rank]
|
local str=text.ranks[GAME.rank]
|
||||||
setFont(80)
|
setFont(80)
|
||||||
gc.setColor(0,0,0,T*.7)
|
gc.setColor(0,0,0,T*.7)
|
||||||
gc.print(str,100*T^.5-5,-14,nil,1.8)
|
gc.print(str,-5,-4,nil,1.5)
|
||||||
local L=rankColor[GAME.rank]
|
local L=rankColor[GAME.rank]
|
||||||
gc.setColor(L[1],L[2],L[3],T)
|
gc.setColor(L[1],L[2],L[3],T)
|
||||||
gc.print(str,100*T^.5,-10,nil,1.8)
|
gc.print(str,0,0,nil,1.5)
|
||||||
|
gc.pop()
|
||||||
|
end
|
||||||
|
|
||||||
|
--Infos
|
||||||
|
if PLAYERS[1].frameRun>180 then
|
||||||
|
gc.push('transform')
|
||||||
|
gc.translate(830,220)
|
||||||
|
gc.scale(.85)
|
||||||
|
gc.setLineWidth(2)
|
||||||
|
|
||||||
|
--Frame
|
||||||
|
gc.setColor(.97,.97,.97,T*.05)
|
||||||
|
gc.rectangle('fill',-5,-5,475,360,8)
|
||||||
|
gc.setColor(.97,.97,.97,T)
|
||||||
|
gc.rectangle('line',-5,-5,475,360,8)
|
||||||
|
|
||||||
|
--Stats
|
||||||
|
_=form
|
||||||
|
setFont(25)
|
||||||
|
for i=1,10 do
|
||||||
|
gc.print(text.pauseStat[i],5,35*(i-1))
|
||||||
|
gc.printf(_[i],160,35*(i-1),300,'right')
|
||||||
|
end
|
||||||
|
|
||||||
|
--Finesse rank & trophy
|
||||||
|
if rank then
|
||||||
|
setFont(40)
|
||||||
|
local c=fnsRankColor[rank]
|
||||||
|
gc.setColor(c[1],c[2],c[3],T)
|
||||||
|
gc.print(rank,440,344)
|
||||||
|
if trophy then
|
||||||
|
setFont(20)
|
||||||
|
gc.setColor(trophyColor[1],trophyColor[2],trophyColor[3],T*2-1)
|
||||||
|
gc.printf(trophy,130-120*(1-T^.5),359,300,'right')
|
||||||
|
end
|
||||||
|
end
|
||||||
|
gc.pop()
|
||||||
end
|
end
|
||||||
|
|
||||||
--Radar Chart
|
--Radar Chart
|
||||||
if T>.5 and PLAYERS[1].frameRun>180 then
|
if T>.5 and PLAYERS[1].frameRun>180 then
|
||||||
T=T*2-1
|
local t=T*2-1
|
||||||
gc.setLineWidth(2)
|
gc.setLineWidth(2)
|
||||||
gc.push('transform')
|
gc.push('transform')
|
||||||
gc.translate(1026,370)
|
gc.translate(640,390)
|
||||||
gc.scale(.9)
|
gc.scale(.67)
|
||||||
|
|
||||||
--Polygon
|
--Polygon
|
||||||
gc.push('transform')
|
gc.push('transform')
|
||||||
gc.scale((3-2*T)*T)
|
gc.scale((3-2*t)*t)
|
||||||
gc.setColor(1,1,1,T*(.5+.3*sin(TIME()*6.26)))gc.polygon('line',standard)
|
gc.setColor(.97,.97,.97,t*(.5+.3*sin(TIME()*6.26)))gc.polygon('line',standard)
|
||||||
gc.setColor(chartColor[1],chartColor[2],chartColor[3],T*.626)
|
gc.setColor(chartColor[1],chartColor[2],chartColor[3],t*.626)
|
||||||
for i=1,9,2 do
|
for i=1,9,2 do
|
||||||
gc.polygon('fill',0,0,val[i],val[i+1],val[i+2],val[i+3])
|
gc.polygon('fill',0,0,val[i],val[i+1],val[i+2],val[i+3])
|
||||||
end
|
end
|
||||||
gc.polygon('fill',0,0,val[11],val[12],val[1],val[2])
|
gc.polygon('fill',0,0,val[11],val[12],val[1],val[2])
|
||||||
gc.setColor(1,1,1,T)gc.polygon('line',val)
|
gc.setColor(.97,.97,.97,t)gc.polygon('line',val)
|
||||||
gc.pop()
|
gc.pop()
|
||||||
|
|
||||||
--Axes
|
--Axes
|
||||||
gc.setColor(1,1,1,T)
|
gc.setColor(.97,.97,.97,t)
|
||||||
for i=1,3 do
|
for i=1,3 do
|
||||||
local x,y=hexList[2*i-1],hexList[2*i]
|
local x,y=hexList[2*i-1],hexList[2*i]
|
||||||
gc.line(-x,-y,x,y)
|
gc.line(-x,-y,x,y)
|
||||||
@@ -297,11 +277,11 @@ function scene.draw()
|
|||||||
local C
|
local C
|
||||||
_=TIME()%6.2832
|
_=TIME()%6.2832
|
||||||
if _>3.1416 then
|
if _>3.1416 then
|
||||||
gc.setColor(1,1,1,-T*sin(_))
|
gc.setColor(.97,.97,.97,-t*sin(_))
|
||||||
setFont(35)
|
setFont(35)
|
||||||
C,_=text.radar,textPos
|
C,_=text.radar,textPos
|
||||||
else
|
else
|
||||||
gc.setColor(1,1,1,T*sin(_))
|
gc.setColor(.97,.97,.97,t*sin(_))
|
||||||
setFont(20)
|
setFont(20)
|
||||||
C,_=radar,dataPos
|
C,_=radar,dataPos
|
||||||
end
|
end
|
||||||
@@ -310,15 +290,43 @@ function scene.draw()
|
|||||||
end
|
end
|
||||||
gc.pop()
|
gc.pop()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--Mods
|
||||||
|
gc.push('transform')
|
||||||
|
gc.translate(735,555)
|
||||||
|
gc.scale()
|
||||||
|
if #GAME.mod>0 then
|
||||||
|
gc.setLineWidth(2)
|
||||||
|
if scoreValid()then
|
||||||
|
gc.setColor(.7,.7,.7,T)
|
||||||
|
gc.rectangle('line',-5,-5,500,150,8)
|
||||||
|
gc.setColor(.7,.7,.7,T*.04)
|
||||||
|
gc.rectangle('fill',-5,-5,500,150,8)
|
||||||
|
else
|
||||||
|
gc.setColor(.95,0,0,T)
|
||||||
|
gc.rectangle('line',-5,-5,500,150,8)
|
||||||
|
gc.setColor(.95,0,0,T*.26)
|
||||||
|
gc.rectangle('fill',-5,-5,500,150,8)
|
||||||
|
end
|
||||||
|
setFont(35)
|
||||||
|
for _,M in next,MODOPT do
|
||||||
|
if M.sel>0 then
|
||||||
|
_=M.color
|
||||||
|
gc.setColor(_[1],_[2],_[3],T)
|
||||||
|
mStr(M.id,35+M.no%8*60,math.floor(M.no/8)*45)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
gc.pop()
|
||||||
end
|
end
|
||||||
|
|
||||||
scene.widgetList={
|
scene.widgetList={
|
||||||
WIDGET.newButton{name="setting", x=1120,y=70,w=240,h=90, color='lB',code=pressKey"s",hideF=function()return GAME.fromRepMenu end},
|
WIDGET.newKey{name="resume", x=290,y=240,w=300,h=70,code=pressKey"escape"},
|
||||||
WIDGET.newButton{name="replay", x=535,y=240,w=200,h=100,color='lY',code=pressKey"p",hideF=function()return not(GAME.result or GAME.replaying)or #PLAYERS>1 end},
|
WIDGET.newKey{name="restart", x=290,y=340,w=300,h=70,code=pressKey"r",hideF=function()return GAME.fromRepMenu end},
|
||||||
WIDGET.newButton{name="save", x=745,y=240,w=200,h=100,color='lP',code=pressKey"o",hideF=function()return not(GAME.result or GAME.replaying)or #PLAYERS>1 or GAME.saved end},
|
WIDGET.newKey{name="setting", x=290,y=440,w=300,h=70,code=pressKey"s",hideF=function()return GAME.fromRepMenu end},
|
||||||
WIDGET.newButton{name="resume", x=640,y=357,w=240,h=100,color='lG',code=pressKey"escape"},
|
WIDGET.newKey{name="quit", x=290,y=540,w=300,h=70,code=backScene},
|
||||||
WIDGET.newButton{name="restart", x=640,y=473,w=240,h=100,color='lR',code=pressKey"r",hideF=function()return GAME.fromRepMenu end},
|
WIDGET.newKey{name="replay", x=0,y=0,w=50,h=50,code=pressKey"p",hideF=function()return not(GAME.result or GAME.replaying)or #PLAYERS>1 end},
|
||||||
WIDGET.newButton{name="quit", x=640,y=590,w=240,h=100,font=35,code=backScene},
|
WIDGET.newKey{name="save", x=0,y=0,w=50,h=50,code=pressKey"o",hideF=function()return not(GAME.result or GAME.replaying)or #PLAYERS>1 or GAME.saved end},
|
||||||
}
|
}
|
||||||
|
|
||||||
return scene
|
return scene
|
||||||
Reference in New Issue
Block a user