微调场地绘制的交互
This commit is contained in:
@@ -448,20 +448,20 @@ return{
|
|||||||
|
|
||||||
any="Erase",
|
any="Erase",
|
||||||
space="×",
|
space="×",
|
||||||
smartPen="Smart",
|
smart="Smart",
|
||||||
|
|
||||||
pushLine="Add Line(K)",
|
push="Add Line(K)",
|
||||||
delLine="Del Line(L)",
|
del="Del Line(L)",
|
||||||
|
|
||||||
copy="Copy",
|
copy="Copy",
|
||||||
paste="Paste",
|
paste="Paste",
|
||||||
clear="Clear",
|
clear="Clear",
|
||||||
demo="Don't Show ×",
|
demo="Don't Show ×",
|
||||||
|
|
||||||
newPage="New Page(N)",
|
newPg="New Page(N)",
|
||||||
delPage="Del Page(M)",
|
delPg="Del Page(M)",
|
||||||
prevPage="Prev Page",
|
prevPg="Prev Page",
|
||||||
nextPage="Next Page",
|
nextPg="Next Page",
|
||||||
},
|
},
|
||||||
custom_sequence={
|
custom_sequence={
|
||||||
title="Custom Game",
|
title="Custom Game",
|
||||||
|
|||||||
@@ -421,20 +421,20 @@ return{
|
|||||||
|
|
||||||
any="Effacer",
|
any="Effacer",
|
||||||
space="×",
|
space="×",
|
||||||
-- smartPen="Smart",
|
-- smart="Smart",
|
||||||
|
|
||||||
pushLine="Ajouter ligne (K)",
|
push="Ajouter ligne (K)",
|
||||||
delLine="Supprimer ligne (L)",
|
del="Supprimer ligne (L)",
|
||||||
|
|
||||||
copy="Copier",
|
copy="Copier",
|
||||||
paste="Coller",
|
paste="Coller",
|
||||||
clear="Nettoyer",
|
clear="Nettoyer",
|
||||||
demo="Masquer les ×",
|
demo="Masquer les ×",
|
||||||
|
|
||||||
newPage="Nouvelle Page(N)",
|
newPg="Nouvelle Page(N)",
|
||||||
delPage="Supp. Page(M)",
|
delPg="Supp. Page(M)",
|
||||||
prevPage="Page Préc.",
|
prevPg="Page Préc.",
|
||||||
nextPage="Page Suiv.",
|
nextPg="Page Suiv.",
|
||||||
},
|
},
|
||||||
custom_sequence={
|
custom_sequence={
|
||||||
title="Mode personnalisée",
|
title="Mode personnalisée",
|
||||||
|
|||||||
@@ -449,20 +449,20 @@ return{
|
|||||||
|
|
||||||
any="Apagar",
|
any="Apagar",
|
||||||
space="×",
|
space="×",
|
||||||
-- smartPen="Smart",
|
-- smart="Smart",
|
||||||
|
|
||||||
pushLine="Add Linha(K)",
|
push="Add Linha(K)",
|
||||||
delLine="Del Linha(L)",
|
del="Del Linha(L)",
|
||||||
|
|
||||||
copy="Copiar",
|
copy="Copiar",
|
||||||
paste="Colar",
|
paste="Colar",
|
||||||
clear="Limpar",
|
clear="Limpar",
|
||||||
demo="Não mostrar ×",
|
demo="Não mostrar ×",
|
||||||
|
|
||||||
newPage="Nova Página(N)",
|
newPg="Nova Página(N)",
|
||||||
delPage="Del Página(M)",
|
delPg="Del Página(M)",
|
||||||
prevPage="Página Ant.",
|
prevPg="Página Ant.",
|
||||||
nextPage="Prox. Página",
|
nextPg="Prox. Página",
|
||||||
},
|
},
|
||||||
custom_sequence={
|
custom_sequence={
|
||||||
title="Jogo Custom",
|
title="Jogo Custom",
|
||||||
|
|||||||
@@ -304,20 +304,20 @@ return{
|
|||||||
|
|
||||||
any="_",
|
any="_",
|
||||||
space="×",
|
space="×",
|
||||||
smartPen="~",
|
smart="~",
|
||||||
|
|
||||||
pushLine="↑↑↑↑↑(K)",
|
push="↑↑↑↑↑(K)",
|
||||||
delLine="==X==(L)",
|
del="==X==(L)",
|
||||||
|
|
||||||
copy="→__",
|
copy="→__",
|
||||||
paste="__→",
|
paste="__→",
|
||||||
clear="XXX",
|
clear="XXX",
|
||||||
demo="X ×",
|
demo="X ×",
|
||||||
|
|
||||||
newPage="+[_](N)",
|
newPg="+[_](N)",
|
||||||
delPage="x[_](M)",
|
delPg="x[_](M)",
|
||||||
prevPage="←[_]",
|
prevPg="←[_]",
|
||||||
nextPage="[_]→",
|
nextPg="[_]→",
|
||||||
},
|
},
|
||||||
custom_sequence={
|
custom_sequence={
|
||||||
title="!@#$%^&*",
|
title="!@#$%^&*",
|
||||||
|
|||||||
@@ -447,20 +447,20 @@ return{
|
|||||||
|
|
||||||
any="不定",
|
any="不定",
|
||||||
space="×",
|
space="×",
|
||||||
smartPen="智能",
|
smart="智能",
|
||||||
|
|
||||||
pushLine="增加一行(K)",
|
push="增加一行(K)",
|
||||||
delLine="消除行(L)",
|
del="消除行(L)",
|
||||||
|
|
||||||
copy="复制",
|
copy="复制",
|
||||||
paste="粘贴",
|
paste="粘贴",
|
||||||
clear="清除",
|
clear="清除",
|
||||||
demo="不显示×",
|
demo="不显示×",
|
||||||
|
|
||||||
newPage="新页面(N)",
|
newPg="新页面(N)",
|
||||||
delPage="删除页面(M)",
|
delPg="删除页面(M)",
|
||||||
prevPage="上一页面",
|
prevPg="上一页面",
|
||||||
nextPage="下一页面",
|
nextPg="下一页面",
|
||||||
},
|
},
|
||||||
custom_sequence={
|
custom_sequence={
|
||||||
title="自定义游戏",
|
title="自定义游戏",
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ local scene={}
|
|||||||
|
|
||||||
local sure
|
local sure
|
||||||
local keyHold
|
local keyHold
|
||||||
local penType--Color, air, or smart
|
local penType--Color (air/smart)
|
||||||
local penMode
|
local penMode
|
||||||
local penPath={}
|
local penPath={}
|
||||||
local penX,penY
|
local penX,penY
|
||||||
@@ -237,12 +237,10 @@ function scene.keyDown(key)
|
|||||||
else
|
else
|
||||||
LOG.print(text.dataCorrupted,COLOR.R)
|
LOG.print(text.dataCorrupted,COLOR.R)
|
||||||
end
|
end
|
||||||
elseif key=="tab"or key=="sTab"then
|
elseif key=="pageup"then
|
||||||
if key=="sTab"or kb.isDown("lshift","rshift")then
|
page=max(page-1,1)
|
||||||
page=max(page-1,1)
|
elseif key=="pagedown"then
|
||||||
else
|
page=min(page+1,#FIELD)
|
||||||
page=min(page+1,#FIELD)
|
|
||||||
end
|
|
||||||
elseif key=="escape"then
|
elseif key=="escape"then
|
||||||
if keyHold then
|
if keyHold then
|
||||||
keyHold=false
|
keyHold=false
|
||||||
@@ -404,20 +402,15 @@ function scene.draw()
|
|||||||
--Confirm reset
|
--Confirm reset
|
||||||
if sure>0 then
|
if sure>0 then
|
||||||
gc.setColor(1,1,1,sure*.02)
|
gc.setColor(1,1,1,sure*.02)
|
||||||
gc.draw(drawableText.question,1145,330)
|
gc.draw(drawableText.question,1090,460)
|
||||||
end
|
end
|
||||||
|
|
||||||
--Block name
|
--Block name
|
||||||
setFont(55)
|
setFont(55)
|
||||||
gc.setColor(1,1,1)
|
gc.setColor(1,1,1)
|
||||||
local _
|
|
||||||
for i=1,7 do
|
for i=1,7 do
|
||||||
_=SETTING.skin[i]
|
local skin=SETTING.skin[i]
|
||||||
if _<=8 then
|
mStr(text.block[i],500+skin%8*80,90+80*int(skin/8))
|
||||||
mStr(text.block[i],500+80*_,90)
|
|
||||||
else
|
|
||||||
mStr(text.block[i],500+80*(_-8),170)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -453,21 +446,21 @@ scene.widgetList={
|
|||||||
WIDGET.newButton{name="b23", x=1060, y=290,w=75,fText="_", color="dR", code=setPen(23)},--GB4
|
WIDGET.newButton{name="b23", x=1060, y=290,w=75,fText="_", color="dR", code=setPen(23)},--GB4
|
||||||
WIDGET.newButton{name="b24", x=1140, y=290,w=75,fText="_", color="dG", code=setPen(24)},--GB5
|
WIDGET.newButton{name="b24", x=1140, y=290,w=75,fText="_", color="dG", code=setPen(24)},--GB5
|
||||||
|
|
||||||
WIDGET.newButton{name="any", x=600, y=400,w=120,color="lH", font=40,code=setPen(0)},
|
WIDGET.newButton{name="any", x=600, y=400,w=120,color="lH", font=40,code=setPen(0)},
|
||||||
WIDGET.newButton{name="space", x=730, y=400,w=120,color="H", font=65,code=setPen(-1)},
|
WIDGET.newButton{name="space", x=730, y=400,w=120,color="H", font=65,code=setPen(-1)},
|
||||||
WIDGET.newButton{name="smartPen", x=860, y=400,w=120,color="lG", font=30,code=setPen(-2)},
|
WIDGET.newButton{name="smart", x=860, y=400,w=120,color="lG", font=30,code=setPen(-2)},
|
||||||
WIDGET.newButton{name="pushLine", x=990, y=400,w=120,h=120,color="lY",font=20,code=pressKey"k"},
|
WIDGET.newButton{name="push", x=990, y=400,w=120,h=120,color="lY",font=20,code=pressKey"k"},
|
||||||
WIDGET.newButton{name="delLine", x=1120, y=400,w=120,h=120,color="lY",font=20,code=pressKey"l"},
|
WIDGET.newButton{name="del", x=1120, y=400,w=120,h=120,color="lY",font=20,code=pressKey"l"},
|
||||||
|
|
||||||
WIDGET.newButton{name="copy", x=730, y=530,w=120,color="lR", font=35,code=pressKey"cC"},
|
WIDGET.newButton{name="copy", x=730, y=530,w=120,color="lR", font=35,code=pressKey"cC"},
|
||||||
WIDGET.newButton{name="paste", x=860, y=530,w=120,color="lB", font=35,code=pressKey"cV"},
|
WIDGET.newButton{name="paste", x=860, y=530,w=120,color="lB", font=35,code=pressKey"cV"},
|
||||||
WIDGET.newButton{name="clear", x=990, y=530,w=120,color="Z", font=40,code=pressKey"delete"},
|
WIDGET.newButton{name="clear", x=990, y=530,w=120,color="Z", font=40,code=pressKey"delete"},
|
||||||
WIDGET.newSwitch{name="demo", x=755, y=640,disp=function()return demo end,code=function()demo=not demo end},
|
WIDGET.newSwitch{name="demo", x=755, y=640,disp=function()return demo end,code=function()demo=not demo end},
|
||||||
|
|
||||||
WIDGET.newButton{name="newPage", x=100, y=110,w=160,h=110,color="N",font=20,code=pressKey"n"},
|
WIDGET.newButton{name="newPg", x=100, y=110,w=160,h=110,color="N",font=20,code=pressKey"n"},
|
||||||
WIDGET.newButton{name="delPage", x=100, y=230,w=160,h=110,color="lR",font=20,code=pressKey"m"},
|
WIDGET.newButton{name="delPg", x=100, y=230,w=160,h=110,color="lR",font=20,code=pressKey"m"},
|
||||||
WIDGET.newButton{name="prevPage", x=100, y=350,w=160,h=110,color="lG",font=20,code=pressKey"sTab",hide=function()return page==1 end},
|
WIDGET.newButton{name="prevPg", x=100, y=350,w=160,h=110,color="lG",font=20,code=pressKey"pageup",hide=function()return page==1 end},
|
||||||
WIDGET.newButton{name="nextPage", x=100, y=470,w=160,h=110,color="lG",font=20,code=pressKey"tab",hide=function()return page==#FIELD end},
|
WIDGET.newButton{name="nextPg", x=100, y=470,w=160,h=110,color="lG",font=20,code=pressKey"pagedown",hide=function()return page==#FIELD end},
|
||||||
|
|
||||||
WIDGET.newButton{name="back", x=1140, y=640, w=170,h=80,font=40,code=backScene},
|
WIDGET.newButton{name="back", x=1140, y=640, w=170,h=80,font=40,code=backScene},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ function scene.keyDown(key)
|
|||||||
end
|
end
|
||||||
elseif key=="v"and kb.isDown("lctrl","rctrl")or key=="cV"then
|
elseif key=="v"and kb.isDown("lctrl","rctrl")or key=="cV"then
|
||||||
local str=sys.getClipboardText()
|
local str=sys.getClipboardText()
|
||||||
local p=string.find(str,":")--ptr*
|
local p=str:find":"--ptr*
|
||||||
if p then str=sub(str,p+1)end
|
if p then str=sub(str,p+1)end
|
||||||
if DATA.pasteMission(str)then
|
if DATA.pasteMission(str)then
|
||||||
LOG.print(text.importSuccess,COLOR.G)
|
LOG.print(text.importSuccess,COLOR.G)
|
||||||
|
|||||||
Reference in New Issue
Block a user