Can a widget automatically set its size?

Discussion regarding the development of CEGUI itself - as opposed to questions about CEGUI usage that should be in the help forums.

Moderators: CEGUI MVP, CEGUI Team

YaronCT
CEGUI Team
Posts: 448
Joined: Fri Jun 19, 2015 12:18
Location: Kiryat-Bialik, Israel

Re: Can a widget automatically set its size?

Postby YaronCT » Sun Oct 18, 2015 13:48

But what's the advantage of user strings over properties? Couldn't we, just as well, add it as properties in branch "v0-8" without adding it as fields? (and add it as fields in branch "v0")

User avatar
Ident
CEGUI Team
Posts: 1998
Joined: Sat Oct 31, 2009 13:57
Location: Austria

Re: Can a widget automatically set its size?

Postby Ident » Sun Oct 18, 2015 14:01

And how would you store it "as property"?
CrazyEddie: "I don't like GUIs"

YaronCT
CEGUI Team
Posts: 448
Joined: Fri Jun 19, 2015 12:18
Location: Kiryat-Bialik, Israel

Re: Can a widget automatically set its size?

Postby YaronCT » Sun Oct 18, 2015 15:06

Oh, for some reason I was sure the properties are stored as a whole in some map... So I understand this is not the case, they use getters and setters to store their values... Sorry, now everything is clear, I'll use user strings then, thanx!

User avatar
Ident
CEGUI Team
Posts: 1998
Joined: Sat Oct 31, 2009 13:57
Location: Austria

Re: Can a widget automatically set its size?

Postby Ident » Sun Oct 18, 2015 15:37

No problem! Yes, you can just use them in v0-8.

having getters and setters to access the stored values allows us to store them wherever we want and how we want, which clearly has benefits and also allows to prevent type->string and string->type casting where it is not necessary. The "user string" functionality is poorly named in my opinion, since LNF definitions are not exactly "users" and those most of all depend on this functionality. We should probably rename this in default for the future...
CrazyEddie: "I don't like GUIs"


Return to “CEGUI Library Development Discussion”

Who is online

Users browsing this forum: No registered users and 12 guests