[SOLVED] Using AspectMode and getting actual size

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

MikeSwartz
Just popping in
Just popping in
Posts: 13
Joined: Mon Aug 05, 2013 16:31

[SOLVED] Using AspectMode and getting actual size

Postby MikeSwartz » Wed Sep 04, 2013 15:41

I have a static image where I'm setting the size to {{1, 0}, {0.08, 0}} but the aspectmode is on shrink so it scales properly to be about a tenth of the screen size in height. I would like to get the newly calculated size in a scale rather than in a pixel offset during run time, but when I run getSize, I just get 1 for the width, not the new width calculated for the proper aspect mode (which should be something close to .08).

What is the best way to get this width value?
Last edited by MikeSwartz on Fri Sep 06, 2013 15:51, edited 1 time in total.

User avatar
Kulik
CEGUI Team
Posts: 1382
Joined: Mon Jul 26, 2010 18:47
Location: Czech Republic
Contact:

Re: Using AspectMode and getting actual size

Postby Kulik » Wed Sep 04, 2013 16:39

Hi, try Window::getPixelSize

MikeSwartz
Just popping in
Just popping in
Posts: 13
Joined: Mon Aug 05, 2013 16:31

Re: Using AspectMode and getting actual size

Postby MikeSwartz » Fri Sep 06, 2013 15:51

Got it thank you very much!


Return to “Help”

Who is online

Users browsing this forum: No registered users and 7 guests