mirror of
https://github.com/linux-man/LoveFrames.git
synced 2024-11-18 16:04:22 +00:00
Small Demo changes. Added ttf
This commit is contained in:
parent
cde31673a1
commit
8e021065df
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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 = {}}
|
||||
|
BIN
demo/resources/FreeSans-LrmZ.ttf
Normal file
BIN
demo/resources/FreeSans-LrmZ.ttf
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user