Hello Guest

Author Topic: 2D Toolkit UI 1.0 Beta 6  (Read 39514 times)

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
2D Toolkit UI 1.0 Beta 6
« on: May 11, 2013, 01:30:20 am »
IMPORTANT: This version is not guaranteed to be backwards compatible with the alpha release. Most class names have changed. If you have started work with the alpha version, follow the instructions the beta 2 post to upgrade before proceeding.

This version breaks backwards compatibility in some ways with beta 3.
Follow the instructions in beta 5 to upgrade before proceeding.



Webplayer demo here

Features:
- Light weight code, ultra fast.
- Lots of control prefabs. Use as a basis for customization, or create your own.
  - Buttons
  - Checkboxes
  - Radio Buttons
  - Textboxes
  - Lists
  - Sliders
  - Progress bars
  - Scrollbars
  - Scrolling areas
- Multi touch support, including on screen keyboard on iOS / Android / Windows Phone 8
- Full iOS / Android / Windows Phone 8 / WebPlayer / PC / Mac support. Almost complete Flash support.
- Works in Unity Free & Pro

Bugfixes and improvements:
- New mask system inspired by wtg's request. Removes need for second camera unless you need to clip 3D objects. The demo scene uses this. When upgrading, if you don't wish to upgrade to this new clipping method, you will need to manually change the shader on your sprite collection to Depth Mask Solid.
- Automatic collider resizing - select a tk2dUIItem and click "Fit" to best-fit colliders, or select a root game object and select the "2D Toolkit > UI > Fix Selected Item Bounds" to fix collider bounds on all selected items. Works with sphere and box colliders.
- Warn user when running the game without a tk2dUIManager
- clicking on a button in a list and dragging will not click the button when finger is lifted while still on the button
- OnTextChange in UITextInput
- radio button added to list at runtime no works as expected
- setting text of TextInput from code
- fixed cursor anchor when alignment in textinput set to center
- Fixed some Unity 4 warnings
- Works in Flash, apart from text input. This is a known issue with Unity.
- UIDropDown now has a helper to help set up heights.
- Scrollbar, arrow buttons mirror mouse operations - held down for duration of mouse click.
- Esc/tab entering incorrect input on Mac only (known Unity issue).
- Dismiss on screen keyboard by clicking outside the view
- Scrollbar, when dragging thumb, the arrows aren't highlighted.
- UIControlsHelper works when scaled
- Scrollable area depth masks are now sliced sprites (easily scaled)
- Scrollbar "bar" is a sliced sprite.
- tk2dUIItem doesn't require a collider any more, sphere colliders can be set up.
- textinput password option with configureable character.
- fixed bug where clicking on the next textinput (on mobile) will enter text in both.
- scrollable area option to set value without event.
- in scrollable area, when setting content length programatically, if content length < visible length, scrollbar is hidden.
- tk2dUI prefix on all classes (finalized)
- tk2dUITime is now a static class
- scrollable area snapback uses velocity
- click + hold scrollbar arrow to scroll continuously
- now possible to change toggle buttons at runtime
- scrollbar editor widget corrected and shows thumb size
- editor widgets show extended line when being used, easier to position and tweak correctly.
« Last Edit: May 11, 2013, 01:32:15 am by unikronsoftware »

Arakade

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: 2D Toolkit UI 1.0 Beta 6
« Reply #1 on: May 11, 2013, 11:11:32 am »
Hi, hope this is an OK place to ask this :-)

How can one use these awesome new controls with joysticks?
I'm developing for console (well specifically for the Ouya). Obviously I need control focus indicated, focus change by either a control 'order' (or orders?) or a way to change programmatically (but what about tabbing between when on PC?) and an ability to fire the click action, etc.

 Before these UI bits came out, I'd used 2DTk's Text objects for menu items and rolled my own colour highlighting and transition. I plan to port to pointer-based platforms in time though so had assumed I'd add colliders, etc.
Obviously it'd be preferable for the framework to handle both (and accessibility?)

Thanks a lot and keep up the great work!

