linuxgurugamer

animated toolbar icon

6 posts in this topic

Is there any way, other than to do it manually, to have a toolbar icon animated?

 

Share this post


Link to post
Share on other sites

I surely hope not! Mod authors wanting to grab attention with "their" buttons by giving them bright colors is bad enough, I can only imagine it will get worse when we have something blinking there. The buttons are a necessary evil, but I'd rather have them unobtrusively at the edge than some blinking police-cruiser flash light style attention-grabber.

I'm sure you have the best intentions and are looking for a subtle rotating planets icon, but sadly once the flood gates are open other, less civilized restrained authors would jump on the opportunity. So I'm happy with the way it is.

Share this post


Link to post
Share on other sites
1 minute ago, Kerbart said:

I surely hope not! Mod authors wanting to grab attention with "their" buttons by giving them bright colors is bad enough, I can only imagine it will get worse when we have something blinking there. The buttons are a necessary evil, but I'd rather have them unobtrusively at the edge than some blinking police-cruiser flash light style attention-grabber.

I'm sure you have the best intentions and are looking for a subtle rotating planets icon, but sadly once the flood gates are open other, less civilized restrained authors would jump on the opportunity. So I'm happy with the way it is.

You are right, it was a curiosity question.

Thanks

Share this post


Link to post
Share on other sites

It is possible to use normal Unity animations with the Unity 5 UI.Button class.  I don't know how that plays with the toolbar specifically, but since 1.2.x is using UI 5 throughout it can definitely be done in some way.  If you've not got into UI 5 in KSP yet, the UI Canvases are in KSP.UI.UIMasterControlller...

And yeah I get the potential UI nightmares, but any feature can be misused, and I would rather this developed with clear visibility by responsible people than pushed into the shadows.  (I could go on into certain relevant political topics but that's not allowed on this forum.  :sealed:)

Share this post


Link to post
Share on other sites
17 hours ago, Kerbart said:

I'm sure you have the best intentions and are looking for a subtle rotating planets icon, but sadly once the flood gates are open other, less civilized restrained authors would jump on the opportunity. So I'm happy with the way it is.

Flood gates have been open for literal years. I personally never received a complaint about ScienceAlert's animated button before. Ultimately it's up to the modder

@linuxgurugamerThere's an overload of the AddModApplication method that accepts an Animator. Set your button up inside Unity (Animator + Sprite Renderer, scale 100,100,100, layer "UI", renderer sorting layer "Apps", frame size 38x38). Create a prefab out of it, load it inside KSP via AssetBundle, instantiate an instance and pass it as an argument. If you need more detail, let me know and I'll put together a complete example

Share this post


Link to post
Share on other sites

I'll keep it in mind, but since I was thinking of animating in one scene only (Editor), I can see this turning into a nightmare

Thanks

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now