Author Topic: Bug when resizing sliders  (Read 1958 times)

motionsmith

  • Guest
Bug when resizing sliders
« on: October 22, 2013, 07:16:07 PM »
Just thought I'd note a bug I found in UISlider.

When resizing a slider, UISlider.fullSize must be set to the new size. This changes the mSize property, but not the mCenter property. The mCenter property must also be adjusted at this time. There is currently no way to change the mCenter property after the UISlider.Init() function is called.

The result of this bug is that the slider thumb (or bar) becomes inaccurate by the distance from the original center point.

Zophiel

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 54
    • View Profile
Re: Bug when resizing sliders
« Reply #1 on: October 23, 2013, 05:45:16 AM »
A similar issue occurs in the Scroll Bar. But mostly when the scroll bar bip is set to a smaller size. It tends to default to some hard coded value someVal x 121. No idea how to fix this.

Something weird going on with the sprite types. I noticed it's to do with sliced sprites.
« Last Edit: October 23, 2013, 05:53:50 AM by Zophiel »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Bug when resizing sliders
« Reply #2 on: October 23, 2013, 10:05:05 PM »
You can always call Init again if you need to, but why are you resizing things after initialization?

motionsmith

  • Guest
Re: Bug when resizing sliders
« Reply #3 on: November 04, 2013, 01:51:04 PM »
Aren, I am about 3 minor version behind, but in my version, init() is not public and cannot be called again (which seems to be a good idea to me).

Our UI is a "fluid" layout that scales according to the user's screen size. Also, when they rotate their tablet, their screen dimensions swap and the screen needs to be re-drawn to adjust for this. For this reason, all our widgets receive redraw events that change their scale.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Bug when resizing sliders
« Reply #4 on: November 05, 2013, 05:28:52 AM »
I've changed UISlider.fullSize to adjust the center.