Page 1 of 1

Slider width/height.

Posted: Mon Jun 28, 2010 01:52
by agamemnus
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>

Re: Slider width/height.

Posted: Tue Jun 29, 2010 23:46
by Jamarr
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.

Re: Slider width/height.

Posted: Wed Jul 07, 2010 16:14
by agamemnus
A pre-defined image is not what I had in mind, though...