Final update for touch configuration scene

This commit is contained in:
Squishy (C6H12O6+NaCl+H2O)
2024-05-23 23:44:25 +07:00
parent ffe1bf5049
commit b14fe9c86c
5 changed files with 262 additions and 80 deletions

View File

@@ -32,9 +32,9 @@ BUTTON.setDefaultOption{
do
local _, t
if need_big_font then
_, t = FONT_big:getWrap(text, self.w * 2)
_, t = FONT_big:getWrap(text, (self.w - 10) * 2)
else
_, t = FONT_tromi:getWrap(text, self.w * 2)
_, t = FONT_tromi:getWrap(text, (self.w - 10) * 2)
end
lineAmount = #t
end
@@ -45,17 +45,18 @@ BUTTON.setDefaultOption{
local textPos = self.y + (self.h * 0.5) - textHeight
if need_big_font then
drawBigText(text, self.x, textPos, self.w, 'center')
drawBigText(text, self.x + 5, textPos, self.w - 10, self.textOrientation, self.textColor)
else
drawText(text, self.x, textPos, self.w, 'center')
drawText(text, self.x + 5, textPos, self.w - 10, self.textOrientation, self.textColor)
end
love.graphics.setColor(1, 1, 1, 0.8)
love.graphics.setColor(self.borderColor)
love.graphics.setLineWidth(1)
love.graphics.rectangle('line', self.x, self.y, self.w, self.h, self.r)
end,
backgroundColor = {0, 0, 0, 0.8},
pressColor = {0.4, 1, 1, 0.5}
pressColor = {0.4, 1, 1, 0.5},
borderColor = {1, 1, 1, 0.8},
}
-- Graphics