Update stuffs

This commit is contained in:
SweetSea-ButImNotSweet
2024-12-10 14:50:39 +07:00
parent d78ea3cc6e
commit 5ff45c3392
5 changed files with 53 additions and 35 deletions

View File

@@ -10,29 +10,29 @@ local _defaultSettings = {
---@type table<string,string>[]
bind = {
{
{type='button',x= 1 * 70 + 120,y = 1 * 70 + 120, r = 30, key= 'up',iconSize=50},
{type='button',x= 2 * 70 + 120,y = 1 * 70 + 120, r = 30, key= 'down',iconSize=50},
{type='button',x= 3 * 70 + 120,y = 1 * 70 + 120, r = 30, key= 'left',iconSize=50},
{type='button',x= 4 * 70 + 120,y = 1 * 70 + 120, r = 30, key= 'right',iconSize=50},
{type='button',x= 5 * 70 + 120,y = 1 * 70 + 120, r = 30, key= 'menu_decide',iconSize=50},
{type='button',x= 1 * 70 + 120,y = 1 * 70 + 120, r = 30, key= 'up',iconSize=80},
{type='button',x= 2 * 70 + 120,y = 1 * 70 + 120, r = 30, key= 'down',iconSize=80},
{type='button',x= 3 * 70 + 120,y = 1 * 70 + 120, r = 30, key= 'left',iconSize=80},
{type='button',x= 4 * 70 + 120,y = 1 * 70 + 120, r = 30, key= 'right',iconSize=80},
{type='button',x= 5 * 70 + 120,y = 1 * 70 + 120, r = 30, key= 'hold',iconSize=80},
{type='button',x= 1 * 70 + 120,y = 2 * 70 + 120, r = 30, key= 'rotate_left',iconSize=50},
{type='button',x= 2 * 70 + 120,y = 2 * 70 + 120, r = 30, key= 'rotate_left2',iconSize=50},
{type='button',x= 3 * 70 + 120,y = 2 * 70 + 120, r = 30, key= 'rotate_right',iconSize=50},
{type='button',x= 4 * 70 + 120,y = 2 * 70 + 120, r = 30, key= 'rotate_right2',iconSize=50},
{type='button',x= 5 * 70 + 120,y = 2 * 70 + 120, r = 30, key= 'retry',iconSize=50},
{type='button',x= 1 * 70 + 120,y = 2 * 70 + 120, r = 30, key= 'rotate_left',iconSize=80},
{type='button',x= 2 * 70 + 120,y = 2 * 70 + 120, r = 30, key= 'rotate_left2',iconSize=80},
{type='button',x= 3 * 70 + 120,y = 2 * 70 + 120, r = 30, key= 'rotate_right',iconSize=80},
{type='button',x= 4 * 70 + 120,y = 2 * 70 + 120, r = 30, key= 'rotate_right2',iconSize=80},
{type='button',x= 5 * 70 + 120,y = 2 * 70 + 120, r = 30, key= 'rotate_180',iconSize=80},
{type='button',x= 1 * 70 + 120,y = 3 * 70 + 120, r = 30, key= '1',iconSize=50},
{type='button',x= 2 * 70 + 120,y = 3 * 70 + 120, r = 30, key= '2',iconSize=50},
{type='button',x= 3 * 70 + 120,y = 3 * 70 + 120, r = 30, key= '3',iconSize=50},
{type='button',x= 4 * 70 + 120,y = 3 * 70 + 120, r = 30, key= '4',iconSize=50},
{type='button',x= 5 * 70 + 120,y = 3 * 70 + 120, r = 30, key= '5',iconSize=50},
{type='button',x= 1 * 70 + 120,y = 3 * 70 + 120, r = 30, key= 'menu_decide',iconSize=80},
-- {type='button',x= 2 * 70 + 120,y = 3 * 70 + 120, r = 30, key= '2',iconSize=80},
-- {type='button',x= 3 * 70 + 120,y = 3 * 70 + 120, r = 30, key= '3',iconSize=80},
-- {type='button',x= 4 * 70 + 120,y = 3 * 70 + 120, r = 30, key= '4',iconSize=80},
{type='button',x= 5 * 70 + 120,y = 3 * 70 + 120, r = 30, key= 'menu_back',iconSize=80},
-- {type='button',x= 1 * 70 + 120,y = 4 * 70 + 120, r = 30, key= 'up',iconSize=50},
{type='button',x= 2 * 70 + 120,y = 4 * 70 + 120, r = 30, key='touch_settings',iconSize=50},
{type='button',x= 3 * 70 + 120,y = 4 * 70 + 120, r = 30, key= 'align_view',iconSize=50},
{type='button',x= 4 * 70 + 120,y = 4 * 70 + 120, r = 30, key= 'menu_back',iconSize=50},
-- {type='button',x= 5 * 70 + 120,y = 4 * 70 + 120, r = 30, key= 'up',iconSize=50},
{type='button',x= 1 * 70 + 120,y = 4 * 70 + 120, r = 30, key= 'delete',iconSize=80},
{type='button',x= 2 * 70 + 120,y = 4 * 70 + 120, r = 30, key= 'tab',iconSize=80},
{type='button',x= 3 * 70 + 120,y = 4 * 70 + 120, r = 30, key= 'retry',iconSize=80},
{type='button',x= 4 * 70 + 120,y = 4 * 70 + 120, r = 30, key= 'align_view',iconSize=80},
{type='button',x= 5 * 70 + 120,y = 4 * 70 + 120, r = 30, key='touch_settings',iconSize=80},
}, -- 1
{

View File

@@ -24,6 +24,13 @@ local alternativeRfunction={
) then
scene = TouchConfigScene()
end
scene:onInputRelease{input="touch_settings", type="virtual"}
end,
align_view=function()
if scene.title ~= TouchConfigScene.title then
scene:onInputRelease{input="align_view", type="virtual"}
ALIGN_VIEW_RIGHT = ALIGN_VIEW_RIGHT == 1.4 and 0.5 or math.min(ALIGN_VIEW_RIGHT + 0.5,1.4)
end
end
}
@@ -31,18 +38,14 @@ local empty_quad=gc_newQuad(1,1,1,1,1,1)
-- A table containing quads used to draw icons for virtual control system.
local virtual_quad=setmetatable((function()
local t={}
local w=180
empty_quad=gc_newQuad(0,0,1,1,5*w,7*w)
local w=336
empty_quad=gc_newQuad(0,0,1,1,5*w,4*w)
for i,name in next,{
'left','right','up','down','',
'rotate_right','rotate_left','rotate_180','hold','align_view',
'','','','','',
'1','2','3','4','5',
'','retry','','menu_back','',
'touch_settings','','','','',
'','','','','menu_decide',
} do if #name>0 then t[name]=gc_newQuad((i-1)%5*w,math.floor((i-1)/5)*w,w,w,5*w,7*w) end end
t.rotate_right2, t.rotate_left2 = t.rotate_right, t.rotate_left
'left','right','up','down','hold',
'rotate_left','rotate_left2','rotate_right','rotate_right2','rotate_180',
'tab','menu_decide','delete','','',
'retry','align_view','menu_back','','',
} do if #name>0 then t[name]=gc_newQuad((i-1)%5*w,math.floor((i-1)/5)*w,w,w,5*w,4*w) end end
return t
end)(),{
__index=function() return empty_quad end

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

After

Width:  |  Height:  |  Size: 182 KiB