Dragging frame window by clicking on background?

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
baxissimo
Quite a regular
Quite a regular
Posts: 60
Joined: Tue Feb 22, 2005 08:04
Location: Tokyo, JAPAN
Contact:

Dragging frame window by clicking on background?

Postby baxissimo » Tue Jan 03, 2006 04:49

I'm trying to make something like a floating tool palette out of a FrameWindow. I'm using the Falagard Vanilla looknfeel out of CVS.

Is there some way to make it so that I can move a FrameWindow by clicking anywhere on its background?

It seems like drag-move behavior is only defined for CEGUI::Titlebar. So that seems to mean no titlebar == no drag move.

Is there a way to make my own CEGUI::FrameWindow subclass which doesn't involve huge amounts of pain and code duplication?

Thanks!

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

Re: Dragging frame window by clicking on background?

Postby lindquist » Tue Jan 03, 2006 23:33

Zap from IRC has made this functionality by customizing Falagard looknfeels.

The idea is to have a transparent titlebar that stays in the background. The transparent titlebar itself is just a "empty" looknfeel. and this titlebar can be kept in the back by setting the property ZOrderChangeEnabled to false IIRC.

If you make sure the titlebar is put in the back of all the other child windows you should have a framewindow that allows dragging by clicking/holding the background of the framewindow.

HTH

User avatar
baxissimo
Quite a regular
Quite a regular
Posts: 60
Joined: Tue Feb 22, 2005 08:04
Location: Tokyo, JAPAN
Contact:

Re: Dragging frame window by clicking on background?

Postby baxissimo » Wed Jan 04, 2006 01:26

Ok. That pretty much makes sense. I was playing around with the title height and alpha attributes to see if I could make something similar to that work, but the alpha didn't seems to actually be making the titlebar transparent, and it was on top of the rest of the frame in the zorder so I couldn't click on any of the buttons.

I was looking for a "setZOrder" type of property, but there didn't seem to be one, just that "ZOrderChangeEnabled" thing.

Thanks.


Return to “Modifications / Integrations / Customisations”

Who is online

Users browsing this forum: No registered users and 10 guests