mirror of
https://gitea.com/SweetSea-ButImNotSweet/tromi_mobile.git
synced 2025-01-08 17:33:09 +08:00
TEST
This commit is contained in:
25
load.lua
25
load.lua
@@ -3,14 +3,23 @@ bigint = require "libs.bigint.bigint"
|
||||
number_names = require "libs.bigint.named-powers-of-ten"
|
||||
|
||||
BUTTON = require "libs.simple-button"
|
||||
BUTTON.setDefaultDrawingTextFunction(
|
||||
function(name, x, y, w, h)
|
||||
love.graphics.setLineWidth(1)
|
||||
love.graphics.line(0, y + (h * 0.25), 640, y + (h * 0.25))
|
||||
love.graphics.line(0, y + (h * 0.75), 640, y + (h * 0.75))
|
||||
drawText(name, x, y + (h * 0.25), w, 'center')
|
||||
end
|
||||
)
|
||||
BUTTON.setDefaultOption{
|
||||
draw = function(self)
|
||||
love.graphics.setColor(self.backgroundColor)
|
||||
love.graphics.rectangle('fill', self.x, self.y, self.w, self.h, self.r)
|
||||
|
||||
if self._hovering then
|
||||
love.graphics.setColor(self.hoverColor)
|
||||
love.graphics.rectangle('fill', self.x, self.y, self.w, self.h, self.r)
|
||||
end
|
||||
|
||||
drawText(self.name, self.x, self.y + (self.h * 0.25), self.w, 'center')
|
||||
|
||||
love.graphics.setColor(self.borderColor)
|
||||
love.graphics.rectangle('line', self.x, self.y, self.w, self.h, self.r)
|
||||
end,
|
||||
backgroundColor = {0, 0, 0, 0.7}
|
||||
}
|
||||
|
||||
-- Fonts
|
||||
FONT_tromi = love.graphics.newFont('res/fonts/monofonto rg.otf', 28)
|
||||
|
||||
Reference in New Issue
Block a user