Size of frame close button.

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

chendot
Just popping in
Just popping in
Posts: 10
Joined: Wed Jan 09, 2008 13:22

Size of frame close button.

Postby chendot » Sat Mar 15, 2008 08:35

Hi, I got a problem about the close button of a FrameWindow.
I set the frame size to a certain value, so that it won't change when resizing the window:

Code: Select all

WindowManager::getSingleton().getWindow("MyFrame")->setSize(UVector2(UDim(0, 256), UDim(0, 256)));


It works good, so as the children window of this frame. but the close button in the right top of the frame was not effected by this method.
Then I add this code:

Code: Select all

(static_cast<FrameWindow*>(WindowManager::getSingleton().getWindow("MyFrame")))->getCloseButton())->setSize(UVector2(UDim(0, 10), UDim(0, 10)));


But it sees still no use... when I resize my appliction window, the close button follow to resize. How can we clip the size of a close button by its parent WindowFrame ?

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

Postby CrazyEddie » Sat Mar 15, 2008 19:45

Hi,

I think you'd have to do this in the looknfeel skin file. For example, in the WindowsLook.looknfeel file at around line 902, you will see the definition of the close button. By changing the stuff between the <Area></Area> tags, you can affect the way the close button is laid out.

HTH

CE.

chendot
Just popping in
Just popping in
Posts: 10
Joined: Wed Jan 09, 2008 13:22

Postby chendot » Sun Mar 16, 2008 02:46

Wow~Thanks CE.

I've got it :wink:


Return to “Modifications / Integrations / Customisations”

Who is online

Users browsing this forum: No registered users and 6 guests