drawing controls with fixed pixel size

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
muhkuh
Not too shy to talk
Not too shy to talk
Posts: 22
Joined: Wed Jan 12, 2005 12:06

drawing controls with fixed pixel size

Postby muhkuh » Sun Nov 28, 2004 23:38

Hello,

I want to draw a checkbox with fixed absolute pixel size. I use:

cbox->setMetricsMode(Absolute);
cbox->setXPosition(100);
cbox->setYPosition(100);
cbox->setWidth(100);
cbox->setHeight(10);
cbox->setText("glow");
cbox->setSelected(m_bGlow);

and
System::getSingleton().getDefaultFont()->setAutoScalingEnabled(false);

The problem is that the checkbox image itself (displaying the checked/unchecked status) is scaled relative to the resolution of the root window. :?

What to do?

User avatar
muhkuh
Not too shy to talk
Not too shy to talk
Posts: 22
Joined: Wed Jan 12, 2005 12:06

drawing controls with fixed pixel size

Postby muhkuh » Mon Nov 29, 2004 00:14

I found this to be doing what I wanted:

ImagesetManager::getSingleton().getImageset("TaharezLook")->setAutoScalingEnabled(false);

But is this the way to do it as thought by the lib writer?

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

drawing controls with fixed pixel size

Postby CrazyEddie » Mon Nov 29, 2004 09:50

Yes, this is a valid thing to do; though be aware that all rendered imagery from that imageset will look smaller at higher resolutions and larger at lower resolutions.

CE.


Return to “Modifications / Integrations / Customisations”

Who is online

Users browsing this forum: No registered users and 11 guests