词典新增复制页面功能,方便查好发送给别人

This commit is contained in:
MrZ626
2021-10-24 01:51:41 +08:00
parent 58a8828503
commit 406beab9d6
8 changed files with 30 additions and 5 deletions

View File

@@ -89,6 +89,8 @@ return{
replayBroken="Cannot load replay",
dictNote="==Copied from TetroDictionary==",
getNoticeFail="Failed to fetch announcements",
oldVersion="Version $1 is now available",
needUpdate="Newer version required!",
@@ -554,6 +556,7 @@ return{
},
dict={
title="TetroDictionary",
copy="Copy page",
link="Open URL",
},
stat={

View File

@@ -78,6 +78,8 @@ return{
replayBroken="No se puede cargar la repetición",
-- dictNote="==Copied from TetroDictionary==",
getNoticeFail="Error al buscar novedades.",
oldVersion="¡Está disponible la nueva versión $1!",
versionNotMatch="¡Las versiones no coinciden!",
@@ -513,6 +515,7 @@ return{
},
dict={
title="TetroDictionary",
-- copy="Copy page",
link="Abrir URL",
},
stat={

View File

@@ -79,6 +79,8 @@ return{
-- replayBroken="Cannot load replay",
-- dictNote="==Copied from TetroDictionary==",
getNoticeFail="Echec de l'obtention de la notice",
oldVersion="La version $1 est disponible !",
-- versionNotMatch="Version do not match!",
@@ -510,6 +512,7 @@ return{
},
dict={
title="TetroDictionary",
-- copy="Copy page",
link="Ouvrir URL",
},
stat={

View File

@@ -77,6 +77,8 @@ return{
-- replayBroken="Cannot load replay",
-- dictNote="==Copied from TetroDictionary==",
getNoticeFail="Não conseguiu ter anúncios",
oldVersion="Versão $1 esta disponível agora!",
-- versionNotMatch="Version do not match!",
@@ -544,6 +546,7 @@ return{
},
dict={
title="TetroDictionary",
-- copy="Copy page",
link="Abrir URL",
},
stat={

View File

@@ -64,6 +64,8 @@ return{
replayBroken=">x.",
-- dictNote="==Copied from TetroDictionary==",
pauseStat={
"~:",
"=/''/[ ]:",
@@ -423,6 +425,7 @@ return{
},
dict={
title="TetroDictionary",
copy=":→__",
link="~~e>>",
},
stat={

View File

@@ -89,6 +89,8 @@ return{
replayBroken="无法加载该录像",
dictNote="==复制于小z词典==",
getNoticeFail="拉取公告失败",
oldVersion="最新版本$1可以下载了!",
needUpdate="请更新游戏!",
@@ -571,6 +573,7 @@ return{
},
dict={
title="小Z方块词典",
copy="复制页面",
link="打开链接",
},
stat={

View File

@@ -557,6 +557,7 @@ return{
},
dict={
title="四联词典",
copy="复印页",
link="打开网页",
},
stat={

View File

@@ -1,6 +1,6 @@
local gc=love.graphics
local inputBox=WIDGET.newInputBox{name="input",x=20,y=110,w=726,h=60,font=40,limit=32}
local inputBox=WIDGET.newInputBox{name="input",x=20,y=110,w=762,h=60,font=40,limit=32}
local int,abs=math.floor,math.abs
local min,sin=math.min,math.sin
local ins=table.insert
@@ -110,6 +110,11 @@ function scene.keyDown(key)
else
SCN.back()
end
elseif key=="c"and love.keyboard.isDown("lctrl","rctrl")or key=="cC"then
local t=_getList()[selected]
t=t[1]..":\n"..t[4]..(t[5]and"\n[ "..t[5].." ]\n"or"\n")..text.dictNote
love.system.setClipboardText(t)
return
else
return
end
@@ -183,11 +188,12 @@ scene.widgetList={
WIDGET.newText{name="book", x=20,y=15,font=70,align='L',fText=CHAR.icon.zBook},
WIDGET.newText{name="title", x=100,y=15,font=70,align='L'},
inputBox,
WIDGET.newKey{name="copy", x=1170,y=140,w=160,h=50,font=25,code=pressKey"cC"},
WIDGET.newKey{name="link", x=1150,y=655,w=200,h=80,font=35,code=pressKey"link",hideF=function()return not url end},
WIDGET.newKey{name="up", x=1130,y=460,w=60,h=90,font=35,fText="",code=pressKey"up",hide=not MOBILE},
WIDGET.newKey{name="down", x=1130,y=560,w=60,h=90,font=35,fText="",code=pressKey"down",hide=not MOBILE},
WIDGET.newKey{name="pageup", x=1210,y=460,w=80,h=90,font=35,fText="↑↑",code=pressKey"pageup",hide=not MOBILE},
WIDGET.newKey{name="pagedown",x=1210,y=560,w=80,h=90,font=35,fText="↓↓",code=pressKey"pagedown",hide=not MOBILE},
WIDGET.newKey{name="up", x=1130,y=460,w=60,h=90,font=35,fText="",code=pressKey"up"},
WIDGET.newKey{name="down", x=1130,y=560,w=60,h=90,font=35,fText="",code=pressKey"down"},
WIDGET.newKey{name="pageup", x=1210,y=460,w=80,h=90,font=35,fText="↑↑",code=pressKey"pageup"},
WIDGET.newKey{name="pagedown",x=1210,y=560,w=80,h=90,font=35,fText="↓↓",code=pressKey"pagedown"},
WIDGET.newButton{name="back", x=1165,y=60,w=170,h=80,font=60,fText=CHAR.icon.back,code=backScene},
}