Slider width/height.

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

agamemnus
Just can't stay away
Just can't stay away
Posts: 185
Joined: Sun Mar 14, 2010 04:21

Slider width/height.

Postby agamemnus » Mon Jun 28, 2010 01:52

I would like my slider widget's thumb's height to be set based on a PropertyDefinition called sliderThumbImage -- the sliderThumbImage's height. I cannot find any way to access the value of an image's width or height by using a PropertyDefinition.

Is this a limitation of CEGUI?

I currently use an absolute dim:

Code: Select all

<Child type="TaharezLook/SliderThumb" nameSuffix="__auto_thumb__">
 <Area>
  <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
  <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
  <Dim type="Width" ><UnifiedDim scale="1.0" type="Width" /></Dim>
  <Dim type="Height" ><AbsoluteDim value="14" dimension="Height" /></Dim>
 </Area>
</Child>

Jamarr
CEGUI MVP
CEGUI MVP
Posts: 812
Joined: Tue Jun 03, 2008 23:59
Location: USA

Re: Slider width/height.

Postby Jamarr » Tue Jun 29, 2010 23:46

Hey, I am not familiar enough with Falaguard to know how to achieve this with a PropertyDefinition. However, searching for "image height" brought up this thread which you may find useful: viewtopic.php?f=2&t=4607&p=21604&hilit=image+height#p21604

So you can at least use an <ImageDim> instead of an <AbsoluteDim> to base the height of your thumb on a pre-defined image. I assume you will have to wait for CE to receive an answer on the feasibility of using a PropertyDefinition in this case.
If somebody helps you by replying to your thread, upvote him/her as a thanks! Make sure to include your CEGUI.log and everything you tried when posting! And remember that we are not magicians!

agamemnus
Just can't stay away
Just can't stay away
Posts: 185
Joined: Sun Mar 14, 2010 04:21

Re: Slider width/height.

Postby agamemnus » Wed Jul 07, 2010 16:14

A pre-defined image is not what I had in mind, though...


Return to “Modifications / Integrations / Customisations”

Who is online

Users browsing this forum: No registered users and 20 guests