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,7 +13,8 @@ function example.func(loveframes, centerarea)
imagebutton:SetImage("resources/magic.png")
imagebutton:SetPos(5, 30)
imagebutton:SizeToImage()
imagebutton:Center()
end
return example
return example

View File

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

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)
@ -45,4 +45,4 @@ function example.func(loveframes, centerarea)
end
return example
return example

View File

@ -119,10 +119,16 @@ end
function love.load()
local font = love.graphics.newFont(12)
love.graphics.setFont(font)
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.