添加触摸/点击特效开关

This commit is contained in:
MrZ626
2021-04-12 20:39:21 +08:00
parent 59eb8ae7f1
commit 26d06e8f3a
9 changed files with 25 additions and 17 deletions

View File

@@ -124,7 +124,7 @@ function love.mousepressed(x,y,k,touch)
WIDGET.press(mx,my)
end
lastX,lastY=mx,my
SYSFX.newTap(3,mx,my,30)
if SETTING.clickFX then SYSFX.newTap(3,mx,my,30)end
end
function love.mousemoved(x,y,dx,dy,touch)
if touch then return end
@@ -194,7 +194,7 @@ function love.touchreleased(id,x,y)
if SCN.touchUp then SCN.touchUp(x,y)end
if(x-lastX)^2+(y-lastY)^2<62 then
if SCN.touchClick then SCN.touchClick(x,y)end
SYSFX.newTap(3,x,y,30)
if SETTING.clickFX then SYSFX.newTap(3,x,y,30)end
end
end

View File

@@ -276,6 +276,7 @@ SETTING={--Settings
fullscreen=true,
bg=true,
powerInfo=false,
clickFX=true,
--Sound
sfx=1,

View File

@@ -310,8 +310,9 @@ return{
highCam="Screen Scrolling",
nextPos="Next Preview",
fullscreen="Full Screen",
bg="Background",
power="Power Info",
clickFX="Click FX",
bg="Background",
clean="Fast Draw",
},
setting_sound={

View File

@@ -284,8 +284,9 @@ return{
highCam="Vue d'oiseau",
nextPos="Prévisualisation de position",
fullscreen="Plein écran",
bg="Arrière-plan",
power="Infos d'alimentation",
-- clickFX="Click FX",
bg="Arrière-plan",
-- clean="Fast Draw",
},
setting_sound={

View File

@@ -310,8 +310,9 @@ return{
highCam="Vista Olho-de-pássaro",
nextPos="Próxima Pos.",
fullscreen="Tela cheia",
bg="Fundo",
power="Informação bateria",
-- clickFX="Click FX",
bg="Fundo",
-- clean="Fast Draw",
},
setting_sound={

View File

@@ -288,8 +288,9 @@ return{
highCam="Cám. Vista Aérea",
nextPos="Ver Spawn de Pza. Sig.",
fullscreen="Pant. Completa",
bg="Fondo",
power="Inf. de Batería",
-- clickFX="Click FX",
bg="Fondo",
clean="Fast Draw",
},
setting_sound={

View File

@@ -169,8 +169,9 @@ return{
highCam="↑__↑",
nextPos="???←",
fullscreen="|←→|",
bg="__?__",
power="+.",
clickFX="_.~",
bg="__?__",
clean="[]→→O",
},
setting_sound={

View File

@@ -310,8 +310,9 @@ return{
highCam="超屏视野",
nextPos="生成预览",
fullscreen="全屏",
bg="背景",
power="电量显示",
clickFX="点按特效",
bg="背景",
clean="绘制优化",
},
setting_sound={

View File

@@ -37,20 +37,21 @@ scene.widgetList={
SETTING.frameMul=i<5 and 5*i+20 or 10*i
end},
WIDGET.newSwitch{name="text", x=1160, y=180,font=35,disp=SETval("text"), code=SETrev("text")},
WIDGET.newSwitch{name="score", x=1160, y=230,font=35,disp=SETval("score"), code=SETrev("score")},
WIDGET.newSwitch{name="warn", x=1160, y=280,font=35,disp=SETval("warn"), code=SETrev("warn")},
WIDGET.newSwitch{name="highCam", x=1160, y=330,font=35,disp=SETval("highCam"),code=SETrev("highCam")},
WIDGET.newSwitch{name="nextPos", x=1160, y=380,font=35,disp=SETval("nextPos"),code=SETrev("nextPos")},
WIDGET.newSwitch{name="fullscreen", x=1160, y=430,disp=SETval("fullscreen"), code=switchFullscreen},
WIDGET.newSwitch{name="bg", x=1160, y=480,font=35,disp=SETval("bg"),
WIDGET.newSwitch{name="text", x=1140, y=160,font=35,disp=SETval("text"), code=SETrev("text")},
WIDGET.newSwitch{name="score", x=1140, y=210,font=35,disp=SETval("score"), code=SETrev("score")},
WIDGET.newSwitch{name="warn", x=1140, y=260,font=35,disp=SETval("warn"), code=SETrev("warn")},
WIDGET.newSwitch{name="highCam", x=1140, y=310,font=35,disp=SETval("highCam"),code=SETrev("highCam")},
WIDGET.newSwitch{name="nextPos", x=1140, y=360,font=35,disp=SETval("nextPos"),code=SETrev("nextPos")},
WIDGET.newSwitch{name="fullscreen", x=1140, y=410,disp=SETval("fullscreen"), code=switchFullscreen},
WIDGET.newSwitch{name="power", x=1140, y=460,font=35,disp=SETval("powerInfo"),code=SETrev("powerInfo")},
WIDGET.newSwitch{name="clickFX", x=1140, y=510,font=35,disp=SETval("clickFX"),code=SETrev("clickFX")},
WIDGET.newSwitch{name="bg", x=1140, y=560,font=35,disp=SETval("bg"),
code=function()
BG.set("none")
SETTING.bg=not SETTING.bg
BG.set()
end},
WIDGET.newSwitch{name="power", x=990, y=610,font=35,disp=SETval("powerInfo"),code=SETrev("powerInfo")},
WIDGET.newSwitch{name="clean", x=990, y=670,font=35,disp=SETval("cleanCanvas"),code=SETrev("cleanCanvas")},
WIDGET.newSwitch{name="clean", x=990, y=640,font=35,disp=SETval("cleanCanvas"),code=SETrev("cleanCanvas")},
WIDGET.newButton{name="back", x=1140, y=640,w=170,h=80,font=40,code=backScene},
}