2D Toolkit Forum

2D Toolkit => Releases => Topic started by: unikronsoftware on March 20, 2013, 09:52:48 pm

Title: 2D Toolkit UI 1.0 beta 2
Post by: unikronsoftware on March 20, 2013, 09:52:48 pm
IMPORTANT: This version is not guaranteed to be backwards compatible with the previous alpha release.
Most class names have changed.
If you have started work with the alpha version, follow the instructions in the next post to upgrade.


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
- Full mobile / webplayer / PC / Mac support. Flash will be supported in the final version.
- Works in Unity Free & Pro

Bugfixes and improvements:
- 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 2
Post by: unikronsoftware on March 20, 2013, 09:56:20 pm
Upgrade instructions from alpha.
1. Backup project IMPORTANT
2. Create a new scene.
3. Upgrade to 2D Toolkit 1.92 beta 3
4. Delete the tk2d_UI and tk2d_UI_Demo folders, and the pdf doc.
5. Import tk2dUI 1.0 beta2
6. Correct all class name references in your code. Everything has a tk2dUI prefix now.
7. Open up your old scene - everything should still work now. All prefabs, scenes, etc. should still be set up correctly.
Title: Re: 2D Toolkit UI 1.0 beta 2
Post by: mfcas on March 22, 2013, 12:13:42 pm
Hey, I upgraded the UI to 1.0 and see that you haven't fixed the tk2dUITouch constructors, maybe you didn't see my edit complaining about this problem. Adding a parameterless constructor call fixes those errors:

public tk2dUITouch(TouchPhase _phase, int fingerID, Vector2 position, Vector2 deltaPosition, float deltaTime) : this() { ... }
public tk2dUITouch(Touch touch) : this() { ... }

Or is there another reason why the change hasn't been made?
Title: Re: 2D Toolkit UI 1.0 beta 2
Post by: unikronsoftware on March 22, 2013, 01:12:13 pm
@mfcas - I missed that bit. Sorted in the next release, also covered a couple warnings.
Title: Re: 2D Toolkit UI 1.0 beta 2
Post by: willrmiller on March 23, 2013, 09:43:50 pm
I'm having some trouble setting up a horizontal scrollable area.  I've set the content length and viewable area length correctly (I think), but it seems to be confused as to how much to scroll in one direction or another before it snaps back.  Here's a video of what I'm seeing:

http://www.willrmiller.com/other/ScrollableAreaProblem.mov (http://www.willrmiller.com/other/ScrollableAreaProblem.mov)

And here's my setup:

http://www.willrmiller.com/other/ScrollableAreaSetup.png (http://www.willrmiller.com/other/ScrollableAreaSetup.png)

Any idea what's going on?

2D Toolkit UI is really awesome so far!

[EDIT]

I'm also seeing some strange jittering behavior in the scrollable area after I've scrolled and it's snapped back.  Here's a video:

http://www.willrmiller.com/other/ScrollableAreaJitter.mov (http://www.willrmiller.com/other/ScrollableAreaJitter.mov)
Title: Re: 2D Toolkit UI 1.0 beta 2
Post by: Yudo on March 25, 2013, 02:35:27 pm
Hi,
    I have been using the TextInput prefab and I have some suggestions about it:
-There should be a check-box in the editor if we what our TextInput to be a PasswordInput (shows * instead of characters);
-I wanted to extend the tk2dUITextInput to make the Password modification myself but all the methods are private so I couldn't
-If I set the Text of the TextInput using script the TextInput stops working

[EDIT]
-also on iOs when you have multiple TextInputs and you select another one while the keyboard is still up, it will write text in both TextInputs


Well that is mostly it
Thank you

Title: Re: 2D Toolkit UI 1.0 beta 2
Post by: unikronsoftware on March 27, 2013, 10:22:24 am
@Yudo - Thanks for the bugreport.
I'll get this sorted out for the next release.

@willrmiller - The control seems to be set up properly. Would it be possible to get a repro case for this? I've not seen it happen when setting up with tk2dCamera. Also I'll get the labels sorted so they are visible in the tk2dCamera, it doesn't consider the scales, so ends up so close together.
Title: Re: 2D Toolkit UI 1.0 beta 2
Post by: xByteCode on March 27, 2013, 08:39:51 pm
I am assuming that since 1.92 final has been released, I can just install 1.92 final and still use the Toolkit UI Beta 2? Just want to make sure before I start upgrading everything :)
Title: Re: 2D Toolkit UI 1.0 beta 2
Post by: unikronsoftware on March 27, 2013, 09:13:33 pm
I am assuming that since 1.92 final has been released, I can just install 1.92 final and still use the Toolkit UI Beta 2? Just want to make sure before I start upgrading everything :)

