support increasing/decreasing font size
This commit is contained in:
parent
f63c181dd3
commit
abd6806e42
|
@ -1,8 +1,8 @@
|
|||
draw_data = function()
|
||||
love.graphics.setLineWidth(3)
|
||||
local f, c, py = 36, 50, 5 -- font size, cell side, padding
|
||||
local namepx = 5
|
||||
love.graphics.setFont(love.graphics.newFont(f))
|
||||
local namepx, py = 5, 5
|
||||
love.graphics.setFont(love.graphics.newFont(Font_size))
|
||||
local c = love.graphics.getFont():getHeight() + py*2
|
||||
local rside = max_row_width(Data) + namepx*2 -- width of name column
|
||||
local nt = table.size(Data)
|
||||
local hrow = total_row_width(Data) + namepx*2*nt
|
||||
|
|
|
@ -1,5 +1,16 @@
|
|||
on.keychord_press = function(chord, key)
|
||||
if chord == 'C-r' then
|
||||
if chord == 'C--' then
|
||||
if Font_size > 2 then
|
||||
Font_size = Font_size - 1
|
||||
love.graphics.setFont(love.graphics.newFont(Font_size))
|
||||
end
|
||||
elseif chord == 'C-=' then
|
||||
Font_size = Font_size + 1
|
||||
love.graphics.setFont(love.graphics.newFont(Font_size))
|
||||
elseif chord == 'C-0' then
|
||||
Font_size = 36
|
||||
love.graphics.setFont(love.graphics.newFont(Font_size))
|
||||
elseif chord == 'C-r' then
|
||||
Rows = ordered_keys(Data)
|
||||
end
|
||||
end
|
|
@ -0,0 +1 @@
|
|||
Font_size = 36
|
Loading…
Reference in New Issue