problem with resizing

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

BEBEGON
Just popping in
Just popping in
Posts: 5
Joined: Fri Jun 01, 2007 10:39

problem with resizing

Postby BEBEGON » Mon Jul 16, 2007 15:13

Hello.
I have a problem with resizing. I work with project which use Nebula + CEGUI. When I change mode from 800x600 to 1024x768 in OGL everything is OK. But when I do that in D3D(setDisplaySize()), all dialogs don't change their sizes.
To solve this problem I wrote following code:
void CABDemoApp::UpdateCEGUISize(int nWidth, int nHeight)
{
CEGUI::Size sz((float)nWidth, (float)nHeight);
static_cast<CEGUI::DirectX81Renderer*>(m_pGuiRenderer)->setDisplaySize(sz);
void CABDemoApp::UpdateCEGUISize()
...
float fKofW = (1024.0f/800.0f);
float fKofH = (768.0f/600.0f);

CEGUI::WindowManager::WindowIterator wIter = CEGUI::WindowManager::getSingleton().getIterator();
while(!wIter.isAtEnd())
{
// here I multiply or divide size and X-,Y- pos of each dialog on fKofW and // fKofH according to value of mode
...
// and then set new size and pos
wIter.getCurrentValue()->setSize(CEGUI::Size(valW, valH));
wIter.getCurrentValue()->setXPosition(valX);
wIter.getCurrentValue()->setYPosition(valY);
wIter.getCurrentValue()->setMetricsMode(mm_backup);
++wIter;
}
...
}

But some buttons look incorrectly again.
What I should do???
Can anybody helps me???
And why in D3D I must use setDisplaySize() and in OGL note.

Rackle
CEGUI Team (Retired)
Posts: 534
Joined: Mon Jan 16, 2006 11:59
Location: Montréal

Postby Rackle » Mon Jul 16, 2007 15:34

There was some discussion on the Ogre forum about this topic/problem recently. Look for the posts by Rakkar. Hopefully that helps.


Return to “Help”

Who is online

Users browsing this forum: Baidu [Spider] and 7 guests