From 42f3cd8e313654e24d6819c5a823ff853192b353 Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Tue, 4 May 2021 02:07:12 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9C=BA=E6=99=AF=E6=A8=A1=E5=9D=97=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E7=AA=97=E5=8F=A3resize=E4=BA=8B=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Zframework/init.lua | 1 + Zframework/scene.lua | 2 ++ 2 files changed, 3 insertions(+) diff --git a/Zframework/init.lua b/Zframework/init.lua index af088977..525e4ce0 100644 --- a/Zframework/init.lua +++ b/Zframework/init.lua @@ -340,6 +340,7 @@ end function love.resize(w,h) SCR.resize(w,h) if BG.resize then BG.resize(w,h)end + if SCN.resize then SCN.resize(w,h)end SHADER.warning:send("w",w*SCR.dpi) SHADER.warning:send("h",h*SCR.dpi) diff --git a/Zframework/scene.lua b/Zframework/scene.lua index 5f66ea3e..360123fa 100644 --- a/Zframework/scene.lua +++ b/Zframework/scene.lua @@ -35,6 +35,7 @@ local SCN={ gamepadDown=false, gamepadUp=false, fileDropped=false, + resize=false, socketRead=false, }--Scene datas, returned @@ -80,6 +81,7 @@ function SCN.init(s,org) SCN.gamepadDown=S.gamepadDown SCN.gamepadUp=S.gamepadUp SCN.fileDropped=S.fileDropped + SCN.resize=S.resize SCN.socketRead=S.socketRead if S.sceneInit then S.sceneInit(org)end end