2D Toolkit Forum

2D Toolkit => Releases => Topic started by: unikronsoftware on May 11, 2013, 01:30:20 am

Title: 2D Toolkit UI 1.0 Beta 6
Post by: unikronsoftware 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 (http://www.unikronsoftware.com/2dtoolkit/webplayer/uidemo/)

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.
Title: Re: 2D Toolkit UI 1.0 Beta 6
Post by: Arakade 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!
Title: Re: 2D Toolkit UI 1.0 Beta 6
Post by: Arakade on May 11, 2013, 12:47:14 pm
Just saw the priv-thread on "toolkit ui tabbing (http://unikronsoftware.com/2dtoolkit/forum/index.php/topic,1477.msg7101.html)".  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
Title: Re: 2D Toolkit UI 1.0 Beta 6
Post by: Arakade 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!
Title: Re: 2D Toolkit UI 1.0 Beta 6
Post by: unikronsoftware 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?
Title: Re: 2D Toolkit UI 1.0 Beta 6
Post by: dcgraham7 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?
Title: Re: 2D Toolkit UI 1.0 Beta 6
Post by: unikronsoftware on May 11, 2013, 10:11:57 pm
@dcgraham7 - that is a bug. Will be fixed in the next release.
Title: Re: 2D Toolkit UI 1.0 Beta 6
Post by: dcgraham7 on May 11, 2013, 11:23:26 pm
is there any quick and dirty work around that you recommend?
Title: Re: 2D Toolkit UI 1.0 Beta 6
Post by: Arakade 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!
Title: Re: 2D Toolkit UI 1.0 Beta 6
Post by: Gustera 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
Title: Re: 2D Toolkit UI 1.0 Beta 6
Post by: unikronsoftware 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.
Title: Re: 2D Toolkit UI 1.0 Beta 6
Post by: Gustera 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

Title: Re: 2D Toolkit UI 1.0 Beta 6
Post by: unikronsoftware 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
Title: Re: 2D Toolkit UI 1.0 Beta 6
Post by: Gustera 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.
Title: Re: 2D Toolkit UI 1.0 Beta 6
Post by: cjke.7777 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?
Title: Re: 2D Toolkit UI 1.0 Beta 6
Post by: unikronsoftware on May 21, 2013, 02:53:26 pm
It's free for existing tk2d users. Part of 2d toolkit 2.0.
Title: Re: 2D Toolkit UI 1.0 Beta 6
Post by: IslandOfficials on May 23, 2013, 07:00:53 am
For the UIDragItems is there a way to check if the object is currently being dragged? I tried GetComponent<tk2dUIDragItem> ().uiItem.IsPressed but that didn't work.

I worked around this by poking around the source and changing isBtnActive to public. Is there any problem with that? Can this (or a new similar variable) be made public in the future?
Title: Re: 2D Toolkit UI 1.0 Beta 6
Post by: unikronsoftware on May 23, 2013, 10:22:49 am
Its probably a better to add an accessor:
Code: [Select]
public bool IsDragging {
  get { return isBtnActive; }
}
Just to make sure its never written into :)

I'll add something to the next version.
Title: Re: 2D Toolkit UI 1.0 Beta 6
Post by: DannyB on May 26, 2013, 04:12:54 pm
I was wondering - will I be able to use this UI toolkit without the full blown 2d Toolkit?

My specific use case in mind, is to use this as a GUI system for a 3D game. Is this one of the intended/supported use cases?
Title: Re: 2D Toolkit UI 1.0 Beta 6
Post by: unikronsoftware on May 26, 2013, 10:57:03 pm
You will still need tk2d for sprites / atlasing - all the UI stuff relies on that, but doesn't necessarily require it. If you can provide your own sprites, then that could work too - though there are a few required lists.

You can use this as a GUI system for a 3D game, just create a second ortho camera and use that for all the GUI stuff.
Title: Re: 2D Toolkit UI 1.0 Beta 6
Post by: DannyB on May 27, 2013, 07:12:23 am
You can use this as a GUI system for a 3D game, just create a second ortho camera and use that for all the GUI stuff.

