Elems created out of viewport then slided, are not clickable

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

matt
Not too shy to talk
Not too shy to talk
Posts: 37
Joined: Tue Nov 08, 2011 16:00

Elems created out of viewport then slided, are not clickable

Postby matt » Wed Mar 28, 2012 16:14

Hello!

I've implemented a little slider, that contains:
- A Window "A"
- A Stencil Window "B" into "A"
- An Ribbon (HorizontalLayoutContainer) "C" into "B"
- A Bunch of Button into this HorizontalLayoutContainer

Only the first buttons of the Ribbon are visible because those out of the stencil "B" are cut by it.

I make the Ribbon "C" slide into the Stencil Window "B".
The thing is that my buttons into the Ribbon are reacting to mouse only for those that primary where in the zone of the Window "A" (which is the main parent), before the slide to start.

Indeed, it seems that all that as been created and clipped outside of my main application window, and then slide into it, is not clickable.

When I slide enough the HorizontalLayoutContainer I can't click anymore one them.

I've tried

Code: Select all

      this->notifyClippingChanged();

But without success

Is it a bug? Or do I need a special call to make the buttons to refresh their Click Area after each move of my ribbon?

Thanx in advance for the help

matt
Not too shy to talk
Not too shy to talk
Posts: 37
Joined: Tue Nov 08, 2011 16:00

Re: Elems created out of viewport then slided, are not click

Postby matt » Thu Mar 29, 2012 09:07

Going on investigating on my problem, I tried another configuration in order to restrict my problem into a 'small area'

I create a simple StaticImage , let's say "A", with a very big width: 4000px.
With a button in my scene, I slide this StaticImage (=container) to the left or right.

I parent this StaticImage into a 300*300 Window;

Two very strange things:
  • Sliding the StaticImage, I notice that this StaticImage width is not 4000px as defined in its properties, but only the width of the parent box (300px)
  • If I give a start offset (for example 200px) to this StaticImage, and then slide it to the left, I notice that its width is although exactly the width of my parent box (300px)

  • Testing an even simpler case, it seems that Window's can't be bigger than the Screen:

    Code: Select all

       
          WindowManager& wmgr = WindowManager::getSingleton();
          Window* base = static_cast<Window*>(wmgr.createWindow( "DefaultWindow"));
          CEGUI::System::getSingleton().setGUISheet( base );

          Window* image = static_cast<Window*>(wmgr.createWindow( "HaevaLookSpecialWidgets/StaticClicheImage"));
          image->setProperty("Image", "set:HaevaLookSpecialWidgets   image:SelectorHover");
          image->setSize( UVector2(cegui_absdim(3000), cegui_absdim(50)) );   //Problem is here: The Image will fit exactly the width of the screen, even if it set to 3000px
          base ->addChildWindow( image );



User avatar
Kulik
CEGUI Team
Posts: 1382
Joined: Mon Jul 26, 2010 18:47
Location: Czech Republic
Contact:

Re: Elems created out of viewport then slided, are not click

Postby Kulik » Fri Mar 30, 2012 08:22

This does sound like a bug in CEGUI, you shouldn't have to do anything to make this work, CEGUI should take care of it.

I will do some testing later and hopefully fix this.

http://cegui.org.uk/mantis/view.php?id=764

matt
Not too shy to talk
Not too shy to talk
Posts: 37
Joined: Tue Nov 08, 2011 16:00

Re: Elems created out of viewport then slided, are not click

Postby matt » Mon Apr 02, 2012 08:32

Thanx Kulik for your answer

Do you think there is a workaround that I could use? Something like an "update click area" method.
I tried various things like "invalidate()", or "setUpdateMode(WUM_ALWAYS)", but it has no effects...

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

Re: Elems created out of viewport then slided, are not click

Postby CrazyEddie » Fri Jun 22, 2012 17:32

Hi,

We discussed this a little today, since I have no idea how best to try and reproduce this. Anyway, we think you might be running up against a common gotcha (it's certainly 'got' us a few times - with many hours wasted). With regards to the comment that things "can't be bigger than the screen", this is a side-effect of the default maximum size - which is, yes, you guessed it, the same size as the screen. So, try setting the max size of your affected windows to be something big, and hopefully it should resolve the issue.

Please let us know, so we can close the associated ticket :)

HTH

CE.

PS. If this does not work, can you provide code for a simple test case that reproduces the issue. Thanks.


Return to “Help”

Who is online

Users browsing this forum: No registered users and 2 guests