InvexGames / MaterialUI

MaterialUI is a UI kit for Unity that follows Google's official material design guidelines.
http://invexgames.com/materialUI.html
Other
771 stars 200 forks source link

Button manual resize Isn't working ...? #46

Open negue opened 9 years ago

negue commented 9 years ago

According to the wiki I'd only have to edit the width/height of the RectTransform, I can resize it in the Editor, but in runtime mode it resizes back to the text bounds.

Is it a bug or did miss any option?

InvexGames commented 9 years ago

That may be because the button is being automatically resized to fit the text content. Check to see that 'Snap Every Frame' in the SnapButtonToText component (attached to the text object) isn't left on.

negue commented 9 years ago

Oh .... I searched for the "SnapButtonToText" on the Root of the Button and not on the Button Text Object... thanks, now the resizing is working.

The Ripple Effect now only works partially (some times only on one side, depends on the position) on a resized button.

I had to remove this part, so that the effect was working on the entire button area: - Mathf.Sqrt(Vector2.Distance(data.position, new Vector2(Screen.width / 2f, Screen.height / 2f))) from RippleConfig.OnPointerDown line 228

InvexGames commented 9 years ago

Hi! Thanks for bringing this issue to my attention :)

I'm now working on MaterialUI in a private repo, adding features and the likes for an official release on the Asset Store - this means that I won't be adding/fixing anything more in this repo (sorry). Feel free to fork this one if you'd like to tackle to issue yourself, and/or send me an email at invex@invexgames.com if you want me to let you know when it's available.

Cheers, Declan.

negue commented 9 years ago

I think I fixed the ripple effect, on my scene I had to move the buttons closer to the camera (maybe my camera depth is a bit wrong, since I'm still a unity noob ^^)

So this plugin will be a paid one? or "just" closed source as dll?

InvexGames commented 9 years ago

Oh sweet. I do remember there was an issue with the Ripples and other canvas modes (I believe it's fixed in the closed version as I've changed how Ripples are done), and it was related to camera depth.

It will likely be paid. Do you think it's something you'd be interested in (provided it's faster, more stable and has more features and documentation/examples)?

negue commented 9 years ago

Sure, with more features why not^^

I'd like to have a toast like this one => https://github.com/code-mc/loadtoast

PygmyMonkey commented 9 years ago

Not sure it's in the guidelines from Google :)

negue commented 9 years ago

Google Play Services uses this kind of "toast", for example during the login to Play Games