Can I use tk2dCamera?
Title: Re: 2D Toolkit UI 1.0 Beta 6
Post by: unikronsoftware on May 27, 2013, 11:29:20 am
Yes, but you will have to reposition the sprites, resize bits and bobs manually. Its not a MASSIVE amount of work, but its not automatic either.
Title: Re: 2D Toolkit UI 1.0 Beta 6
Post by: DannyB on May 27, 2013, 11:35:24 am
Then, may I suggest, at this early stage of UI Kit development, perhaps to make a lightweight version, that only has what is needed to make 2D UIs on top of a 3D (or not) game? I think it will be useful, and from a business standpoint, will open your market a little to other Unity developers who focus on 3D games.

I for one, would very much be interested in such "separation of concerns".
Title: Re: 2D Toolkit UI 1.0 Beta 6
Post by: unikronsoftware on May 27, 2013, 11:58:34 am
I could, but the dependencies will be pretty significant - you will need ability to do sprites, sliced sprites, etc. Thats where I think the integration makes a lot of sense, and the whole pipeline involving automatic building of atlases, etc.

I could add a sample of it being used in a 3D game? Would that help?
Title: Re: 2D Toolkit UI 1.0 Beta 6
Post by: DannyB on May 27, 2013, 12:02:59 pm
Understood. If too many dependencies, then your approach makes total sense.

A sample use in a 3D game would most definitely help.


Title: Re: 2D Toolkit UI 1.0 Beta 6
Post by: rc183 on May 28, 2013, 10:21:34 pm
Hi,

I think there is a bug with the tk2dUIToggleButtonGroup.

In fact when the "OnChange" function is triggered the "SelectedIndex" attribute is the index of the last selected button and not the new selected button.

Title: Re: 2D Toolkit UI 1.0 Beta 6
Post by: unikronsoftware on May 28, 2013, 10:58:54 pm
@rc183 - Indeed it is. Its been fixed, and will be in 2D Toolkit 2.0 beta2 / final whatever that turns out to be.
Title: Re: 2D Toolkit UI 1.0 Beta 6
Post by: TekuStudios on June 18, 2013, 11:45:16 am
Quick question: does the UI only support mouse on PC? Our game doesn't have any mouse input at all, and we want our UI to be controlled by keyboard.
Title: Re: 2D Toolkit UI 1.0 Beta 6
Post by: unikronsoftware on June 18, 2013, 11:54:38 am
At this point, it doesn't support "focusing", which is required for keyboard/gamepad only UIs. You do get full source code though.... :)
Title: Re: 2D Toolkit UI 1.0 Beta 6
Post by: TekuStudios on June 18, 2013, 11:56:59 am
Yes, we will try to achieve it somehow, if we have the time for it.
Title: Re: 2D Toolkit UI 1.0 Beta 6
Post by: cesarpo on June 27, 2013, 04:06:59 am
I also need something like a  OnFocus event for keyboard/gamepad only builds, more exactly the recently released ouya.


What do you think would be the best strategy to achieve this?
Title: Re: 2D Toolkit UI 1.0 Beta 6
Post by: unikronsoftware on June 27, 2013, 11:21:17 am
No support for focus yet, feel free to vote for it on the roadmap Trello.
http://www.unikronsoftware.com/2dtoolkit/roadmap
Title: Re: 2D Toolkit UI 1.0 Beta 6
Post by: cesarpo on July 01, 2013, 04:06:55 am
Hey, how do I know which version of the toolkit I'm actually using? Is there any file indicating this?
Title: Re: 2D Toolkit UI 1.0 Beta 6
Post by: unikronsoftware on July 01, 2013, 10:36:59 am
2D Toolkit > About.
Also tk2dEditorUtility, and tk2dUIManager (version for the UI if you are using a beta).