场景模块支持窗口resize事件
This commit is contained in:
@@ -340,6 +340,7 @@ end
|
|||||||
function love.resize(w,h)
|
function love.resize(w,h)
|
||||||
SCR.resize(w,h)
|
SCR.resize(w,h)
|
||||||
if BG.resize then BG.resize(w,h)end
|
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("w",w*SCR.dpi)
|
||||||
SHADER.warning:send("h",h*SCR.dpi)
|
SHADER.warning:send("h",h*SCR.dpi)
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ local SCN={
|
|||||||
gamepadDown=false,
|
gamepadDown=false,
|
||||||
gamepadUp=false,
|
gamepadUp=false,
|
||||||
fileDropped=false,
|
fileDropped=false,
|
||||||
|
resize=false,
|
||||||
socketRead=false,
|
socketRead=false,
|
||||||
}--Scene datas, returned
|
}--Scene datas, returned
|
||||||
|
|
||||||
@@ -80,6 +81,7 @@ function SCN.init(s,org)
|
|||||||
SCN.gamepadDown=S.gamepadDown
|
SCN.gamepadDown=S.gamepadDown
|
||||||
SCN.gamepadUp=S.gamepadUp
|
SCN.gamepadUp=S.gamepadUp
|
||||||
SCN.fileDropped=S.fileDropped
|
SCN.fileDropped=S.fileDropped
|
||||||
|
SCN.resize=S.resize
|
||||||
SCN.socketRead=S.socketRead
|
SCN.socketRead=S.socketRead
|
||||||
if S.sceneInit then S.sceneInit(org)end
|
if S.sceneInit then S.sceneInit(org)end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user