mirror of
https://gitea.com/SweetSea-ButImNotSweet/tromi_mobile.git
synced 2025-01-08 17:33:09 +08:00
Not important uodates
This commit is contained in:
@@ -99,7 +99,7 @@ end
|
||||
---@return table t
|
||||
---Merge 2 tables into one<br>(**WARNING**: t2 can **overwrite** some value of t1 if both tables have some same keys!)
|
||||
function table.merge(t1,t2)
|
||||
local t
|
||||
local t = {}
|
||||
for k, v in pairs(t1) do t[k] = v end
|
||||
for k, v in pairs(t2) do t[k] = v end
|
||||
return t
|
||||
|
||||
@@ -1084,14 +1084,14 @@ function GameMode:drawBackground()
|
||||
BACKGROUNDS[bg]:play()
|
||||
end
|
||||
if BACKGROUNDS[bg]:tell() >= limit then
|
||||
BACKGROUNDS[bg]:rewind()
|
||||
BACKGROUNDS[bg]:rewind()
|
||||
end
|
||||
if bg == 0 or bg == 8 or bg == 9 or bg == 3 then brightness = 0.7 end
|
||||
love.graphics.setColor(brightness, brightness, brightness, 1)
|
||||
love.graphics.draw(
|
||||
BACKGROUNDS[bg],
|
||||
0, 0, 0,
|
||||
0.5, 0.5
|
||||
1,1
|
||||
)
|
||||
end
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ local TouchConfigScene = SCENE:extend()
|
||||
TouchConfigScene.title = "Touchscreen config\n(you can tap anywhere on touch screen to select this)"
|
||||
|
||||
local origin_touchPressed, origin_touchReleased, origin_touchMoved
|
||||
|
||||
local function onPressed(id, x, y)
|
||||
if not VCTRL.press(x, y, id) then
|
||||
-- TODO
|
||||
@@ -21,7 +22,21 @@ function TouchConfigScene:new()
|
||||
-- Temproraily hijacking game's touch-related functions
|
||||
origin_touchPressed, origin_touchReleased, origin_touchMoved = love.touchpressed, love.touchreleased, love.touchmoved
|
||||
|
||||
SETTINGS.input.keys = table.merge(SETTINGS.input.keys, SETTINGS.input.touch)
|
||||
SETTINGS.input.keys = table.merge(
|
||||
SETTINGS.input.keys,
|
||||
{
|
||||
enter = 'menu_decide',
|
||||
acback = 'menu_back',
|
||||
f13 = 'up',
|
||||
f14 = 'down',
|
||||
f15 = 'left',
|
||||
f16 = 'right',
|
||||
f17 = 'rotate_left',
|
||||
f18 = 'rotate_left2',
|
||||
f19 = 'rotate_right',
|
||||
f20 = 'rotate_right2',
|
||||
}
|
||||
)
|
||||
end
|
||||
function TouchConfigScene:update()
|
||||
-- TODO
|
||||
|
||||
@@ -25,7 +25,6 @@ function TrainingScene:new()
|
||||
rotate_left2=false,
|
||||
rotate_right=false,
|
||||
rotate_right2=false,
|
||||
hold=false,
|
||||
}
|
||||
self.paused = false
|
||||
end
|
||||
|
||||
14
settings.lua
14
settings.lua
@@ -11,22 +11,10 @@ local _defaultSettings = {
|
||||
---@class input
|
||||
---@field keys table <string, string>
|
||||
---@field joysticks table <string, string>
|
||||
---@field mobile table <string, string>
|
||||
---@field touch table <string, string>
|
||||
input = {
|
||||
keys = {},
|
||||
joysticks = {},
|
||||
mobile = { -- Should not be changed for any reason, used for mobile only
|
||||
enter = 'menu_decide',
|
||||
acback = 'menu_back',
|
||||
f13 = 'up',
|
||||
f14 = 'down',
|
||||
f15 = 'left',
|
||||
f16 = 'right',
|
||||
f17 = 'rotate_left',
|
||||
f18 = 'rotate_left2',
|
||||
f19 = 'rotate_right',
|
||||
f20 = 'rotate_right2',
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user