Arakade

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: 2D Toolkit UI 1.0 Beta 6
« Reply #2 on: May 11, 2013, 12:47:14 pm »
Just saw the priv-thread on "toolkit ui tabbing".  Guess not in first release, huh?
Any tips on things that might be usable with own transition code then? (e.g. setFocused()) ... <goes looking> ... Found tk2dUIItem.HoverOver|Out() ...?  Perhaps...?

p.s. Why did I suddenly start thinking about a giant floating hand that casts rays, fakes hovers and clicks and tweens movement to center points of all controls?  Yuck!  :o

Arakade

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: 2D Toolkit UI 1.0 Beta 6
« Reply #3 on: May 11, 2013, 01:13:40 pm »
Well, I tried and it's sort of working.

I could post my quickie code if anyone's interested but it's pretty straightforward stuff -- I added a script to the demo using HoverOver(), HoverOut() and SimulateClick().
SimulateClick() successfully fired buttons.
However for HoverOver() and HoverOut(), only the pull-down gave any indication of hover that I could tell.  Expected?

Cheers!

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: 2D Toolkit UI 1.0 Beta 6
« Reply #4 on: May 11, 2013, 02:41:37 pm »
@Arakade
The radio and checkbox should have a hover state on them too... you should see some change on them.

Could you please create a thread in the private support forum to keep this discussion focused in there?

dcgraham7

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: 2D Toolkit UI 1.0 Beta 6
« Reply #5 on: May 11, 2013, 08:34:21 pm »
I'm trying to implement a horizontal scrolling component. I'm using the sample scene scrolling area as a template and adjusted the masks, the scroll direction, and the content/visible areas to set it up. However, the direction of the horizontal scroll area goes in the wrong direction. My content is arranged from left to right, but the scroll area only allows me to scroll from right to left. Has anyone else experienced this? What can I do?

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: 2D Toolkit UI 1.0 Beta 6
« Reply #6 on: May 11, 2013, 10:11:57 pm »
@dcgraham7 - that is a bug. Will be fixed in the next release.

dcgraham7

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: 2D Toolkit UI 1.0 Beta 6
« Reply #7 on: May 11, 2013, 11:23:26 pm »
is there any quick and dirty work around that you recommend?

Arakade

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: 2D Toolkit UI 1.0 Beta 6
« Reply #8 on: May 11, 2013, 11:51:07 pm »
New private thread created per instruction from @unikronsoftware .  Not knowing pub-priv linking etiquette but wanting to help people find, it's titled "UI FocusManager ideas (i.e. controlling new UI by joystick/keys) + e.g. code".  HTH!

Gustera

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: 2D Toolkit UI 1.0 Beta 6
« Reply #9 on: May 14, 2013, 12:19:24 pm »
By default hover events are disabled to increase performance. If you need hover events simply set this to true.

In this build hover events are unabled by default

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: 2D Toolkit UI 1.0 Beta 6
« Reply #10 on: May 14, 2013, 12:32:09 pm »
One extra raycast isn't really going to be a problem on PC, and hover is automatically disabled when using multitouch anyway. The option will still be there to disable it.

The docs need to change. Thanks for letting me know.

Gustera

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: 2D Toolkit UI 1.0 Beta 6
« Reply #11 on: May 17, 2013, 01:09:03 pm »
Is there anyway to read  ON/OFF state of checkboxes ? They seem identicall to BasicButton.

Thx a lot


unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: 2D Toolkit UI 1.0 Beta 6
« Reply #12 on: May 17, 2013, 01:34:45 pm »
You want to grab the toggle control script that is applied to the Checkbox control.
UIToggleControl.IsOn

Gustera

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: 2D Toolkit UI 1.0 Beta 6
« Reply #13 on: May 17, 2013, 02:42:02 pm »
I was using "Check" children game object active status...  :-[

My imagination is way better than my programming skills  :o

Thx a lot for quick response.

cjke.7777

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: 2D Toolkit UI 1.0 Beta 6
« Reply #14 on: May 21, 2013, 12:44:34 pm »
This looks very cool. I'm new to 2D toolkit in general, and it's very nice to see this will be asset soon.

Quick question (sorry if asked before)
- Do you have a approx price for existing 2d tool kit users?
- For 2D menu's and floating 2D text, what are the strengths over say NGUI?