ScrollablePane setHorizontalScrollPosition question

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

jtracy
Not too shy to talk
Not too shy to talk
Posts: 22
Joined: Wed Dec 20, 2006 17:20

ScrollablePane setHorizontalScrollPosition question

Postby jtracy » Thu Jul 19, 2007 21:13

I created a ScrollablePane that is 256 pixels across and inside of the pane I put an image that is 512 pixels across. I would assume that to move the middle of the image to the middle of the scrollpane I could set the scrollposition to (0.5). That does not seem to work correctly. I have noticed that the maximum value I can set for the scroll position is around ~0.52. Why is that I would assume that the range would go from 0.0 to 1.0 and would not change. Any help on this would be appreciated.

Thanks

Judd

Here is the layout section describing what I have done so far.

Code: Select all

   <Window Type="DefaultWindow" Name="HUD/Compass">
      <Property Name="UnifiedAreaRect" Value="{{0.5,-128},{0.05,-4},{0.5,128},{0.05,31}}" />
   <Window Type="GameLook/StaticImage" Name="HUD/Compass/CompassLine">
          <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
          <Property Name="UnifiedAreaRect" Value="{{0.0,127},{0.0,0},{0.0,129},{0.0,31}}" />
          <Property Name="FrameEnabled" Value="False" />
          <Property Name="Image" Value="set:HUD image:Compass" />
          <Property Name="BackgroundEnabled" Value="False" />
          <Property Name="ZOrderChangeEnabled" Value="False" />
   </Window>
      <Window Type="GameLook/ScrollablePane" Name="HUD/Compass/ScrollPane">
        <Property Name="UnifiedAreaRect" Value="{{0.5,-128},{0.05,0},{0.5,128},{0.05,27}}" />
        <Property Name="ZOrderChangeEnabled" Value="False" />
        <Property Name="FrameEnabled" Value="False" />
   <Property Name="Disabled" Value="False" />
   <Window Type="GameLook/StaticImage" Name="HUD/Compass/CompassImage">
          <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
          <Property Name="UnifiedAreaRect" Value="{{0.0,0},{0.0,0},{0.0,512},{0.0,27}}" />
          <Property Name="FrameEnabled" Value="False" />
          <Property Name="Image" Value="set:HUD image:Compass" />
          <Property Name="BackgroundEnabled" Value="False" />
          <Property Name="ZOrderChangeEnabled" Value="False" />
        </Window>
      </Window>
    </Window>

Return to “Help”

Who is online

Users browsing this forum: No registered users and 14 guests