Löve Frames - A GUI Library

Showcase your libraries, tools and other projects that help your fellow love users.
AlexYeCu
Prole
Posts: 40
Joined: Fri May 30, 2014 4:08 pm

Re: Löve Frames - A GUI Library

Post by AlexYeCu » Tue May 19, 2020 3:16 pm

Here is a patch, but I'm not sure to make it mainstream
Thank you, I`ll check it at this week.
Some even call it unnatural.
Well, imagine any rpg game with actions binded to characters portraits. RMB click at a portrait opens inventory, LMB one opens stats and skills.
For example.
Or manipulating an item in inventory: one button for drag and drop, another one for use.
Love2d is the game engine first of all, and LMB actions are natural for games, I think.

AlexYeCu
Prole
Posts: 40
Joined: Fri May 30, 2014 4:08 pm

Re: Löve Frames - A GUI Library

Post by AlexYeCu » Sat May 23, 2020 10:13 am

New bug!
Text component can not show Cyrillic symbol (shows squares instead).
test.love
(2.04 MiB) Downloaded 11 times

AlexYeCu
Prole
Posts: 40
Joined: Fri May 30, 2014 4:08 pm

Re: Löve Frames - A GUI Library

Post by AlexYeCu » Sat May 23, 2020 10:16 am

And one more question: is it possible to use some kind of index to draw loveframes objects in some calls?
Layer of loveframes objects, then layer of love2d objects, then layer of other oveframes objects?

linux-man
Citizen
Posts: 67
Joined: Thu Apr 28, 2011 4:51 pm

Re: Löve Frames - A GUI Library

Post by linux-man » Sat May 23, 2020 8:50 pm

AlexYeCu wrote:
Sat May 23, 2020 10:13 am
New bug!
Text component can not show Cyrillic symbol (shows squares instead).
test.love
Not really. You need to assign a font with Cyrillic support. Missing

Code: Select all

_tf:SetFont(love.graphics.newFont( "DroidSans.ttf", 12))
Before you ask: No, skin fonts are not used on text object creation.
BUT, there is an assignement (not really used) on Text initialization.

Code: Select all

	local text_default_font = skin.directives.text_default_font
So, if you define a directives.text_default_font on your skin, you don't need to define a font on all your text objects.
Your love.load should have these lines

Code: Select all

loveframes.GetActiveSkin().controls.smallfont = love.graphics.newFont( "DroidSans.ttf", 10)
loveframes.GetActiveSkin().controls.imagebuttonfont = love.graphics.newFont( "DroidSans.ttf", 15)
loveframes.GetActiveSkin().directives.text_default_font = love.graphics.newFont( "DroidSans.ttf", 12)

linux-man
Citizen
Posts: 67
Joined: Thu Apr 28, 2011 4:51 pm

Re: Löve Frames - A GUI Library

Post by linux-man » Sat May 23, 2020 9:11 pm

AlexYeCu wrote:
Sat May 23, 2020 10:16 am
And one more question: is it possible to use some kind of index to draw loveframes objects in some calls?
Layer of loveframes objects, then layer of love2d objects, then layer of other oveframes objects?
No. There's only one loveframes.draw(). You can try to draw before and after, but GUI are assumed to be the top layer of any interface.
I looked around and it seems that all Love GUI libraries use the same paradigm.

AlexYeCu
Prole
Posts: 40
Joined: Fri May 30, 2014 4:08 pm

Re: Löve Frames - A GUI Library

Post by AlexYeCu » Sun May 24, 2020 3:34 pm

linux-man wrote:
Sat May 23, 2020 8:50 pm
Not really. You need to assign a font with Cyrillic support. Missing
I see, same as before: I've forgotten to check what font sets from skin.

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 12 guests