Not important uodates

This commit is contained in:
SweetSea-ButImNotSweet
2024-04-24 17:00:06 +07:00
parent 5fc92acbb7
commit 5f2687f855
5 changed files with 20 additions and 18 deletions

View File

@@ -99,7 +99,7 @@ end
---@return table t ---@return table t
---Merge 2 tables into one<br>(**WARNING**: t2 can **overwrite** some value of t1 if both tables have some same keys!) ---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) 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(t1) do t[k] = v end
for k, v in pairs(t2) do t[k] = v end for k, v in pairs(t2) do t[k] = v end
return t return t

View File

@@ -1084,14 +1084,14 @@ function GameMode:drawBackground()
BACKGROUNDS[bg]:play() BACKGROUNDS[bg]:play()
end end
if BACKGROUNDS[bg]:tell() >= limit then if BACKGROUNDS[bg]:tell() >= limit then
BACKGROUNDS[bg]:rewind() BACKGROUNDS[bg]:rewind()
end end
if bg == 0 or bg == 8 or bg == 9 or bg == 3 then brightness = 0.7 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.setColor(brightness, brightness, brightness, 1)
love.graphics.draw( love.graphics.draw(
BACKGROUNDS[bg], BACKGROUNDS[bg],
0, 0, 0, 0, 0, 0,
0.5, 0.5 1,1
) )
end end

View File

@@ -2,6 +2,7 @@ local TouchConfigScene = SCENE:extend()
TouchConfigScene.title = "Touchscreen config\n(you can tap anywhere on touch screen to select this)" TouchConfigScene.title = "Touchscreen config\n(you can tap anywhere on touch screen to select this)"
local origin_touchPressed, origin_touchReleased, origin_touchMoved local origin_touchPressed, origin_touchReleased, origin_touchMoved
local function onPressed(id, x, y) local function onPressed(id, x, y)
if not VCTRL.press(x, y, id) then if not VCTRL.press(x, y, id) then
-- TODO -- TODO
@@ -21,7 +22,21 @@ function TouchConfigScene:new()
-- Temproraily hijacking game's touch-related functions -- Temproraily hijacking game's touch-related functions
origin_touchPressed, origin_touchReleased, origin_touchMoved = love.touchpressed, love.touchreleased, love.touchmoved 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 end
function TouchConfigScene:update() function TouchConfigScene:update()
-- TODO -- TODO

View File

@@ -25,7 +25,6 @@ function TrainingScene:new()
rotate_left2=false, rotate_left2=false,
rotate_right=false, rotate_right=false,
rotate_right2=false, rotate_right2=false,
hold=false,
} }
self.paused = false self.paused = false
end end

View File

@@ -11,22 +11,10 @@ local _defaultSettings = {
---@class input ---@class input
---@field keys table <string, string> ---@field keys table <string, string>
---@field joysticks table <string, string> ---@field joysticks table <string, string>
---@field mobile table <string, string> ---@field touch table <string, string>
input = { input = {
keys = {}, keys = {},
joysticks = {}, 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',
}
} }
} }