From d040754d8c5117be17d3132292b41d25fb2f91c5 Mon Sep 17 00:00:00 2001 From: MrZ626 <1046101471@qq.com> Date: Tue, 10 Aug 2021 01:09:34 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=96=E6=B6=88=E6=9A=82=E5=81=9C=E8=BF=87?= =?UTF-8?q?=E7=A8=8B=E4=B8=AD=E5=85=81=E8=AE=B8=E5=86=8D=E6=AC=A1=E6=9A=82?= =?UTF-8?q?=E5=81=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parts/scenes/depause.lua | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/parts/scenes/depause.lua b/parts/scenes/depause.lua index 5d417b8b..a53e194e 100644 --- a/parts/scenes/depause.lua +++ b/parts/scenes/depause.lua @@ -4,9 +4,20 @@ local scene={} local timer -function scene.sceneInit()timer=1 end +function scene.sceneInit() + timer=1 + scene.widgetList.pause.x= + SETTING.menuPos=='right'and 1195 or + SETTING.menuPos=='middle'and 860 or + SETTING.menuPos=='left'and 190 +end + +function scene.keyDown(key) + if key=="escape"then + pauseGame() + end +end -scene.keyDown=NULL scene.mouseDown=NULL scene.touchDown=NULL @@ -36,4 +47,8 @@ function scene.draw() gc.rectangle('fill',500,342,280*timer,36,10) end +scene.widgetList={ + WIDGET.newKey{name="pause",x=0,y=45,w=60,code=pauseGame,fText=TEXTURE.game.pause}, +} + return scene \ No newline at end of file