Author Topic: Copied Quest Log example but row headings are off-screen  (Read 3188 times)

miyudreams

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 19
    • View Profile
Copied Quest Log example but row headings are off-screen
« on: September 22, 2013, 11:26:24 PM »
Hi,

I'm trying to copy the Quest Log example. But it's exhibiting some very funky behavior. Everytime, I play the game, each row is off-centered.

I have a UIPanel where the center and size is dynamically calculated during runtime. When I clicked the row headers, the rows are then suddenly centered again! And the x transforms have these weird numbers in them.

I tried setting the same numbers in code, but it'll still offset funny.

Any insights people? Thanks for any help you can give.

0. Here is how it looks when I run the game, notice how the row headings are offscreen.


1. Each row has x = 72.4999? what? I set the x to 0, saved the scene, and then played it. Where is this random number coming from?


2. This is how the UITable is set.


3. Here is my UIPanel that was dynamically sized and centered to fit the screen resolution.


4. nothing special here, just an Anchor to draw my panel lower.


5. Woh! Magically centered when i CLICKED on the row headers. Why? It's using the same tween component as found in Quest Log. I noticed how the UIPanel X center is set to 196.9992 and it's Transform x is set to -196.9992. WHAT is going on? I'm so confused.


6. The transform x also suddenly set to 199.9992 for the row headers.



ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Copied Quest Log example but row headings are off-screen
« Reply #1 on: September 23, 2013, 07:36:15 AM »
If you add content dynamically and then reposition the table, make sure its 'notify the panel' flag is on. If all else fails, reposition the panel's clipping manually (UIDraggablePanel.ResetPosition).

Watching the scroll view tutorial may also help you: http://www.youtube.com/watch?v=OiA4o8KqBFI&list=UUQGZdUwzE8gmvgjomZSNFJg

miyudreams

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 19
    • View Profile
Re: Copied Quest Log example but row headings are off-screen
« Reply #2 on: September 24, 2013, 12:40:08 AM »
Hi, thanks for the reply. Where is the "notify the panel" flag found?

thanks

Nicki

  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 33
  • -Receive: 141
  • Posts: 1,768
    • View Profile
Re: Copied Quest Log example but row headings are off-screen
« Reply #3 on: September 24, 2013, 02:23:34 AM »
It's usually if something is wider than the scroll area that this can happen. Maybe it could be a Label with a max width set too high? I've had problems with this in the past.