Image-scalable absolute-dims

For help with anything that CEGUI doesn't offer straight out-of-the-box, e.g.:
- Implementation of new features, such as new Core classes, widgets, WindowRenderers, etc. ...
- Modification of any existing features for specific purposes
- Integration of CEGUI in new engines or frameworks and writing of new plugins (Renderer, Parser, ...) or modules

Moderators: CEGUI MVP, CEGUI Team

Phobius
Just popping in
Just popping in
Posts: 7
Joined: Thu Apr 16, 2009 03:28

Image-scalable absolute-dims

Postby Phobius » Thu Apr 16, 2009 03:39

Greetings. I've been using CEGUI for a while now and have one fundamental issue to which i'm hoping someone has a clever solution. When I write my looknfeel files, I am currently forced to use a lot of <DimOperator>s with <ImageDim>s in order to combat the scaling issue.

Now to explain my problem in full. I want my GUI to be proportionally the same on every single resolution it is ever viewed on. Naturally, for this purpose I set AutoScaled to "true" in the imageset file. This brings up a problem for which I will use the example of a simple editbox. The textarea of an editbox is to sit inside the confines of the editbox frame. With AutoScaled set to "false", this would be as simple as making the top and left edges start at <AbsoluteDim value="whatever the pixel offset from the left or top edge of the editbox graphic to the place in the graphic where the textbox should start is"/>. With AutoScaled as "true", this is no longer so simple.

I have a GUI design where corner pieces of some frames or buttons are not exactly where i want things like textboxes to start. I am therefore forced to create "dummy" image definitions in my imageset so that when i use these with <ImageDim>, they scale correctly along with the rest of the images in the imageset. <AbsoluteDim> does not scale along with the AutoScaled images and therefore cannot be used to offset when autoscaling is enabled.

My ultimate question is: Is there some feature in CEGUI that "enables" my <AbsoluteDim>s to be scaled as per the images that they are positioning?
--Or--
Is there another, cleaner way to do this?

If we thing about the syntax of the looknfeel file, then all you'd need to do would be to take the existing <AbsoluteDim> syntax and give it an extra parameter like "imageset" that would define the imageset to which your absolute dimensions scale.

Thanks.

P.S.
I'm being presumptuous in the sense that this isn't done. If it is, all i need is a pointer to the right documentation. Thank you again.

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Postby CrazyEddie » Thu Apr 16, 2009 08:46

Hi, and welcome :)

Yeah, I understand the issue you're having, though unfortunately on this occasion I'm not aware of any clever solutions to the issue :?

I think we're going to have to add it as a feature request and extend the system to support this. I envision adding an AutoscaleDim or something to enable this support.

CE.

Phobius
Just popping in
Just popping in
Posts: 7
Joined: Thu Apr 16, 2009 03:28

Postby Phobius » Thu Apr 16, 2009 10:14

No worries. All I needed to know was that I wasn't wasting my time =). Thanks. Time to soldier on with my dummy imageset images idea.

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Postby CrazyEddie » Thu Apr 16, 2009 10:49

I'll add this to my list of planned enhancements to the looknfeel system :)


Return to “Modifications / Integrations / Customisations”

Who is online

Users browsing this forum: No registered users and 5 guests