调整游戏内ui和控件ui:
默认背景色调整 减少纯白色使用 减小线宽 增加圆角
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
local gc_clear=love.graphics.clear
|
||||
local BGs={
|
||||
none={draw=function()gc_clear(.08,.08,.09)end}
|
||||
none={draw=function()gc_clear(.08,.08,.084)end}
|
||||
}
|
||||
local BGlist={'none'}
|
||||
local BG={
|
||||
|
||||
@@ -54,7 +54,7 @@ local COLOR={
|
||||
dGray= {0.3, 0.3, 0.3},
|
||||
gray= {0.6, 0.6, 0.6},
|
||||
lGray= {0.8, 0.8, 0.8},
|
||||
white= {1.0, 1.0, 1.0},
|
||||
white= {.97, .97, .97},
|
||||
}
|
||||
for k,v in next,{
|
||||
R='red',F='fire',O='orange',Y='yellow',L='lime',J='jade',G='green',A='aqua',C='cyan',N='navy',S='sea',B='blue',V='violet',P='purple',M='magenta',W='wine',
|
||||
|
||||
@@ -166,39 +166,43 @@ function button:draw()
|
||||
local ATV=self.ATV
|
||||
local c=self.color
|
||||
local r,g,b=c[1],c[2],c[3]
|
||||
gc_setColor(.2+r*.8,.2+g*.8,.2+b*.8,.7)
|
||||
gc_rectangle('fill',x-ATV,y-ATV,w+2*ATV,h+2*ATV)
|
||||
|
||||
--Button
|
||||
gc_setColor(.15+r*.7,.15+g*.7,.15+b*.7,.9)
|
||||
gc_rectangle('fill',x-ATV,y-ATV,w+2*ATV,h+2*ATV,3)
|
||||
if ATV>0 then
|
||||
gc_setLineWidth(4)
|
||||
gc_setColor(1,1,1,ATV*.125)
|
||||
gc_rectangle('line',x-ATV+2,y-ATV+2,w+2*ATV-4,h+2*ATV-4)
|
||||
gc_setLineWidth(2)
|
||||
gc_setColor(.97,.97,.975,ATV*.125)
|
||||
gc_rectangle('line',x-ATV+2,y-ATV+2,w+2*ATV-4,h+2*ATV-4,3)
|
||||
end
|
||||
|
||||
--Object
|
||||
local obj=self.obj
|
||||
local y0=y+h*.5-ATV*.5
|
||||
gc_setColor(1,1,1,.2+ATV*.05)
|
||||
if self.align=='M'then
|
||||
local x0=x+w*.5
|
||||
mDraw(obj,x0-1.5,y0-1.5)
|
||||
mDraw(obj,x0-1.5,y0+1.5)
|
||||
mDraw(obj,x0+1.5,y0-1.5)
|
||||
mDraw(obj,x0+1.5,y0+1.5)
|
||||
gc_setColor(r*.5,g*.5,b*.5)
|
||||
mDraw(obj,x0-1,y0-1)
|
||||
mDraw(obj,x0-1,y0+1)
|
||||
mDraw(obj,x0+1,y0-1)
|
||||
mDraw(obj,x0+1,y0+1)
|
||||
gc_setColor(r*.55,g*.55,b*.55)
|
||||
mDraw(obj,x0,y0)
|
||||
elseif self.align=='L'then
|
||||
local edge=self.edge
|
||||
mDraw_Y(obj,x+edge-1.5,y0-1.5)
|
||||
mDraw_Y(obj,x+edge-1.5,y0+1.5)
|
||||
mDraw_Y(obj,x+edge+1.5,y0-1.5)
|
||||
mDraw_Y(obj,x+edge+1.5,y0+1.5)
|
||||
gc_setColor(r*.5,g*.5,b*.5)
|
||||
mDraw_Y(obj,x+edge-1,y0-1)
|
||||
mDraw_Y(obj,x+edge-1,y0+1)
|
||||
mDraw_Y(obj,x+edge+1,y0-1)
|
||||
mDraw_Y(obj,x+edge+1,y0+1)
|
||||
gc_setColor(r*.55,g*.55,b*.55)
|
||||
mDraw_Y(obj,x+edge,y0)
|
||||
elseif self.align=='R'then
|
||||
local x0=x+w-self.edge-obj:getWidth()
|
||||
mDraw_Y(obj,x0-1.5,y0-1.5)
|
||||
mDraw_Y(obj,x0-1.5,y0+1.5)
|
||||
mDraw_Y(obj,x0+1.5,y0-1.5)
|
||||
mDraw_Y(obj,x0+1.5,y0+1.5)
|
||||
gc_setColor(r*.5,g*.5,b*.5)
|
||||
mDraw_Y(obj,x0-1,y0-1)
|
||||
mDraw_Y(obj,x0-1,y0+1)
|
||||
mDraw_Y(obj,x0+1,y0-1)
|
||||
mDraw_Y(obj,x0+1,y0+1)
|
||||
gc_setColor(r*.55,g*.55,b*.55)
|
||||
mDraw_Y(obj,x0,y0)
|
||||
end
|
||||
end
|
||||
@@ -290,11 +294,11 @@ function key:draw()
|
||||
local r,g,b=c[1],c[2],c[3]
|
||||
|
||||
gc_setColor(1,1,1,ATV*.1)
|
||||
gc_rectangle('fill',x,y,w,h)
|
||||
gc_rectangle('fill',x,y,w,h,3)
|
||||
|
||||
gc_setColor(.2+r*.8,.2+g*.8,.2+b*.8,.7)
|
||||
gc_setLineWidth(4)
|
||||
gc_rectangle('line',x,y,w,h)
|
||||
gc_setLineWidth(2)
|
||||
gc_rectangle('line',x,y,w,h,3)
|
||||
|
||||
gc_setColor(r,g,b,1.2)
|
||||
if self.align=='M'then
|
||||
@@ -375,22 +379,22 @@ function switch:draw()
|
||||
local x,y=self.x,self.y-25
|
||||
local ATV=self.ATV
|
||||
|
||||
--Frame
|
||||
gc_setLineWidth(2)
|
||||
gc_setColor(1,1,1,.6+ATV*.1)
|
||||
gc_rectangle('line',x,y,50,50,3)
|
||||
|
||||
--Checked
|
||||
if ATV>0 then
|
||||
gc_setColor(1,1,1,ATV*.08)
|
||||
gc_rectangle('fill',x,y,50,50)
|
||||
gc_setColor(1,1,1,ATV*.06)
|
||||
gc_rectangle('fill',x,y,50,50,3)
|
||||
end
|
||||
if self.CHK>0 then
|
||||
gc_setColor(.9,1,.9,self.CHK/6)
|
||||
gc_setLineWidth(6)
|
||||
gc_setLineWidth(5)
|
||||
gc_line(x+5,y+25,x+18,y+38,x+45,y+11)
|
||||
end
|
||||
|
||||
--Frame
|
||||
gc_setLineWidth(4)
|
||||
gc_setColor(1,1,1,.6+ATV*.05)
|
||||
gc_rectangle('line',x,y,50,50)
|
||||
|
||||
--Drawable
|
||||
gc_setColor(self.color)
|
||||
mDraw_Y(self.obj,x-12-ATV-self.obj:getWidth(),y+25)
|
||||
@@ -501,16 +505,19 @@ function slider:draw()
|
||||
local cx=x+(x2-x)*self.pos/self.unit
|
||||
local bx,by,bw,bh=cx-10-ATV*.5,y-16-ATV,20+ATV,32+2*ATV
|
||||
gc_setColor(.8,.8,.8)
|
||||
gc_rectangle('fill',bx,by,bw,bh)
|
||||
gc_rectangle('fill',bx,by,bw,bh,3)
|
||||
|
||||
--Glow
|
||||
if ATV>0 then
|
||||
gc_setLineWidth(2)
|
||||
gc_setColor(1,1,1,ATV*.16)
|
||||
gc_rectangle('line',bx+1,by+1,bw-2,bh-2)
|
||||
gc_setColor(.97,.97,.975,ATV*.16)
|
||||
gc_rectangle('line',bx+1,by+1,bw-2,bh-2,3)
|
||||
end
|
||||
|
||||
--Float text
|
||||
if self.TAT>0 and self.show then
|
||||
setFont(25)
|
||||
gc_setColor(1,1,1,self.TAT/180)
|
||||
gc_setColor(.97,.97,.975,self.TAT/180)
|
||||
mStr(self:show(),cx,by-30)
|
||||
end
|
||||
|
||||
@@ -657,10 +664,12 @@ function selector:draw()
|
||||
local w=self.w
|
||||
local ATV=self.ATV
|
||||
|
||||
--Frame
|
||||
gc_setColor(1,1,1,.6+ATV*.1)
|
||||
gc_setLineWidth(3)
|
||||
gc_rectangle('line',x,y,w,60)
|
||||
gc_setLineWidth(2)
|
||||
gc_rectangle('line',x,y,w,60,3)
|
||||
|
||||
--Arrow
|
||||
gc_setColor(1,1,1,.2+ATV*.1)
|
||||
local t=(TIME()%.5)^.5
|
||||
if self.select>1 then
|
||||
@@ -815,11 +824,11 @@ function inputBox:draw()
|
||||
local ATV=self.ATV
|
||||
|
||||
gc_setColor(1,1,1,ATV*.08)
|
||||
gc_rectangle('fill',x,y,w,h)
|
||||
gc_rectangle('fill',x,y,w,h,3)
|
||||
|
||||
gc_setColor(1,1,1)
|
||||
gc_setLineWidth(3)
|
||||
gc_rectangle('line',x,y,w,h)
|
||||
gc_rectangle('line',x,y,w,h,3)
|
||||
|
||||
--Drawable
|
||||
setFont(self.font)
|
||||
@@ -971,12 +980,12 @@ function textBox:draw()
|
||||
|
||||
--Background
|
||||
gc_setColor(0,0,0,.4)
|
||||
gc_rectangle('fill',x,y,w,h)
|
||||
gc_rectangle('fill',x,y,w,h,3)
|
||||
|
||||
--Frame
|
||||
gc_setLineWidth(3)
|
||||
gc_setLineWidth(2)
|
||||
gc_setColor(WIDGET.sel==self and COLOR.lN or COLOR.Z)
|
||||
gc_rectangle('line',x,y,w,h)
|
||||
gc_rectangle('line',x,y,w,h,3)
|
||||
|
||||
--Texts
|
||||
setFont(self.font)
|
||||
@@ -987,12 +996,12 @@ function textBox:draw()
|
||||
gc_setColor(1,1,1)
|
||||
if #texts>cap then
|
||||
local len=h*h/(#texts*lineH)
|
||||
gc_rectangle('fill',-15,(h-len)*scrollPos/((#texts-cap)*lineH),12,len)
|
||||
gc_rectangle('fill',-15,(h-len)*scrollPos/((#texts-cap)*lineH),12,len,3)
|
||||
end
|
||||
|
||||
--Clear button
|
||||
if not self.fix then
|
||||
gc_rectangle('line',w-40,0,40,40)
|
||||
gc_rectangle('line',w-40,0,40,40,3)
|
||||
gc_draw(self.sure==0 and clearIcon or sureIcon,w-40,0)
|
||||
end
|
||||
|
||||
@@ -1144,14 +1153,14 @@ function listBox:draw()
|
||||
|
||||
--Frame
|
||||
gc_setColor(WIDGET.sel==self and COLOR.lN or COLOR.Z)
|
||||
gc_setLineWidth(3)
|
||||
gc_rectangle('line',0,0,w,h)
|
||||
gc_setLineWidth(2)
|
||||
gc_rectangle('line',0,0,w,h,3)
|
||||
|
||||
--Slider
|
||||
if #list>cap then
|
||||
gc_setColor(1,1,1)
|
||||
local len=h*h/(#list*lineH)
|
||||
gc_rectangle('fill',-15,(h-len)*scrollPos/((#list-cap)*lineH),12,len)
|
||||
gc_rectangle('fill',-15,(h-len)*scrollPos/((#list-cap)*lineH),12,len,3)
|
||||
end
|
||||
|
||||
--List
|
||||
|
||||
@@ -16,7 +16,7 @@ function back.update(dt)
|
||||
t=t+dt
|
||||
end
|
||||
function back.draw()
|
||||
gc.clear(.1,.1,.1)
|
||||
gc.clear(.08,.08,.084)
|
||||
shader:send('t',t)
|
||||
gc.setShader(shader)
|
||||
gc.rectangle('fill',0,0,SCR.w,SCR.h)
|
||||
|
||||
@@ -15,7 +15,7 @@ function back.update(dt)
|
||||
t=t+dt
|
||||
end
|
||||
function back.draw()
|
||||
gc.clear(.1,.1,.1)
|
||||
gc.clear(.08,.08,.084)
|
||||
shader:send('t',t)
|
||||
gc.setShader(shader)
|
||||
gc.rectangle('fill',0,0,SCR.w,SCR.h)
|
||||
|
||||
@@ -15,7 +15,7 @@ function back.update(dt)
|
||||
t=t+dt
|
||||
end
|
||||
function back.draw()
|
||||
gc.clear(.1,.1,.1)
|
||||
gc.clear(.08,.08,.084)
|
||||
shader:send('t',t)
|
||||
gc.setShader(shader)
|
||||
gc.rectangle('fill',0,0,SCR.w,SCR.h)
|
||||
|
||||
@@ -40,7 +40,7 @@ function back.update()
|
||||
end
|
||||
end
|
||||
function back.draw()
|
||||
gc.clear(.1,.1,.1)
|
||||
gc.clear(.08,.08,.084)
|
||||
for i=1,#mino do
|
||||
local C=mino[i]
|
||||
local c=C.color
|
||||
|
||||
@@ -37,7 +37,7 @@ function back.update(dt)
|
||||
end
|
||||
end
|
||||
function back.draw()
|
||||
gc.clear(.1,.1,.1)
|
||||
gc.clear(.08,.08,.084)
|
||||
gc.setColor(1,1,1,.2)
|
||||
local img=IMG.lanterns
|
||||
for i=1,#lanterns do
|
||||
|
||||
@@ -29,7 +29,7 @@ end
|
||||
function back.update()
|
||||
end
|
||||
function back.draw()
|
||||
gc.clear(.1,.1,.1)
|
||||
gc.clear(.08,.08,.084)
|
||||
gc.draw(upCover,0,0,0,W,H*.3/64)
|
||||
gc.draw(downCover,0,H*.7,0,W,H*.3/64)
|
||||
end
|
||||
|
||||
@@ -16,7 +16,7 @@ function back.update(dt)
|
||||
t=t+dt
|
||||
end
|
||||
function back.draw()
|
||||
gc.clear(.1,.1,.1)
|
||||
gc.clear(.08,.08,.084)
|
||||
shader:send('t',t)
|
||||
gc.setShader(shader)
|
||||
gc.rectangle('fill',0,0,SCR.w,SCR.h)
|
||||
|
||||
@@ -16,7 +16,7 @@ function back.update(dt)
|
||||
t=t+dt
|
||||
end
|
||||
function back.draw()
|
||||
gc.clear(.1,.1,.1)
|
||||
gc.clear(.08,.08,.084)
|
||||
shader:send('t',t)
|
||||
gc.setShader(shader)
|
||||
gc.rectangle('fill',0,0,SCR.w,SCR.h)
|
||||
|
||||
@@ -38,7 +38,7 @@ function back.update()
|
||||
end
|
||||
end
|
||||
function back.draw()
|
||||
gc.clear(.1,.1,.1)
|
||||
gc.clear(.08,.08,.084)
|
||||
gc.setColor(.7,.7,.7)
|
||||
for i=1,#snow do
|
||||
local P=snow[i]
|
||||
|
||||
@@ -31,7 +31,7 @@ function back.update()
|
||||
end
|
||||
end
|
||||
function back.draw()
|
||||
gc.clear(.1,.1,.1)
|
||||
gc.clear(.08,.08,.084)
|
||||
if not stars[1]then return end
|
||||
gc.translate(-10,-10)
|
||||
gc.setColor(1,1,1,.6)
|
||||
|
||||
@@ -29,7 +29,7 @@ function back.update(dt)
|
||||
end
|
||||
end
|
||||
function back.draw()
|
||||
gc.clear(.1,.1,.1)
|
||||
gc.clear(.08,.08,.084)
|
||||
gc.setColor(1,1,1,.1)
|
||||
for i=1,#ring do
|
||||
local r=ring[i]^2/12
|
||||
|
||||
@@ -16,7 +16,7 @@ function back.draw()
|
||||
if -t%13.55<.1283 then
|
||||
gc.clear(.2+.1*sin(t),.2+.1*sin(1.26*t),.2+.1*sin(1.626*t))
|
||||
else
|
||||
gc.clear(.1,.1,.1)
|
||||
gc.clear(.08,.08,.084)
|
||||
end
|
||||
gc.push('transform')
|
||||
gc.translate(SCR.cx,SCR.cy+20*sin(t*.02))
|
||||
|
||||
@@ -29,12 +29,14 @@ local hideBoardStencil={
|
||||
down=function()gc_rectangle('fill',0,300,300,300)end,
|
||||
all=function()gc_rectangle('fill',0,0,300,600)end,
|
||||
}
|
||||
local dialFrame=DOGC{70,70,
|
||||
local dialFrame=DOGC{97,32,
|
||||
{'setLW',2},
|
||||
{'dCirc',35,35,30,6},
|
||||
{'setCL',1,1,1,.6},
|
||||
{'setLW',4},
|
||||
{'dCirc',35,35,30,6},
|
||||
{'dRect',1,1,30,30,3},
|
||||
{'dRect',36,1,60,30,3},
|
||||
}
|
||||
local dialNeedle=DOGC{22,4,
|
||||
{'fRect',0,1,20,2},
|
||||
{'fCirc',20,2,2},
|
||||
}
|
||||
local multiple=DOGC{15,15,
|
||||
{'setLW',3},
|
||||
@@ -51,11 +53,13 @@ local spinCenterImg=DOGC{9,9,
|
||||
{'setCL',1,1,1},
|
||||
{'fRect',3,3,3,3},
|
||||
}
|
||||
local playerBoarders=DOGC{334,614,
|
||||
local playerBoarders=DOGC{334,620,
|
||||
{'setLW',2},
|
||||
{'dRect',16,1,302,612},
|
||||
{'dRect',318,9,15,604},
|
||||
{'dRect',1,9,15,604},
|
||||
{'setCL',.97,.97,.975},
|
||||
{'dRect',16,1,302,618,7},
|
||||
{'fRect',17,612,300,2},
|
||||
{'dRect',318,9,15,596,3},
|
||||
{'dRect',1,9,15,596,3},
|
||||
}
|
||||
local gridLines do
|
||||
local L={300,640,{'setLW',2}}
|
||||
@@ -63,7 +67,7 @@ local gridLines do
|
||||
for y=0,20 do table.insert(L,{'line',0,10+30*y,300,10+30*y})end
|
||||
gridLines=DOGC(L)
|
||||
end
|
||||
local LDmarks=gc.newSpriteBatch(DOGC{14,5,{'clear',1,1,1}},15,'static')
|
||||
local LDmarks=gc.newSpriteBatch(DOGC{14,5,{'fRect',0,0,14,5,3}},15,'static')
|
||||
for i=0,14 do LDmarks:add(3+20*i,615)end
|
||||
local bpmImage=DOGC{31,12,
|
||||
{'setFT',15},
|
||||
@@ -322,7 +326,7 @@ local function drawBuffer(P)
|
||||
for i=1,#P.atkBuffer do
|
||||
local A=P.atkBuffer[i]
|
||||
local bar=A.amount*30
|
||||
if h+bar>600 then bar=600-h end
|
||||
if h+bar>600-8 then bar=600-8-h end
|
||||
if not A.sent then
|
||||
--Appear
|
||||
if A.time<20 then
|
||||
@@ -331,24 +335,24 @@ local function drawBuffer(P)
|
||||
if A.countdown>0 then
|
||||
--Timing
|
||||
gc_setColor(attackColor[A.lv][1])
|
||||
gc_rectangle('fill',303,599-h,11,-bar)
|
||||
gc_rectangle('fill',303,591-h-bar,11,bar,2)
|
||||
gc_setColor(1,1,1)
|
||||
for j=30,A.cd0-30,30 do
|
||||
gc_rectangle('fill',303,599-h-bar*(j/A.cd0),6,2)
|
||||
gc_rectangle('fill',303,591-h-bar*(j/A.cd0),6,2)
|
||||
end
|
||||
gc_setColor(attackColor[A.lv][2])
|
||||
gc_rectangle('fill',303,599-h-bar,11,bar*(1-A.countdown/A.cd0))
|
||||
gc_rectangle('fill',303,591-h-bar,11,bar*(1-A.countdown/A.cd0),2)
|
||||
else
|
||||
--Warning
|
||||
local a=math.sin((TIME()-i)*30)*.5+.5
|
||||
local c1,c2=attackColor[A.lv][1],attackColor[A.lv][2]
|
||||
gc_setColor(c1[1]*a+c2[1]*(1-a),c1[2]*a+c2[2]*(1-a),c1[3]*a+c2[3]*(1-a))
|
||||
gc_rectangle('fill',303,599-h,11,-bar)
|
||||
gc_rectangle('fill',303,591-h-bar,11,bar,2)
|
||||
end
|
||||
else
|
||||
gc_setColor(attackColor[A.lv][1])
|
||||
bar=bar*(20-A.time)*.05
|
||||
gc_rectangle('fill',303,599-h,11,-bar)
|
||||
gc_rectangle('fill',303,591-h-bar,11,bar,2)
|
||||
--Disappear
|
||||
end
|
||||
h=h+bar
|
||||
@@ -375,22 +379,22 @@ end
|
||||
local function drawB2Bbar(P)
|
||||
local a,b=P.b2b,P.b2b1 if a>b then a,b=b,a end
|
||||
gc_setColor(.8,1,.2)
|
||||
gc_rectangle('fill',-14,599,11,-b*.6)
|
||||
gc_setColor(P.b2b<40 and COLOR.Z or P.b2b<=800 and COLOR.lR or COLOR.lB)
|
||||
gc_rectangle('fill',-14,599,11,-a*.6)
|
||||
gc_rectangle('fill',-14,591,11,-b*.592)
|
||||
gc_setColor(P.b2b<50 and COLOR.Z or P.b2b<=800 and COLOR.lR or COLOR.lB)
|
||||
gc_rectangle('fill',-14,591,11,-a*.592)
|
||||
if TIME()%.5<.3 then
|
||||
gc_setColor(1,1,1)
|
||||
gc_rectangle('fill',-15,b<40 and 568.5 or 118.5,13,3)
|
||||
gc_rectangle('fill',-15,b<50 and 560 or 116,13,3,2)
|
||||
end
|
||||
end
|
||||
local function drawLDI(P,ENV)--Lock Delay Indicator
|
||||
if ENV.easyFresh then
|
||||
gc_setColor(1,1,1)
|
||||
gc_setColor(.97,.97,.975)
|
||||
else
|
||||
gc_setColor(1,.26,.26)
|
||||
gc_setColor(1,.5,.5)
|
||||
end
|
||||
if P.lockDelay>=0 then
|
||||
gc_rectangle('fill',0,602,300*P.lockDelay/ENV.lock,6)--Lock delay indicator
|
||||
gc_rectangle('fill',0,602,300*P.lockDelay/ENV.lock,4)
|
||||
end
|
||||
if P.freshTime>0 then
|
||||
LDmarks:setDrawRange(1,min(P.freshTime,15))
|
||||
@@ -404,22 +408,18 @@ local function drawHold(P)
|
||||
local holdQueue=P.holdQueue
|
||||
local N=ENV.holdCount*72
|
||||
gc_push('transform')
|
||||
gc_translate(-140,20)
|
||||
gc_setColor(0,0,0,.4)gc_rectangle('fill',0,0,124,N+8)
|
||||
gc_setColor(1,1,1)gc_rectangle('line',0,0,124,N+8)
|
||||
if #holdQueue<ENV.holdCount and P.nextQueue[1]then
|
||||
N=1
|
||||
else
|
||||
N=P.holdTime+1
|
||||
end
|
||||
gc_translate(12,20)
|
||||
gc_setColor(0,0,0,.4)gc_rectangle('fill',0,0,100,N+8,5)
|
||||
gc_setColor(.97,.97,.975)gc_rectangle('line',0,0,100,N+8,5)
|
||||
N=#holdQueue<ENV.holdCount and P.nextQueue[1]and 1 or P.holdTime+1
|
||||
gc_push('transform')
|
||||
gc_translate(62,40)
|
||||
gc_translate(50,40)
|
||||
gc_setShader(shader_blockSatur)
|
||||
for n=1,#holdQueue do
|
||||
if n==N then gc_setColor(.6,.4,.4)end
|
||||
local bk,clr=holdQueue[n].bk,holdQueue[n].color
|
||||
local texture=P.skinLib[clr]
|
||||
local k=#bk>2 and 2.2/#bk or 1
|
||||
local k=min(3/#bk,3/#bk[1],.85)
|
||||
gc_scale(k)
|
||||
for i=1,#bk do for j=1,#bk[1]do
|
||||
if bk[i][j]then
|
||||
@@ -434,10 +434,10 @@ local function drawHold(P)
|
||||
gc_pop()
|
||||
end
|
||||
local function drawDial(x,y,speed)
|
||||
gc_setColor(1,1,1)
|
||||
setFont(25)mStr(int(speed),x,y-18)
|
||||
gc_draw(dialFrame,x,y,nil,nil,nil,35,35)
|
||||
gc_draw(IMG.dialNeedle,x,y,2.094+(speed<=175 and .02094*speed or 4.712-52.36/(speed-125)),nil,nil,5,4)
|
||||
gc_setColor(.97,.97,.975)
|
||||
gc_draw(dialFrame,x,y)
|
||||
gc_draw(dialNeedle,x+26,y+26,speed<=175 and .00698*speed or 1.571-17.453/(speed-125),nil,nil,20,2)
|
||||
setFont(25)mStr(int(speed),x+66,y-2)
|
||||
end
|
||||
local function drawFinesseCombo_norm(P)
|
||||
if P.finesseCombo>2 then
|
||||
@@ -468,13 +468,13 @@ local function drawFinesseCombo_remote(P)
|
||||
elseif S.maxFinesseCombo==S.piece then
|
||||
gc_setColor(.7,.7,1)
|
||||
else
|
||||
gc_setColor(1,1,1)
|
||||
gc_setColor(.97,.97,.975)
|
||||
end
|
||||
gc_print(P.finesseCombo.."x",20,570)
|
||||
end
|
||||
end
|
||||
local function drawLife(life)
|
||||
gc_setColor(1,1,1)
|
||||
gc_setColor(.97,.97,.975)
|
||||
gc_draw(IMG.lifeIcon,475,595,nil,.8)
|
||||
if life>3 then
|
||||
gc_draw(multiple,502,602)
|
||||
@@ -494,7 +494,7 @@ local function drawMission(P)
|
||||
if P.gameEnv.missionkill then
|
||||
gc_setColor(1,.7+.2*sin(TIME()*6.26),.4)
|
||||
else
|
||||
gc_setColor(1,1,1)
|
||||
gc_setColor(.97,.97,.975)
|
||||
end
|
||||
gc_print(missionEnum[L[cur]],85,110)
|
||||
|
||||
@@ -538,18 +538,18 @@ draw.drawGhost=drawGhost
|
||||
function draw.drawNext_norm(P)
|
||||
local ENV=P.gameEnv
|
||||
local texture=P.skinLib
|
||||
gc_translate(316,20)
|
||||
gc_translate(488,20)
|
||||
local N=ENV.nextCount*72
|
||||
gc_setColor(0,0,0,.4)gc_rectangle('fill',0,0,124,N+8)
|
||||
gc_setColor(1,1,1)gc_rectangle('line',0,0,124,N+8)
|
||||
gc_setColor(0,0,0,.4)gc_rectangle('fill',0,0,100,N+8,5)
|
||||
gc_setColor(.97,.97,.975)gc_rectangle('line',0,0,100,N+8,5)
|
||||
N=1
|
||||
gc_push('transform')
|
||||
gc_translate(62,40)
|
||||
gc_translate(50,40)
|
||||
gc_setShader(shader_blockSatur)
|
||||
local queue=P.nextQueue
|
||||
while N<=ENV.nextCount and queue[N]do
|
||||
local bk,sprite=queue[N].bk,texture[queue[N].color]
|
||||
local k=#bk>2 and 2.2/#bk or 1
|
||||
local k=min(3/#bk,3/#bk[1],.85)
|
||||
gc_scale(k)
|
||||
for i=1,#bk do for j=1,#bk[1]do
|
||||
if bk[i][j]then
|
||||
@@ -566,18 +566,18 @@ function draw.drawNext_norm(P)
|
||||
if ENV.bagLine then
|
||||
gc_setColor(.8,.5,.5)
|
||||
for i=-P.pieceCount%ENV.bagLine,N-1,ENV.bagLine do--i=phase
|
||||
gc_rectangle('fill',2,72*i+3,120,2)
|
||||
gc_rectangle('fill',2,72*i+3,96,2)
|
||||
end
|
||||
end
|
||||
gc_translate(-316,-20)
|
||||
gc_translate(-488,-20)
|
||||
end
|
||||
function draw.drawNext_hidden(P)
|
||||
local ENV=P.gameEnv
|
||||
local texture=P.skinLib
|
||||
gc_translate(316,20)
|
||||
gc_translate(476,20)
|
||||
local N=ENV.nextCount*72
|
||||
gc_setColor(.5,0,0,.4)gc_rectangle('fill',0,0,124,N+8)
|
||||
gc_setColor(1,1,1)gc_rectangle('line',0,0,124,N+8)
|
||||
gc_setColor(.97,.97,.975)gc_rectangle('line',0,0,124,N+8)
|
||||
N=min(ENV.nextStartPos,P.pieceCount+1)
|
||||
gc_push('transform')
|
||||
gc_translate(62,40)
|
||||
@@ -585,7 +585,7 @@ function draw.drawNext_hidden(P)
|
||||
local queue=P.nextQueue
|
||||
while N<=ENV.nextCount and queue[N]do
|
||||
local bk,sprite=queue[N].bk,texture[queue[N].color]
|
||||
local k=#bk>2 and 2.2/#bk or 1
|
||||
local k=min(3/#bk,3/#bk[1],.85)
|
||||
gc_scale(k)
|
||||
for i=1,#bk do for j=1,#bk[1]do
|
||||
if bk[i][j]then
|
||||
@@ -602,10 +602,10 @@ function draw.drawNext_hidden(P)
|
||||
if ENV.bagLine then
|
||||
gc_setColor(.8,.5,.5)
|
||||
for i=-P.pieceCount%ENV.bagLine,N-1,ENV.bagLine do--i=phase
|
||||
gc_rectangle('fill',2,72*i+3,120,2)
|
||||
gc_rectangle('fill',2,72*i+3,96,2)
|
||||
end
|
||||
end
|
||||
gc_translate(-316,-20)
|
||||
gc_translate(-476,-20)
|
||||
end
|
||||
function draw.drawTargetLine(P,r)
|
||||
local d=P.fieldBeneath+P.fieldUp
|
||||
@@ -635,7 +635,7 @@ function draw.norm(P)
|
||||
|
||||
--Draw username
|
||||
setFont(30)
|
||||
gc_setColor(1,1,1)
|
||||
gc_setColor(.97,.97,.975)
|
||||
mStr(P.username,150,-60)
|
||||
|
||||
--Fill field
|
||||
@@ -730,8 +730,6 @@ function draw.norm(P)
|
||||
gc_setStencilTest()
|
||||
|
||||
gc_setLineWidth(2)
|
||||
P:drawNext()
|
||||
drawHold(P)
|
||||
drawBuffer(P)
|
||||
drawB2Bbar(P)
|
||||
drawLDI(P,ENV)
|
||||
@@ -797,6 +795,9 @@ function draw.norm(P)
|
||||
-- gc_line(0,600-P.garbageBeneath*30,300,600-P.garbageBeneath*30)
|
||||
gc_pop()
|
||||
|
||||
P:drawNext()
|
||||
drawHold(P)
|
||||
|
||||
--Mode informations
|
||||
if GAME.curMode.mesDisp then
|
||||
gc_setColor(1,1,1)
|
||||
@@ -805,13 +806,13 @@ function draw.norm(P)
|
||||
|
||||
--Speed dials & FinesseCombo
|
||||
if P.type=='remote'then
|
||||
drawDial(535,545,P.dropSpeed)
|
||||
drawDial(490,520,P.dropSpeed)
|
||||
drawFinesseCombo_remote(P)
|
||||
else
|
||||
drawDial(510,515,P.dropSpeed)
|
||||
drawDial(555,570,P.keySpeed)
|
||||
gc_draw(bpmImage,540,490)
|
||||
gc_draw(kpmImage,494,583)
|
||||
drawDial(490,490,P.dropSpeed)
|
||||
drawDial(490,550,P.keySpeed)
|
||||
gc_draw(bpmImage,550,525)
|
||||
gc_draw(kpmImage,550,585)
|
||||
drawFinesseCombo_norm(P)
|
||||
end
|
||||
|
||||
@@ -821,8 +822,8 @@ function draw.norm(P)
|
||||
gc_setColor(0,0,0,.3)
|
||||
gc_print(P.score1,18,509)
|
||||
gc_print(tm,18,539)
|
||||
gc_setColor(COLOR.lY)gc_print(P.score1,20,510)
|
||||
gc_setColor(COLOR.N)gc_print(tm,20,540)
|
||||
gc_setColor(.97,.97,.92)gc_print(P.score1,20,510)
|
||||
gc_setColor(.85,.9,1)gc_print(tm,20,540)
|
||||
|
||||
if P.life>0 then drawLife(P.life)end
|
||||
drawMission(P)
|
||||
@@ -897,10 +898,10 @@ function draw.demo(P)
|
||||
|
||||
--Frame
|
||||
gc_setColor(0,0,0,.6)
|
||||
gc_rectangle('fill',0,0,300,600)
|
||||
gc_rectangle('fill',0,0,300,600,3)
|
||||
gc_setLineWidth(2)
|
||||
gc_setColor(1,1,1)
|
||||
gc_rectangle('line',-1,-1,302,602)
|
||||
gc_setColor(.97,.97,.975)
|
||||
gc_rectangle('line',-1,-1,302,602,3)
|
||||
|
||||
gc_push('transform')
|
||||
gc_translate(0,600)
|
||||
|
||||
@@ -302,7 +302,7 @@ function scene.draw()
|
||||
|
||||
--Mode info
|
||||
gc.setColor(1,1,1,.8)
|
||||
gc.draw(drawableText.modeName,940,0)
|
||||
gc.draw(drawableText.modeName,1125-drawableText.modeName:getWidth(),10)
|
||||
|
||||
--Replaying
|
||||
if replaying then
|
||||
@@ -318,15 +318,15 @@ function scene.draw()
|
||||
end
|
||||
|
||||
scene.widgetList={
|
||||
WIDGET.newKey{name="rep0", fText=TEXTURE.rep.rep0,x=40,y=50,w=60,code=_rep0},
|
||||
WIDGET.newKey{name="repP8", fText=TEXTURE.rep.repP8,x=105,y=50,w=60,code=_repP8},
|
||||
WIDGET.newKey{name="repP2", fText=TEXTURE.rep.repP2,x=170,y=50,w=60,code=_repP2},
|
||||
WIDGET.newKey{name="rep1", fText=TEXTURE.rep.rep1,x=235,y=50,w=60,code=_rep1},
|
||||
WIDGET.newKey{name="rep2", fText=TEXTURE.rep.rep2,x=300,y=50,w=60,code=_rep2},
|
||||
WIDGET.newKey{name="rep5", fText=TEXTURE.rep.rep5,x=365,y=50,w=60,code=_rep5},
|
||||
WIDGET.newKey{name="step", fText=TEXTURE.rep.step,x=430,y=50,w=60,code=_step},
|
||||
WIDGET.newKey{name="restart", fText="R",x=380,y=35,w=60,font=40,code=restart},
|
||||
WIDGET.newKey{name="pause", fText="II",x=900,y=35,w=60,font=40,code=pauseGame},
|
||||
WIDGET.newKey{name="rep0", x=40,y=50,w=60,code=_rep0,fText=TEXTURE.rep.rep0},
|
||||
WIDGET.newKey{name="repP8", x=105,y=50,w=60,code=_repP8,fText=TEXTURE.rep.repP8},
|
||||
WIDGET.newKey{name="repP2", x=170,y=50,w=60,code=_repP2,fText=TEXTURE.rep.repP2},
|
||||
WIDGET.newKey{name="rep1", x=235,y=50,w=60,code=_rep1,fText=TEXTURE.rep.rep1},
|
||||
WIDGET.newKey{name="rep2", x=300,y=50,w=60,code=_rep2,fText=TEXTURE.rep.rep2},
|
||||
WIDGET.newKey{name="rep5", x=365,y=50,w=60,code=_rep5,fText=TEXTURE.rep.rep5},
|
||||
WIDGET.newKey{name="step", x=430,y=50,w=60,code=_step,fText=TEXTURE.rep.step},
|
||||
WIDGET.newKey{name="restart", x=1165,y=45,w=60,code=restart,fText="R"},
|
||||
WIDGET.newKey{name="pause", x=1235,y=45,w=60,code=pauseGame,fText=DOGC{20,25,{'fRect',0,0,3,25},{'fRect',17,0,3,25}}},
|
||||
}
|
||||
|
||||
return scene
|
||||
@@ -179,7 +179,7 @@ local titleTransform={
|
||||
}
|
||||
local titleColor={COLOR.lP,COLOR.lC,COLOR.lB,COLOR.lO,COLOR.lF,COLOR.lM,COLOR.lG,COLOR.lY}
|
||||
function scene.draw()
|
||||
gc.clear(.1,.1,.1)
|
||||
gc.clear(.08,.08,.084)
|
||||
|
||||
local T=(t1+110)%300
|
||||
if T<30 then
|
||||
|
||||
@@ -241,7 +241,7 @@ function scene.draw()
|
||||
|
||||
--Modes
|
||||
setFont(80)
|
||||
gc_setLineWidth(6)
|
||||
gc_setLineWidth(4)
|
||||
for name,M in next,MODES do
|
||||
if R[name]then
|
||||
local rank=R[name]
|
||||
|
||||
@@ -134,9 +134,9 @@ TEXTURE.setting=DOGC{64,64,
|
||||
|
||||
--Music mark
|
||||
TEXTURE.music=DOGC{64,64,
|
||||
{'setLW',7},
|
||||
{'setLW',6},
|
||||
{'line',19,9,60,7},
|
||||
{'setLW',4},
|
||||
{'setLW',2},
|
||||
{'line',20,9,20,49},
|
||||
{'line',59,7,59,47},
|
||||
{'fElps',11,49,11,8},
|
||||
@@ -146,13 +146,13 @@ TEXTURE.music=DOGC{64,64,
|
||||
--Mute mark
|
||||
TEXTURE.mute=DOGC{64,64,
|
||||
{'mDraw',TEXTURE.music,32,32,0,.9},
|
||||
{'setLW',5},
|
||||
{'setLW',4},
|
||||
{'line',6,6,57,57},
|
||||
}
|
||||
|
||||
--Language mark
|
||||
TEXTURE.language=DOGC{64,64,
|
||||
{'setLW',4},
|
||||
{'setLW',2},
|
||||
{'dCirc',32,32,30},
|
||||
{'line',2,31,62,31},
|
||||
{'line',31,2,31,62},
|
||||
@@ -162,7 +162,7 @@ TEXTURE.language=DOGC{64,64,
|
||||
|
||||
--Info. mark
|
||||
TEXTURE.info=DOGC{50,50,
|
||||
{'setLW',5},
|
||||
{'setLW',3},
|
||||
{'dCirc',25,25,22},
|
||||
{'fRect',22,11,6,6},
|
||||
{'fRect',22,20,6,20},
|
||||
@@ -170,9 +170,10 @@ TEXTURE.info=DOGC{50,50,
|
||||
|
||||
--Question mark
|
||||
TEXTURE.question=DOGC{50,50,
|
||||
{'setLW',5},
|
||||
{'setLW',3},
|
||||
{'dCirc',25,25,22},
|
||||
{'print','?',16,-6},
|
||||
{'setFT',40},
|
||||
{'print','?',17,-2},
|
||||
}
|
||||
|
||||
--More mark
|
||||
|
||||
Reference in New Issue
Block a user