Small Demo changes. Added ttf

This commit is contained in:
João Lopes 2020-04-28 18:02:00 +01:00
parent cde31673a1
commit 8e021065df
5 changed files with 14 additions and 6 deletions

View File

@ -13,6 +13,7 @@ function example.func(loveframes, centerarea)
imagebutton:SetImage("resources/magic.png")
imagebutton:SetPos(5, 30)
imagebutton:SizeToImage()
imagebutton:Center()
end

View File

@ -38,6 +38,7 @@ function example.func(loveframes, centerarea)
menu:SetVisible(false)
frame.menu_example = menu
text.menu_example = menu
end

View File

@ -17,7 +17,7 @@ function example.func(loveframes, centerarea)
object:Clear()
end
end
textinput:SetFont(love.graphics.newFont(12))
textinput:SetFont(love.graphics.newFont( "resources/FreeSans-LrmZ.ttf", 12))
local togglebutton = loveframes.Create("button", frame)
togglebutton:SetPos(5, 60)

View File

@ -123,6 +123,12 @@ function love.load()
loveframes = require("loveframes")
tween = require("tween")
-- Change fonts on all registered skins
for _, skin in pairs(loveframes.skins) do
skin.controls.smallfont = love.graphics.newFont( "resources/FreeSans-LrmZ.ttf", 12)
skin.controls.imagebuttonfont = love.graphics.newFont( "resources/FreeSans-LrmZ.ttf", 15)
end
-- table to store available examples
demo.examples = {}
demo.examples[1] = {category_title = "Object Demonstrations", registered = {}}

Binary file not shown.