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,6 +13,7 @@ function example.func(loveframes, centerarea)
|
|||||||
imagebutton:SetImage("resources/magic.png")
|
imagebutton:SetImage("resources/magic.png")
|
||||||
imagebutton:SetPos(5, 30)
|
imagebutton:SetPos(5, 30)
|
||||||
imagebutton:SizeToImage()
|
imagebutton:SizeToImage()
|
||||||
|
imagebutton:Center()
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -38,6 +38,7 @@ function example.func(loveframes, centerarea)
|
|||||||
menu:SetVisible(false)
|
menu:SetVisible(false)
|
||||||
|
|
||||||
frame.menu_example = menu
|
frame.menu_example = menu
|
||||||
|
text.menu_example = menu
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@ function example.func(loveframes, centerarea)
|
|||||||
object:Clear()
|
object:Clear()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
textinput:SetFont(love.graphics.newFont(12))
|
textinput:SetFont(love.graphics.newFont( "resources/FreeSans-LrmZ.ttf", 12))
|
||||||
|
|
||||||
local togglebutton = loveframes.Create("button", frame)
|
local togglebutton = loveframes.Create("button", frame)
|
||||||
togglebutton:SetPos(5, 60)
|
togglebutton:SetPos(5, 60)
|
||||||
|
@ -123,6 +123,12 @@ function love.load()
|
|||||||
loveframes = require("loveframes")
|
loveframes = require("loveframes")
|
||||||
tween = require("tween")
|
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
|
-- table to store available examples
|
||||||
demo.examples = {}
|
demo.examples = {}
|
||||||
demo.examples[1] = {category_title = "Object Demonstrations", registered = {}}
|
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