diff --git a/scene/touch_config.lua b/scene/touch_config.lua index f106961..8c0b895 100644 --- a/scene/touch_config.lua +++ b/scene/touch_config.lua @@ -1,6 +1,12 @@ local TouchConfigScene = SCENE:extend() TouchConfigScene.title = "Touchscreen config\n(you can tap anywhere on touch screen to select this)" +--[[ + TODO: + 1. Can import and export data + 2. Add behaviors +]] + local widgetList = { select_widget = BUTTON.new{ text = "Select key\n[Rotate right 2]", @@ -9,28 +15,28 @@ local widgetList = { BUTTON.new{ text = "[—]\nSmaller", - x = 140, y = 10, w = 70, h = 50, + x = 145, y = 10, w = 100, h = 50, }, BUTTON.new{ text = "Size: 50\nTap to reset", - x = 220, y = 10, w = 110, h = 50, + x = 255, y = 10, w = 100, h = 50, }, BUTTON.new{ text = "[+]\nBigger", - x = 340, y = 10, w = 70, h = 50, + x = 365, y = 10, w = 100, h = 50, }, BUTTON.new{ - text = "[—]\nBlurrier", - x = 140, y = 70, w = 70, h = 50, + text = "[—]\nCan't see", + x = 145, y = 70, w = 100, h = 50, }, BUTTON.new{ text = "Opacity: 50%\nTap to reset", - x = 220, y = 70, w = 110, h = 50, + x = 255, y = 70, w = 100, h = 50, }, BUTTON.new{ - text = "[+]\nClearer", - x = 340, y = 70, w = 70, h = 50, + text = "[+]\nTotally see", + x = 365, y = 70, w = 100, h = 50, }, BUTTON.new{ @@ -41,12 +47,10 @@ local widgetList = { BUTTON.new{ text = "DISCARD\nchanges", x = 480, y = 70, w = 70, h = 50, - codeWhenReleased = function() SCENE = TitleScene() end }, BUTTON.new{ text = "RESET to\nDEFAULT", x = 560, y = 70, w = 70, h = 50, - codeWhenReleased = function() SCENE = TitleScene() end }, } @@ -93,6 +97,7 @@ function TouchConfigScene:onInputPress(e) widgetList_press() end end +---@param e SCENE_onInput function TouchConfigScene:onInputRelease(e) if e.type == "mouse" then widgetList_release() diff --git a/settings.lua b/settings.lua index e39fe0a..dcf4681 100644 --- a/settings.lua +++ b/settings.lua @@ -16,6 +16,18 @@ local _defaultSettings = { input = { keys = {}, joysticks = {}, + virtual = { + {type='button',x= 70,y=280,key= 'up',r=45,iconSize=60,alpha=0.4}, + {type='button',x= 70,y=430,key= 'down',r=45,iconSize=60,alpha=0.4}, + {type='button',x= -5,y=355,key= 'left',r=45,iconSize=60,alpha=0.4}, + {type='button',x= 145,y=355,key= 'right',r=45,iconSize=60,alpha=0.4}, + {type='button',x=640- -5,y=355,key= 'rotate_left',r=45,iconSize=60,alpha=0.4}, + {type='button',x=640-145,y=355,key= 'rotate_left2',r=45,iconSize=60,alpha=0.4}, + {type='button',x=640- 70,y=430,key= 'rotate_right',r=45,iconSize=60,alpha=0.4}, + {type='button',x=640- 70,y=280,key='rotate_right2',r=45,iconSize=60,alpha=0.4}, + {type='button',x=320- 40,y=420,key= 'menu_decide',r=35,iconSize=60,alpha=0.4}, + {type='button',x=320+ 40,y=420,key= 'menu_back',r=35,iconSize=60,alpha=0.4}, + } } }