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