Hello Guest

Author Topic: 2D Toolkit UI 1.0 beta 3  (Read 34089 times)

AppleGuy

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: 2D Toolkit UI 1.0 beta 3
« Reply #15 on: April 22, 2013, 11:59:02 am »
The UIcamera has to be the camera that "sees" the GUI, whichever that may be.

The camera that sees the UI is the scrollable camera but it still does not receive touch events.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: 2D Toolkit UI 1.0 beta 3
« Reply #16 on: April 22, 2013, 12:28:16 pm »
I'll investigate that.
Edit: Just tested it and it definitely works fine. If you're still stuck can you send me a repro case to support@unikronsoftware.com? Probably be a lot easier to just work it out from there.
« Last Edit: April 22, 2013, 12:43:47 pm by unikronsoftware »

AppleGuy

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: 2D Toolkit UI 1.0 beta 3
« Reply #17 on: April 22, 2013, 02:40:04 pm »
Finally got it to work!  I have accidentally set my raycast layer mask to only that of the scrollable area layer.

Thanks a lot for your help.  =)

AppleGuy

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: 2D Toolkit UI 1.0 beta 3
« Reply #18 on: April 23, 2013, 11:37:32 am »
Is it possible to automatically set the content height of the scrollable area to the height of the text mesh?  I have a text mesh that has varying height depending on the actual text fetched from the server.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: 2D Toolkit UI 1.0 beta 3
« Reply #19 on: April 23, 2013, 07:18:32 pm »
Not directly in the first version. You can do it quite easily with something like this:
Code: [Select]
textMesh.text = text;
textMesh.Commit();
float h = textMesh.GetComponent<MeshFilter>().sharedMesh.bounds.size.y;
scrollableArea.contentLength = h + 40; // add some padding

AppleGuy

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: 2D Toolkit UI 1.0 beta 3
« Reply #20 on: April 23, 2013, 11:40:38 pm »
That doesn't seem to give me the right height.  I am expecting a height of between 1-2 but it is giving me a very large value.

sokolwow

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: 2D Toolkit UI 1.0 beta 3
« Reply #21 on: April 24, 2013, 07:45:31 pm »
Hi. I have found a bug. If I set scroll axes to "Y Axis" for Scrollable area and scrollbar, then content moves correctly. But if i set scroll axes to "XAxis" then content moves in one direction with slider (see image).
Sorry for my english.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: 2D Toolkit UI 1.0 beta 3
« Reply #22 on: April 26, 2013, 09:56:42 am »
Thanks for the bugreports. I'll investigate and sort these out for the next release.

n1ngimi

  • Newbie
  • *
  • Posts: 17
    • View Profile
Re: 2D Toolkit UI 1.0 beta 3
« Reply #23 on: April 26, 2013, 12:51:42 pm »
Do you have plans to add the snap?  for ScrollList.
need a snapping ITEM.

but current scroll is no item system..
any idea?

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: 2D Toolkit UI 1.0 beta 3
« Reply #24 on: April 26, 2013, 12:56:05 pm »
There is no concept of "item" in the scroll list at the moment. Snapping won't be implemented until that is done. We won't be adding any new features until 1.0 final is out, so this won't be implemented until then. However, you do have full source code - adding this shouldn't be too hard, especially if your items are all fixed size.

Kea

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 40
    • View Profile
Re: 2D Toolkit UI 1.0 beta 3
« Reply #25 on: April 27, 2013, 04:21:06 pm »
Please add OnTextChange event to TextInput control.

Dgizusse

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: 2D Toolkit UI 1.0 beta 3
« Reply #26 on: April 27, 2013, 04:47:58 pm »
When removing the Send Message Target of an UIItem, if the Method Name isn't removed as well, the following message will be written to the console:
Code: [Select]
UnassignedReferenceException: The variable sendMessageTarget of 'tk2dUIItem' has not been assigned.
You probably need to assign the sendMessageTarget variable of the tk2dUIItem script in the inspector.

I'd recommend that the CustomEditor clear the Method Names whenever the Target is set back to null.
Or check that the target != null at runtime...

Thanks a lot.

Logon

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 20
    • View Profile
Re: 2D Toolkit UI 1.0 beta 3
« Reply #27 on: April 27, 2013, 09:15:14 pm »
It looks like the UI and iTween does not work together because it doesn't move the button at all but if i assign the localpos manually it moves, but not through itween.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: 2D Toolkit UI 1.0 beta 3
« Reply #28 on: April 27, 2013, 09:39:12 pm »
@Logon - it should work fine, there isn't anything special about the buttons or any other GUI stuff, they are standard Unity game objects. I can say it works fine with HOTween, as that is what I tend to use for my PC / Mac stuff.

willrmiller

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 16
    • View Profile
Re: 2D Toolkit UI 1.0 beta 3
« Reply #29 on: April 28, 2013, 11:40:30 pm »
I'm having a little trouble importing this new version.  I get a "Couldn't decompress package" error.  Beta 2 imported just fine.  Is this happening to anyone else?