From aad36f44c1752c9fd1fae5b2a8d0efb2887ac76e Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Sun, 24 Jan 2021 13:45:13 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=B5=E8=84=91=E4=B8=8D=E5=86=8D=E9=BB=98?= =?UTF-8?q?=E8=AE=A4=E5=85=A8=E5=B1=8F=EF=BC=8C=E5=A2=9E=E5=8A=A0f11?= =?UTF-8?q?=E5=BC=80=E5=85=B3=E5=85=A8=E5=B1=8F=E5=8A=9F=E8=83=BD=EF=BC=8C?= =?UTF-8?q?=E6=95=B4=E7=90=86=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Zframework/init.lua | 2 ++ Zframework/toolfunc.lua | 2 +- parts/gametoolfunc.lua | 9 +++++++++ parts/globalTables.lua | 2 +- parts/scenes/setting_video.lua | 7 +------ 5 files changed, 14 insertions(+), 8 deletions(-) diff --git a/Zframework/init.lua b/Zframework/init.lua index 26720485..bbda4d85 100644 --- a/Zframework/init.lua +++ b/Zframework/init.lua @@ -217,6 +217,8 @@ function love.keypressed(i) if i=="f8"then devMode=1 LOG.print("DEBUG ON",COLOR.yellow) + elseif i=="f11"then + switchFullscreen() else if SCN.swapping then return end diff --git a/Zframework/toolfunc.lua b/Zframework/toolfunc.lua index 1a53773b..c6182d6a 100644 --- a/Zframework/toolfunc.lua +++ b/Zframework/toolfunc.lua @@ -103,7 +103,7 @@ do--setFont end do--upperChar local upper=string.upper - upperList={ + local upperList={ ["1"]="!",["2"]="@",["3"]="#",["4"]="$",["5"]="%", ["6"]="^",["7"]="&",["8"]="*",["9"]="(",["0"]=")", ["`"]="~",["-"]="_",["="]="+", diff --git a/parts/gametoolfunc.lua b/parts/gametoolfunc.lua index 5a228105..dba814b5 100644 --- a/parts/gametoolfunc.lua +++ b/parts/gametoolfunc.lua @@ -9,6 +9,15 @@ local ins,rem=table.insert,table.remove +--System +function switchFullscreen() + SETTING.fullscreen=not SETTING.fullscreen + love.window.setFullscreen(SETTING.fullscreen) + love.resize(love.graphics.getWidth(),love.graphics.getHeight()) +end + + + --Encoding Functions --Sep symbol: 33 (!) --Safe char: 34~126 diff --git a/parts/globalTables.lua b/parts/globalTables.lua index 771bdb97..9ac83b30 100644 --- a/parts/globalTables.lua +++ b/parts/globalTables.lua @@ -290,7 +290,7 @@ SETTING={--Settings warn=true, highCam=false, nextPos=false, - fullscreen=true, + fullscreen=false, bg=true, powerInfo=false, diff --git a/parts/scenes/setting_video.lua b/parts/scenes/setting_video.lua index 7245eb2b..7a444231 100644 --- a/parts/scenes/setting_video.lua +++ b/parts/scenes/setting_video.lua @@ -41,12 +41,7 @@ scene.widgetList={ WIDGET.newSwitch{name="warn", x=1100, y=300,font=35,disp=lnk_SETval("warn"), code=lnk_SETrev("warn")}, WIDGET.newSwitch{name="highCam", x=1100, y=360,font=35,disp=lnk_SETval("highCam"),code=lnk_SETrev("highCam")}, WIDGET.newSwitch{name="nextPos", x=1100, y=420,font=35,disp=lnk_SETval("nextPos"),code=lnk_SETrev("nextPos")}, - WIDGET.newSwitch{name="fullscreen",x=1100, y=480,disp=lnk_SETval("fullscreen"), - code=function() - SETTING.fullscreen=not SETTING.fullscreen - love.window.setFullscreen(SETTING.fullscreen) - love.resize(love.graphics.getWidth(),love.graphics.getHeight()) - end}, + WIDGET.newSwitch{name="fullscreen",x=1100, y=480,disp=lnk_SETval("fullscreen"), code=switchFullscreen}, WIDGET.newSwitch{name="bg", x=1100, y=540,font=35,disp=lnk_SETval("bg"), code=function() BG.set("none")