Yup. That'll work fine.
Title: Re: 2D Toolkit UI 1.0 beta 2
Post by: marceloSpiezzi on March 28, 2013, 06:05:37 pm
Really liked it, lots of easy customization tools, very nice addition to the tk2d family!!

just one question, there's a way with this default button script to a make it send messages to multiple objects ? Or do you recommend sending a message to an UI control object and this one share the message with others obejcts?
Title: Re: 2D Toolkit UI 1.0 beta 2
Post by: unikronsoftware on March 28, 2013, 11:25:52 pm
Seeing that it makes sense to have one controller per "UI", it probably makes sense to route everything through it. But since everything uses C# events, you can have more than one subscriber to a message...
Title: Re: 2D Toolkit UI 1.0 beta 2
Post by: Smartphoneware on April 04, 2013, 04:23:44 pm
Thank you for UI.
I've try it, it have some issues, I hope you will fix it sometime.

In tk2dUITextInput for IOS (didn't test on Android):
1. better set
TouchScreenKeyboard.hideInput = true;
this will hide Unity's Accessory bar.

2. In TouchScreenKeyboardLoop:
add keyboard.active to check if keyboard is active
...
while (keyboard != null && !keyboard.done && keyboard.active)
...

tk2dUIItem - IMHO needs more convenient way to set / edit box collider.
Title: Re: 2D Toolkit UI 1.0 beta 2
Post by: unikronsoftware on April 04, 2013, 10:37:05 pm
Thanks for those I'll get them in the next version.

I had a "Fit collider" button on tk2dUIItem. That may help in the next release, but not in all cases. What were you finding difficult? Just that the collider size didn't match sprite sizes when changed?
Title: Re: 2D Toolkit UI 1.0 beta 2
Post by: Smartphoneware on April 07, 2013, 07:56:26 am
"Fit collider" would be great solution.
Title: Re: 2D Toolkit UI 1.0 beta 2
Post by: nemoryoliver on April 07, 2013, 04:00:24 pm
I can't see 2D Toolkit UI in the Assets Store. Where can I get it?
Title: Re: 2D Toolkit UI 1.0 beta 2
Post by: unikronsoftware on April 07, 2013, 04:32:00 pm
Easy! Register your copy of 2D Toolkit following the instructions here:
http://unikronsoftware.com/2dtoolkit/forum/index.php/topic,34.0.html

And download it right here.
Title: Re: 2D Toolkit UI 1.0 beta 2
Post by: Uttpd on April 08, 2013, 04:15:26 pm
Awesome expansion,
will this be a side expansion, or integrated in the toolkit?

Hope a final release comes soon so I can "poke" the playmaker devs to add the extension.  :D
Title: Re: 2D Toolkit UI 1.0 beta 2
Post by: unikronsoftware on April 08, 2013, 04:21:48 pm
Awesome expansion,
will this be a side expansion, or integrated in the toolkit?

Hope a final release comes soon so I can "poke" the playmaker devs to add the extension.  :D

There will be an official announcement about this very soon :)
Title: Re: 2D Toolkit UI 1.0 beta 2
Post by: dustinbahr on April 09, 2013, 04:30:21 pm
Awesome! Love it!

Is there an easy way to reset a scrollable area? I have a few scrollable areas that i am showing in succession. When I go back and forth between them I want to snap back to top.

I tried setting the Value property, which works except if the area still had velocity.

This led me to what I believe is a bug:

Code: [Select]
if (swipeCurrVelocity > .1f || swipeCurrVelocity < .1f)
                    {
                        swipeCurrVelocity = Mathf.Lerp(swipeCurrVelocity, 0, tk2dUITime.deltaTime * 2.5f); //change multiplier to change slowdown velocity
                    }
                    else
                    {
                        swipeCurrVelocity = 0;
                    }

Shouldn't this part be:
Code: [Select]
if (swipeCurrVelocity > .1f || swipeCurrVelocity < -0.1f)
Even with that fixed though, a reset method would be nice, to basically kill any velocity and reset to top.
Title: Re: 2D Toolkit UI 1.0 beta 2
Post by: mamamia on April 10, 2013, 10:19:48 am
Hi!,

