Make a simple BUTTON module

This commit is contained in:
Squishy (C6H12O6+NaCl+H2O)
2024-05-17 23:46:17 +07:00
parent 8f559ff88e
commit f26e4c75bd
3 changed files with 73 additions and 1 deletions

View File

@@ -2,6 +2,16 @@
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
)
-- Fonts
FONT_tromi = love.graphics.newFont('res/fonts/monofonto rg.otf', 28)
FONT_big = love.graphics.newFont('res/fonts/monofonto rg.otf', 56)