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.
Resizing and scaling
Moderators: CEGUI MVP, CEGUI Team
- lindquist
- CEGUI Team (Retired)
- Posts: 770
- Joined: Mon Jan 24, 2005 21:20
- Location: Copenhagen, Denmark
Re: Resizing and scaling
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!
If you mean the window sizes etc, you'll have to use only absolute coordinates!
Re: Resizing and scaling
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.
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.
- lindquist
- CEGUI Team (Retired)
- Posts: 770
- Joined: Mon Jan 24, 2005 21:20
- Location: Copenhagen, Denmark
Re: Resizing and scaling
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!
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!
Re: Resizing and scaling
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?
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?
- lindquist
- CEGUI Team (Retired)
- Posts: 770
- Joined: Mon Jan 24, 2005 21:20
- Location: Copenhagen, Denmark
Re: Resizing and scaling
are you doing this just after you resize ?
Code: Select all
CEGUI::System::getSingleton().getRenderer()->setDisplaySize(CEGUI::Size(nW,nH));
Re: Resizing and scaling
Oops. That's what I was missing.
Thank you very much. Now it's ok.
Thank you very much. Now it's ok.
Return to “Modifications / Integrations / Customisations”
Who is online
Users browsing this forum: No registered users and 12 guests