Updating The aspect ratio of the CEGUI at run time

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

rjvizexp
Just popping in
Just popping in
Posts: 1
Joined: Fri Jan 01, 2010 17:36

Updating The aspect ratio of the CEGUI at run time

Postby rjvizexp » Fri Jan 01, 2010 17:44

Hi Guys,

I am using CEGUI version 0.6 with Delta3D for my gaming application. CEGUI works very well when I run the application on full resolution. My application allows user to change the application viewport at run time, which makes the CEGUI Widgets distorted as the aspect ratio of the application changes. This problem can be solved if the aspect ratio can be maintained in CEGUI.
Is there any mechanism in CEGUI, which allows me to update the CEGUI for changing the aspect ratio ?

User avatar
scriptkid
Home away from home
Home away from home
Posts: 1178
Joined: Wed Jan 12, 2005 12:06
Location: The Hague, The Netherlands
Contact:

Re: Updating The aspect ratio of the CEGUI at run time

Postby scriptkid » Fri Jan 01, 2010 22:34

Hi and welcome :)

Please see this post:
viewtopic.php?f=10&t=4134&p=18970&hilit=aspect+ratio#p18970

You need to call 'setNativeResolution' on your fonts and your imagesets, while iterating them. In 0.7 it's become easier, with just one call to the System object, which handles those details..

HTH.
Check out my released snake game using Cegui!


Return to “Modifications / Integrations / Customisations”

Who is online

Users browsing this forum: No registered users and 9 guests