微调键位设置ui和交互逻辑,添加说明文本

This commit is contained in:
MrZ626
2021-09-25 18:55:21 +08:00
parent fddb2db8c7
commit a6c47f5122
7 changed files with 32 additions and 10 deletions

View File

@@ -122,6 +122,8 @@ return{
chatStart="------Beginning of log------",
chatHistory="------New messages below------",
keySettingInstruction="Press to bind key\nescape: cancel\nbackspace: delete",
errorMsg="Techmino ran into a problem and needs to restart.\nYou can send the error log to the developers.",
modInstruction="Choose your modifiers!\nMods allow you to change the game,\nbut they may also crash the game.\nScores will not be saved when using mods.",

View File

@@ -111,6 +111,8 @@ return{
chatStart="------Comienzo del historial------",
chatHistory="------Nuevos mensajes------",
-- keySettingInstruction="Press to bind key\nescape: cancel\nbackspace: delete",
errorMsg="Ha ocurrido un error y Techmino necesita reiniciarse.\nSe creó un registro de error, puedes enviarlo al autor.",
-- modInstruction="",

View File

@@ -112,6 +112,8 @@ return{
chatStart="--------Début des logs--------",
chatHistory="-Nouveaux messages en dessous-",
-- keySettingInstruction="Press to bind key\nescape: cancel\nbackspace: delete",
errorMsg="Une erreur est survenue et Techmino doit redémarrer.\nDes informations concernant l'erreur ont été créées, et vous pouvez les envoyer au créateur.",
modInstruction="",

View File

@@ -110,6 +110,8 @@ return{
chatStart="------Começo do log------",
chatHistory="------Novas mensagens abaixo------",
-- keySettingInstruction="Press to bind key\nescape: cancel\nbackspace: delete",
errorMsg="Um erro ocorreu e Techmino precisa reiniciar.\nInformação do erro foi criada, e você pode mandar ao autor.",
modInstruction="Selecione mods (modificadores) para usar!\nMods irão modificar o jogo em formas diferentes\n(e possivelmente quebrar o jogo de formas estranhas).\nAlguns mods irão fazer seu jogo unranked.",

View File

@@ -122,6 +122,8 @@ return{
chatStart="------消息的开头------",
chatHistory="------以上是历史消息------",
keySettingInstruction="点击添加键位绑定\nesc取消选中\n退格键清空选中",
errorMsg="Techmino遭受了雷击,需要重新启动.\n我们已收集了一些错误信息,你可以向作者进行反馈.",
modInstruction="选择你要使用的Mod!\n不同Mod会用不同的方式改变初始游戏规则(可能导致不能正常游玩)\n来开发新玩法或者挑战自我吧!\n提醒:开启一些Mod会让成绩无效,你也可以用键盘开关Mod,按住shift反向",

View File

@@ -123,6 +123,8 @@ return{
chatStart="------日志开始------",
chatHistory="------下面是新消息------",
keySettingInstruction="按绑定键\n退出:取消\n退格:删除",
errorMsg="技术米诺遇到问题,需要重新启动。\n您可以将错误日志发送给开发人员。",
modInstruction="选择你的修改器\n多器官功能障碍允许您更改游戏。\n它们也可能以奇怪的方式破坏游戏。\n请注意,多器官功能障碍将导致您的游戏取消排名!",

View File

@@ -33,6 +33,12 @@ local forbbidenKeys={
function scene.keyDown(key,isRep)
if isRep then return end
if key=="escape"then
if selected then
selected=false
else
SCN.back()
end
elseif key=="backspace"then
if selected then
for k,v in next,keyMap.keyboard do
if v==selected then
@@ -42,8 +48,6 @@ function scene.keyDown(key,isRep)
_freshKeyList()
selected=false
SFX.play('finesseError',.5)
else
SCN.back()
end
elseif selected then
if not forbbidenKeys[key]then
@@ -81,8 +85,9 @@ function scene.gamepadDown(key)
end
function scene.draw()
setFont(15)
setFont(20)
gc.setColor(COLOR.Z)
gc.printf(text.keySettingInstruction,540,620,500,'right')
for i=0,20 do
for j=1,#keyList[i]do
@@ -91,18 +96,23 @@ function scene.draw()
setFont(font)
mStr(key,
(i>10 and 940 or 210)+100*j,
i>10 and 60*(i-10)-23-font*.7 or
i>0 and 60*i-23-font*.7 or
667-font*.7
(
i>10 and 60*(i-10)-23 or
i>0 and 60*i-23 or
667
)-font*.7
)
end
end
if selected then
gc.setColor(COLOR[TIME()%.26<.13 and'R'or'Y'])
local x,y=selected>10 and 910 or 270, selected>10 and 60*(selected-10)-50 or selected>0 and 60*selected-50 or 630
setFont(40)gc.print("=",x,y)
setFont(10)gc.print("esc?",x,y+40)
gc.setLineWidth(3)
gc.setColor(COLOR[TIME()%.26<.13 and'F'or'Y'])
gc.rectangle('line',
selected>10 and 910 or 270,
selected>10 and 60*(selected-10)-50 or selected>0 and 60*selected-50 or 640,
360,60
)
end
end