I would like to know if the UI system will provide modal panesls.

THanks in advance.
Title: Re: 2D Toolkit UI 1.0 beta 2
Post by: unikronsoftware on April 10, 2013, 10:53:29 am
Hi!,

I would like to know if the UI system will provide modal panesls.

THanks in advance.

No, since this depends entirely on your game and how you use Input. But, the good thing is implementing something like that is pretty trivial, usually you need a way to pause your game and stop input being processed by the game, and the UI system can cope with the rest.
Title: Re: 2D Toolkit UI 1.0 beta 2
Post by: pavel.kivalin on April 16, 2013, 07:50:16 pm
Do you have any documentation for 2D Toolkit UI?
Title: Re: 2D Toolkit UI 1.0 beta 2
Post by: unikronsoftware on April 16, 2013, 07:53:05 pm
There is a PDF doc included in the package. Autogenerated doxygen docs will be in the next release.
Title: Re: 2D Toolkit UI 1.0 beta 2
Post by: AppleGuy on April 16, 2013, 11:31:23 pm
There is a PDF doc included in the package. Autogenerated doxygen docs will be in the next release.

The latest package does not come with it.  Only managed to find it in the earlier alpha version.
Title: Re: 2D Toolkit UI 1.0 beta 2
Post by: unikronsoftware on April 17, 2013, 09:32:29 am
I must've broken the build script. Thanks for letting me know.
Title: Re: 2D Toolkit UI 1.0 beta 2
Post by: AppleGuy on April 18, 2013, 02:47:31 am
I must've broken the build script. Thanks for letting me know.

Will you be uploading the new one or I can just take reference from the older version?

One question.  It seems that for the 2D UI to work, I need to setup another camera in addition to tk2dcamera or can I reuse that?  Also if I need to setup a scrollable area, I will need another camera. 
Title: Re: 2D Toolkit UI 1.0 beta 2
Post by: unikronsoftware on April 18, 2013, 10:01:54 am
The next beta will have that fixed in there - I don't usually reupload versions without incrementing version numbers - just for sanitys sake. I'm just waiting on testing some new fixes before releasing a new version.

Also to answer your question - you can use a tk2dCamera no problem, but the default skin is set up without a tk2dCamera, so its going to be tiny in there. You're free to change stuff though - you'll have to reposition labels, sprites, etc, but it definitely does work, and doesn't require any scripting. I'm using it in another project with tk2dCamera.

Yes, for the scrollable area - you will need another camera. It keeps things really quite efficient that way, as no CPU clipping is required like this.
Title: Re: 2D Toolkit UI 1.0 beta 2
Post by: AppleGuy on April 19, 2013, 09:54:52 am
The next beta will have that fixed in there - I don't usually reupload versions without incrementing version numbers - just for sanitys sake. I'm just waiting on testing some new fixes before releasing a new version.

Also to answer your question - you can use a tk2dCamera no problem, but the default skin is set up without a tk2dCamera, so its going to be tiny in there. You're free to change stuff though - you'll have to reposition labels, sprites, etc, but it definitely does work, and doesn't require any scripting. I'm using it in another project with tk2dCamera.

Yes, for the scrollable area - you will need another camera. It keeps things really quite efficient that way, as no CPU clipping is required like this.

My concern is will having too many cameras in a scene affect the performance especially for mobile devices.

Anyway thanks and looking forward for the new update.  :)
Title: Re: 2D Toolkit UI 1.0 beta 2
Post by: unikronsoftware on April 19, 2013, 10:12:15 am
You'll be fine with 2 cameras :) Software clipping overhead tends to be a lot higher, and also very dependent on the content you're displaying. Eg, you won't be able to mix-in a 3d model into your list for instance. You can now, and it costs next to nothing :)
Title: Re: 2D Toolkit UI 1.0 beta 2
Post by: spacejaguar on April 28, 2013, 06:33:05 pm
I am getting an error in unity when opening this package...

Error while importing package: Couldn't decompress package

Using 4.0 / Mac.

Title: Re: 2D Toolkit UI 1.0 beta 2
Post by: unikronsoftware on April 28, 2013, 07:16:16 pm
That usually means it didn't download properly... when did you download it?