Resizing and scaling

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

User avatar
dsmirnov
Just popping in
Just popping in
Posts: 7
Joined: Thu Oct 13, 2005 11:38

Resizing and scaling

Postby dsmirnov » Wed Oct 19, 2005 08:51

Greetings.

Is there a way to completely disable auto-scaling of GUI elements (windows and buttons) when I resize application window (maximize it for example)?

Because "AutoScaled" property doesn't help in such case.

User avatar
lindquist
CEGUI Team (Retired)
Posts: 770
Joined: Mon Jan 24, 2005 21:20
Location: Copenhagen, Denmark

Re: Resizing and scaling

Postby lindquist » Wed Oct 19, 2005 11:54

if you make sure that your fonts and imagesets have the auto scale atttribute set to false, you should experience no scaling.

If you mean the window sizes etc, you'll have to use only absolute coordinates!

User avatar
dsmirnov
Just popping in
Just popping in
Posts: 7
Joined: Thu Oct 13, 2005 11:38

Re: Resizing and scaling

Postby dsmirnov » Thu Oct 20, 2005 13:39

Greetings.

As I see "AutoScaled" atttribute for imagesets and fonts only enables/disables scaling with different screen resolutions.

But I have a bit different task: simple OpenGL application window (not fullscreen) and when I resize/maximize this window all it's CEGUI contents automatically scaled as well according to sizes of application window (even mouse pointers). I tried to use only absolute coordinates but it doesn't help. I tried to set size of default CEGUI window to fixed size but it doesn't help as well. It looks like CEGUI absolute/relative coordinates are "relative" to application window sizes.

I need to make window with completely disabled scaling of design elements irrelative to app window resize.

May be I missed something but I still not sure if it's possible to achieve this without change of base code.

User avatar
lindquist
CEGUI Team (Retired)
Posts: 770
Joined: Mon Jan 24, 2005 21:20
Location: Copenhagen, Denmark

Re: Resizing and scaling

Postby lindquist » Thu Oct 20, 2005 17:00

are you remembering to update renderer with the new screen size when resizing?

If you dont do this, you'll get some scaling if your viewport _is_ resized to fit!

The mouse cursor or any other imagery does not scale at all with AutoScale disabled!

User avatar
dsmirnov
Just popping in
Just popping in
Posts: 7
Joined: Thu Oct 13, 2005 11:38

Re: Resizing and scaling

Postby dsmirnov » Fri Oct 21, 2005 08:32

Greetings.

Ok. Let's take simple example from CEGUI samples:
Sample_FirstWindow.

This sample uses TaharezLook.imageset. I have set AutoScaled attribute in it to false.
Also it uses Commonwealth-10.font. I have set AutoScaled attribute to false as well.

Then I changed size and position of single CEGUI window to use absolute coordinates and recompiled example.

What I see after all? Whem I resize application window, everything inside it is resized to fit as well (including mouse cursor).
It behaves like "Change image size" in Photoshop. I need it to behave more like "Change Canvas size".
Where to look? Renderer events?

User avatar
lindquist
CEGUI Team (Retired)
Posts: 770
Joined: Mon Jan 24, 2005 21:20
Location: Copenhagen, Denmark

Re: Resizing and scaling

Postby lindquist » Fri Oct 21, 2005 12:46

are you doing this just after you resize ?

Code: Select all

CEGUI::System::getSingleton().getRenderer()->setDisplaySize(CEGUI::Size(nW,nH));

User avatar
dsmirnov
Just popping in
Just popping in
Posts: 7
Joined: Thu Oct 13, 2005 11:38

Re: Resizing and scaling

Postby dsmirnov » Fri Oct 21, 2005 14:07

Oops. That's what I was missing.

Thank you very much. Now it's ok.


Return to “Modifications / Integrations / Customisations”

Who is online

Users browsing this forum: No registered users and 11 guests