mirror of
https://gitea.com/SweetSea-ButImNotSweet/tromi_mobile.git
synced 2025-01-08 17:33:09 +08:00
Update touch control
This commit is contained in:
@@ -677,6 +677,7 @@ function GameMode:onPieceEnter()
|
||||
end
|
||||
|
||||
function GameMode:onGameOver()
|
||||
if not self.training then VCTRL.toggle(false) end
|
||||
if not self.input_playback and not self.training and not PENTO_MODE then
|
||||
if not self.did_grades then
|
||||
self.grade_score = self.grade_score + self.speed_level
|
||||
|
||||
@@ -52,6 +52,24 @@ buttonList = {
|
||||
SCENE = TouchConfigPreviewScene()
|
||||
end
|
||||
},
|
||||
resetAll = BUTTON.new{
|
||||
text = "RESET\nALL",
|
||||
x = 570, y = 80, w = 60, h = 40,
|
||||
codeWhenReleased = function()
|
||||
local selection = love.window.showMessageBox(
|
||||
"Save config?", "Are you really sure about RESETTING ALL touchscreen configuration?",
|
||||
{"Yes", "No", escapebutton = 2, enterbutton = 1},
|
||||
"info", true
|
||||
)
|
||||
if selection == 1 then
|
||||
VCTRL.focus = nil; focusingButton = nil
|
||||
hasChanged = false
|
||||
VCTRL.clearAll()
|
||||
VCTRL.new(SETTINGS.__default__.input.virtual)
|
||||
SETTINGS.input.virtual = SETTINGS.__default__.input.virtual
|
||||
end
|
||||
end
|
||||
},
|
||||
menuScreen = BUTTON.new{
|
||||
text = "MENU",
|
||||
x = 570, y = 5, w = 60, h = 25,
|
||||
@@ -59,7 +77,7 @@ buttonList = {
|
||||
if hasChanged or SETTINGS.firstTime then
|
||||
local selection = love.window.showMessageBox(
|
||||
"Save config?", "Do you want to save your changes before exiting?",
|
||||
{"Save", "Discard", "Keep editing", escapebutton = 2, enterbutton = 1},
|
||||
{"Save", "Discard", "Keep editing", escapebutton = 3, enterbutton = 1},
|
||||
"info", true
|
||||
)
|
||||
if selection == 1 then
|
||||
@@ -145,12 +163,12 @@ local function sliderList_update()
|
||||
end
|
||||
end
|
||||
|
||||
function TouchConfigScene:new(fromPreviewScene)
|
||||
function TouchConfigScene:new()
|
||||
VCTRL.toggle(true)
|
||||
|
||||
VCTRL.focus = nil
|
||||
focusingButton = nil
|
||||
hasChanged = fromPreviewScene
|
||||
|
||||
Grid:new(10, 20)
|
||||
-- TODO
|
||||
end
|
||||
|
||||
@@ -32,7 +32,7 @@ local _defaultSettings = {
|
||||
}
|
||||
|
||||
SETTINGS = setmetatable(
|
||||
{},
|
||||
{__default__ = _defaultSettings},
|
||||
{
|
||||
__index = function(_, k)
|
||||
if _settings[k] == nil then
|
||||
|
||||
Reference in New Issue
Block a user