## Löve Frames - A GUI Library

AlexYeCu
Citizen
Posts: 52
Joined: Fri May 30, 2014 4:08 pm

### Re: Löve Frames - A GUI Library

Here is a patch, but I'm not sure to make it mainstream
Thank you, Ill 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
Citizen
Posts: 52
Joined: Fri May 30, 2014 4:08 pm

### Re: Löve Frames - A GUI Library

New bug!
Text component can not show Cyrillic symbol (shows squares instead).
test.love

AlexYeCu
Citizen
Posts: 52
Joined: Fri May 30, 2014 4:08 pm

### Re: Löve Frames - A GUI Library

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

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.

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

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
Citizen
Posts: 52
Joined: Fri May 30, 2014 4:08 pm

### Re: Löve Frames - A GUI Library

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.

mutantant
Prole
Posts: 6
Joined: Tue Feb 05, 2013 12:02 am

### Re: Löve Frames - A GUI Library

UPDATE: It was a bug in a 3rd party lib used by LoveFrames if LoveFrames is required from a directory other than the root game directory. See https://github.com/linux-man/LoveFrames/issues/6, I posted a quick fix until the lib is updated, and the creator of LoveFrames has been notified will do what need to be done Glad it wasn't me messing up somehow.

Leaving this here for our overlord and master, Google, for those unlucky souls who run into the same thing until it's fixed.

------

ORIGINAL POST:

I'm a little rusty with Lua, not that I was ever an expert, but I'm running into this error when requiring loveframes:

Code: Select all

libs/loveframes/init.lua:305: attempt to index local 'base' (a nil value)
Now, I've required the project correctly, I believe (or it wouldn't even be dipping into init.lua:

Code: Select all

loveframes = require "libs.loveframes"`
(and the library is under PROJECTDIR/libs/loveframes/)

So, before I start trying to figure out the scope issue with base here, I figured I'd ask if anyone else sees this issue? Is it something I need to fix, something to do with Love2D version, etc?

Using the most recent Love2D on MacOS Catalina.

(p.s. Strangely the demo runs fine if I load *that* into Love, no errors thrown, even as my require statement breaks the program I also tried to find this problem vis Google and the forum search, so forgive me if it's been answered before, I just couldn't find anything on it.)

monolifed
Party member
Posts: 143
Joined: Sat Feb 06, 2016 9:42 pm

### Re: Löve Frames - A GUI Library

https://github.com/monolifed/l2d-frames
Last version I was working on. Don't expect it to work

I also attempted to rewrite it. But it didn't go well
https://github.com/monolifed/l2d-boxui

### Who is online

Users browsing this forum: No registered users and 13 guests
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.25274381041526794, "perplexity": 6448.189748781286}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2020-50/segments/1606141216897.58/warc/CC-MAIN-20201130161537-20201130191537-00147.warc.gz"}