再修改地图ui和暂停界面rank显示
This commit is contained in:
@@ -291,6 +291,14 @@ do--BLOCKS
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
rankColor={
|
||||||
|
{.6,.3,.3,.9},
|
||||||
|
{.7,.5,.3,.9},
|
||||||
|
{.9,.7,.6,.9},
|
||||||
|
{.7,.9,1,.9},
|
||||||
|
{.9,.9,.7,.9},
|
||||||
|
}
|
||||||
|
|
||||||
minoColor={
|
minoColor={
|
||||||
COLOR.red,
|
COLOR.red,
|
||||||
COLOR.fire,
|
COLOR.fire,
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ local ms,kb,tc=love.mouse,love.keyboard,love.touch
|
|||||||
|
|
||||||
local max,min=math.max,math.min
|
local max,min=math.max,math.min
|
||||||
local int,abs=math.floor,math.abs
|
local int,abs=math.floor,math.abs
|
||||||
local sin,cos=math.sin,math.cos
|
|
||||||
|
|
||||||
local mapCam={
|
local mapCam={
|
||||||
sel=false,--Selected mode ID
|
sel=false,--Selected mode ID
|
||||||
@@ -185,13 +184,15 @@ function scene.update()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local rankColor={
|
--D/C/B/A/S/special
|
||||||
{.4,.1,.1}, --D
|
local baseRankColor={
|
||||||
{.4,.35,.3}, --C
|
[0]={0,0,0,.3},
|
||||||
{.6,.4,.2}, --B
|
{.4,.1,.1,.3},
|
||||||
{.7,.75,.85}, --A
|
{.4,.35,.3,.3},
|
||||||
{.95,.9,.3}, --S
|
{.6,.4,.2,.3},
|
||||||
{.2,.7,.2}, --Special
|
{.7,.75,.85,.3},
|
||||||
|
{.85,.8,.3,.3},
|
||||||
|
{.4,.7,.4,.3},
|
||||||
}
|
}
|
||||||
function scene.draw()
|
function scene.draw()
|
||||||
local _
|
local _
|
||||||
@@ -218,14 +219,15 @@ function scene.draw()
|
|||||||
|
|
||||||
--Modes
|
--Modes
|
||||||
setFont(80)
|
setFont(80)
|
||||||
|
gc.setLineWidth(6)
|
||||||
for name,M in next,MODES do
|
for name,M in next,MODES do
|
||||||
if R[name]then
|
if R[name]then
|
||||||
|
local rank=R[name]
|
||||||
local S=M.size
|
local S=M.size
|
||||||
gc.setColor(1,1,1)
|
|
||||||
gc.setLineWidth(4)
|
|
||||||
|
|
||||||
--Frame & fill
|
--Frame & fill
|
||||||
local drawType="line"
|
gc.setColor(baseRankColor[rank])
|
||||||
|
local drawType="fill"
|
||||||
::again::
|
::again::
|
||||||
if M.shape==1 then--Rectangle
|
if M.shape==1 then--Rectangle
|
||||||
gc.rectangle(drawType,M.x-S,M.y-S,2*S,2*S)
|
gc.rectangle(drawType,M.x-S,M.y-S,2*S,2*S)
|
||||||
@@ -234,36 +236,26 @@ function scene.draw()
|
|||||||
elseif M.shape==3 then--Octagon
|
elseif M.shape==3 then--Octagon
|
||||||
gc.circle(drawType,M.x,M.y,S+6,8)
|
gc.circle(drawType,M.x,M.y,S+6,8)
|
||||||
end
|
end
|
||||||
if sel==name and drawType=="line"then
|
if drawType=="fill"then
|
||||||
gc.setColor(1,1,1,.42)
|
gc.setColor(1,1,sel==name and 0 or 1)
|
||||||
drawType="fill"
|
drawType="line"
|
||||||
goto again
|
goto again
|
||||||
end
|
end
|
||||||
|
|
||||||
--Icon
|
--Icon
|
||||||
local icon=M.icon
|
local icon=M.icon
|
||||||
if icon then
|
if icon then
|
||||||
|
gc.setColor(.8,.8,.8)
|
||||||
local length=icon:getWidth()*.5
|
local length=icon:getWidth()*.5
|
||||||
local k=S/length
|
gc.draw(icon,M.x,M.y,nil,S/length,nil,length,length)
|
||||||
if R[M.name]>0 then
|
|
||||||
gc.setColor(.95,.95,.95)
|
|
||||||
for j=1,4 do
|
|
||||||
local t=TIME()*3+1.57*j
|
|
||||||
gc.draw(icon,M.x+2.6*cos(t),M.y+2.6*sin(t),nil,k,nil,length,length)
|
|
||||||
end
|
|
||||||
gc.setColor(rankColor[R[M.name]])
|
|
||||||
else
|
|
||||||
gc.setColor(.6,.6,.6)
|
|
||||||
end
|
|
||||||
gc.draw(icon,M.x,M.y,nil,k,nil,length,length)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
--Rank
|
--Rank
|
||||||
name=text.ranks[R[M.name]]
|
name=text.ranks[rank]
|
||||||
if name then
|
if name then
|
||||||
gc.setColor(0,0,0,.8)
|
gc.setColor(0,0,0,.8)
|
||||||
mStr(name,M.x+M.size*.7,M.y-50-M.size*.7)
|
mStr(name,M.x+M.size*.7,M.y-50-M.size*.7)
|
||||||
gc.setColor(.9,.9,.9)
|
gc.setColor(rankColor[rank])
|
||||||
mStr(name,M.x+M.size*.7+4,M.y-50-M.size*.7-4)
|
mStr(name,M.x+M.size*.7+4,M.y-50-M.size*.7-4)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -262,7 +262,8 @@ function scene.draw()
|
|||||||
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,100*T^.5-5,-14,nil,1.8)
|
||||||
gc.setColor(1,1,1,T)
|
local L=rankColor[GAME.rank]
|
||||||
|
gc.setColor(L[1],L[2],L[3],T)
|
||||||
gc.print(str,100*T^.5,-10,nil,1.8)
|
gc.print(str,100*T^.5,-10,nil,1.8)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user