From c0adf5bf0b1478844b07ff0fd8d85ebf65937aed Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Tue, 30 Nov 2021 23:28:41 +0800 Subject: [PATCH] =?UTF-8?q?COLOR=E6=A8=A1=E5=9D=97=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E4=B8=89=E4=B8=AA=E5=8D=8A=E9=80=8F=E6=98=8E=E7=81=B0=E8=89=B2?= =?UTF-8?q?=E5=B9=B6=E5=A4=A7=E9=87=8F=E5=BA=94=E7=94=A8=20=E5=BE=AE?= =?UTF-8?q?=E8=B0=83=E9=A2=9C=E8=89=B2V=E5=92=8ClV=E7=9A=84hue=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Zframework/color.lua | 11 ++++++++--- Zframework/init.lua | 2 +- parts/gameFuncs.lua | 2 +- parts/modes/blind_wtf.lua | 2 +- parts/netPlayer.lua | 2 +- parts/scenes/app_15p.lua | 2 +- parts/scenes/app_UTTT.lua | 6 +++--- parts/scenes/app_ten.lua | 2 +- parts/scenes/app_triple.lua | 2 +- parts/scenes/dict.lua | 13 ++++++++----- parts/scenes/launchpad.lua | 8 ++++++++ parts/scenes/mode.lua | 6 +++--- 12 files changed, 37 insertions(+), 21 deletions(-) diff --git a/Zframework/color.lua b/Zframework/color.lua index 81b8d1fc..6e3c9449 100644 --- a/Zframework/color.lua +++ b/Zframework/color.lua @@ -1,5 +1,5 @@ local abs=math.abs -local function hsv(h,s,v,a) +local function hsv(h,s,v,a)--Color type, Color amount, Light if s<=0 then return v,v,v,a end h=h*6 local c=v*s @@ -28,7 +28,7 @@ local COLOR={ navy= {hsv(0.56, 1.00, 1.00)}, sea= {hsv(0.61, 1.00, 1.00)}, blue= {hsv(0.64, 1.00, 0.95)}, - violet= {hsv(0.73, 1.00, 0.91)}, + violet= {hsv(0.74, 1.00, 0.91)}, purple= {hsv(0.80, 1.00, 0.81)}, magenta= {hsv(0.86, 1.00, 0.78)}, wine= {hsv(0.92, 0.98, 0.91)}, @@ -45,7 +45,7 @@ local COLOR={ lNavy= {hsv(0.54, 0.80, 0.95)}, lSea= {hsv(0.56, 0.72, 0.97)}, lBlue= {hsv(0.64, 0.44, 0.96)}, - lViolet= {hsv(0.73, 0.47, 0.95)}, + lViolet= {hsv(0.72, 0.47, 0.95)}, lPurple= {hsv(0.80, 0.62, 0.89)}, lMagenta= {hsv(0.86, 0.61, 0.89)}, lWine= {hsv(0.93, 0.57, 0.92)}, @@ -72,12 +72,17 @@ local COLOR={ gray= {hsv(0.02, 0.05, 0.65)}, lGray= {hsv(0.02, 0.06, 0.86)}, white= {hsv(0.01, 0.02, 0.99)}, + + xGray= {hsv(0.00, 0.00, 0.42,.8)}, + lxGray= {hsv(0.00, 0.00, 0.62,.8)}, + dxGray= {hsv(0.00, 0.00, 0.26,.8)}, } 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', lR='lRed',lF='lFire',lO='lOrange',lY='lYellow',lL='lLime',lJ='lJade',lG='lGreen',lA='lAqua',lC='lCyan',lN='lNavy',lS='lSea',lB='lBlue',lV='lViolet',lP='lPurple',lM='lMagenta',lW='lWine', dR='dRed',dF='dFire',dO='dOrange',dY='dYellow',dL='dLime',dJ='dJade',dG='dGreen',dA='dAqua',dC='dCyan',dN='dNavy',dS='dSea',dB='dBlue',dV='dViolet',dP='dPurple',dM='dMagenta',dW='dWine', D='black',dH='dGray',H='gray',lH='lGray',Z='white', + X='xGray',lX='lxGray',dX='dxGray', --Remain letter: EIKQTUX }do COLOR[k]=COLOR[v] diff --git a/Zframework/init.lua b/Zframework/init.lua index 486bd63d..db2ed889 100644 --- a/Zframework/init.lua +++ b/Zframework/init.lua @@ -733,7 +733,7 @@ function love.run() end gc_replaceTransform(SCR.xOy_d) --Draw Version string - gc_setColor(.8,.8,.8,.4) + gc_setColor(.9,.9,.9,.42) FONT.set(20) mStr(VERSION.string,0,-30) gc_replaceTransform(SCR.xOy_dl) diff --git a/parts/gameFuncs.lua b/parts/gameFuncs.lua index c4cde491..678e62a3 100644 --- a/parts/gameFuncs.lua +++ b/parts/gameFuncs.lua @@ -856,7 +856,7 @@ do--function drawSelfProfile() --Draw avatar gc_setLineWidth(2) - gc_setColor(.3,.3,.3,.8)gc_rectangle('fill',0,0,-300,80) + gc_setColor(COLOR.X)gc_rectangle('fill',0,0,-300,80) gc_setColor(1,1,1)gc_rectangle('line',-300,0,300,80,5) gc_rectangle('line',-73,7,66,66,2) gc_draw(selfAvatar,-72,8,nil,.5) diff --git a/parts/modes/blind_wtf.lua b/parts/modes/blind_wtf.lua index 4e025be6..133a4027 100644 --- a/parts/modes/blind_wtf.lua +++ b/parts/modes/blind_wtf.lua @@ -21,7 +21,7 @@ return{ gc.push('transform') if repMode then gc.origin() - gc.setColor(.3,.3,.3,.7) + gc.setColor(COLOR.X) gc.rectangle('fill',0,0,SCR.w,SCR.h) else gc.clear(.2,.2,.2) diff --git a/parts/netPlayer.lua b/parts/netPlayer.lua index f14774bd..0531d0d7 100644 --- a/parts/netPlayer.lua +++ b/parts/netPlayer.lua @@ -267,7 +267,7 @@ function NETPLY.draw() end if selP then gc_translate(min(mouseX,880),min(mouseY,460)) - gc_setColor(.2,.2,.2,.7) + gc_setColor(COLOR.X) gc_rectangle('fill',0,0,400,260) gc_setColor(1,1,1) gc_setLineWidth(2) diff --git a/parts/scenes/app_15p.lua b/parts/scenes/app_15p.lua index 43107935..ad8bf787 100644 --- a/parts/scenes/app_15p.lua +++ b/parts/scenes/app_15p.lua @@ -303,7 +303,7 @@ function scene.draw() end end end - gc.setColor(0,0,0,.3) + gc.setColor(COLOR.dX) gc.setLineWidth(10) gc.rectangle('line',cx*160+173,cy*160-107,134,134,50) end diff --git a/parts/scenes/app_UTTT.lua b/parts/scenes/app_UTTT.lua index 0e681237..651c5d01 100644 --- a/parts/scenes/app_UTTT.lua +++ b/parts/scenes/app_UTTT.lua @@ -135,11 +135,11 @@ function scene.draw() gc.scale(8) --Draw board - gc.setColor(0,0,0,.4) + gc.setColor(COLOR.dX) gc.rectangle('fill',0,0,90,90) --Draw target area - gc.setColor(1,1,1,math.sin((TIME()-placeTime)*5)/5+.2) + gc.setColor(1,1,1,math.sin((TIME()-placeTime)*5)*.1+.15) if target then gc.rectangle('fill',(target-1)%3*30,int((target-1)/3)*30,30,30) elseif not gameover then @@ -212,7 +212,7 @@ function scene.draw() end else --Draw current round mark - gc.setColor(.8,.8,.8,.8) + gc.setColor(COLOR.X) gc.rectangle('fill',80,80,160,160) gc.setColor(COLOR.Z) gc.setLineWidth(6) diff --git a/parts/scenes/app_ten.lua b/parts/scenes/app_ten.lua index 2afb35a4..61e2db0c 100644 --- a/parts/scenes/app_ten.lua +++ b/parts/scenes/app_ten.lua @@ -241,7 +241,7 @@ function scene.draw() --Previews if nexts then - gc.setColor(0,0,0,.2) + gc.setColor(COLOR.dX) rectangle('fill',20,450,280,75) gc.setLineWidth(6) setColor(1,1,1) diff --git a/parts/scenes/app_triple.lua b/parts/scenes/app_triple.lua index 638873d5..9440973a 100644 --- a/parts/scenes/app_triple.lua +++ b/parts/scenes/app_triple.lua @@ -222,7 +222,7 @@ function player:drawBoard() gc.translate(self.x,self.y) --Board background - setColor(.2,.2,.2,.7) + setColor(COLOR.dX) rectangle("fill",0,0,600,600) diff --git a/parts/scenes/dict.lua b/parts/scenes/dict.lua index 2b051a08..b1ad9f35 100644 --- a/parts/scenes/dict.lua +++ b/parts/scenes/dict.lua @@ -166,6 +166,14 @@ function scene.update(dt) end function scene.draw() + gc.setColor(COLOR.dX) + gc.rectangle('fill',300,180,958,526,5) + gc.rectangle('fill',20,180,280,526,5) + gc.setLineWidth(2) + gc.setColor(COLOR.Z) + gc.rectangle('line',300,180,958,526,5) + gc.rectangle('line',20,180,280,526,5) + local list=_getList() gc.setColor(COLOR.Z) local t=list[selected].content @@ -195,11 +203,6 @@ function scene.draw() gc.print(item.title,30,y) end - gc.setLineWidth(2) - gc.setColor(COLOR.Z) - gc.rectangle('line',300,180,958,526,5) - gc.rectangle('line',20,180,280,526,5) - if searchWait>0 then local r=TIME()*2 local R=int(r)%7+1 diff --git a/parts/scenes/launchpad.lua b/parts/scenes/launchpad.lua index 0c0a8242..19e2cb20 100644 --- a/parts/scenes/launchpad.lua +++ b/parts/scenes/launchpad.lua @@ -235,11 +235,15 @@ function scene.draw() gc_setLineWidth(2) --Pad frame + gc_setColor(COLOR.dX) + gc_rectangle('fill',-3,-3,726,646,2) gc_setColor(white) gc_rectangle('line',-3,-3,726,646,2) --Buttons for y=1,8 do + gc_setColor(COLOR.dX) + gc_circle('fill',40,(y-1)*80+40,34) gc_setColor(white) gc_circle('line',40,(y-1)*80+40,34) if pad.funcAlpha[y]>0 then @@ -248,6 +252,10 @@ function scene.draw() end end setFont(10) + gc_setColor(COLOR.dX) + for y=1,8 do for x=1,8 do + gc_rectangle('fill',x*80+2,(y-1)*80+2,76,76,5) + end end gc_setColor(white) for y=1,8 do for x=1,8 do gc_rectangle('line',x*80+2,(y-1)*80+2,76,76,5) diff --git a/parts/scenes/mode.lua b/parts/scenes/mode.lua index b1c8a1c6..4fba7481 100644 --- a/parts/scenes/mode.lua +++ b/parts/scenes/mode.lua @@ -271,7 +271,7 @@ function scene.draw() if unlocked==1 then name=RANK_CHARS[rank] if name then - gc_setColor(0,0,0,.8) + gc_setColor(COLOR.dX) mStr(name,M.x+M.size*.7,M.y-50-M.size*.7) gc_setColor(RANK_COLORS[rank]) mStr(name,M.x+M.size*.7+4,M.y-50-M.size*.7-4) @@ -284,7 +284,7 @@ function scene.draw() --Score board if sel then local M=MODES[sel] - gc_setColor(.5,.5,.5,.8) + gc_setColor(COLOR.X) gc_rectangle('fill',920,0,360,720,5)--Info board gc_setColor(COLOR.Z) setFont(40)mStr(text.modes[sel][1],1100,5) @@ -295,7 +295,7 @@ function scene.draw() end if M.score then mText(TEXTOBJ.highScore,1100,240) - gc_setColor(.3,.3,.3,.7) + gc_setColor(COLOR.dX) gc_rectangle('fill',940,290,320,280,5)--Highscore board local L=M.records gc_setColor(1,1,1)