MaterialUI icon indicating copy to clipboard operation
MaterialUI copied to clipboard

Button manual resize Isn't working ...?

Open negue opened this issue 9 years ago • 8 comments

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?

negue avatar Apr 28 '15 17:04 negue

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.

InvexGames avatar Apr 28 '15 18:04 InvexGames

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

negue avatar Apr 28 '15 20:04 negue

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 [email protected] if you want me to let you know when it's available.

Cheers, Declan.

InvexGames avatar Jun 01 '15 17:06 InvexGames

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?

negue avatar Jun 01 '15 17:06 negue

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)?

InvexGames avatar Jun 01 '15 18:06 InvexGames

Sure, with more features why not^^

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

negue avatar Jun 01 '15 19:06 negue

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

PygmyMonkey avatar Jun 01 '15 20:06 PygmyMonkey

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

negue avatar Jun 01 '15 20:06 negue