Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: luisdiv on July 10, 2012, 11:29:54 AM
-
Hello there!
I'm wondering if there's anyway so that the Localization scripts change the Hover and Pressed button sprites...? I can't seem to be able to add the UILocalize script to buttons ("The script class can't be abstract!"), but only the background sprite, which only works until the user hovers or presses.
Please help!
Luis
-
Correct you cant add the UIlocalise script to a "button" it needs to be attached to a widget (UILabel, UISprite, UITexture) due to the line at the top "[RequireComponent(typeof(UIWidget))]". I also cant remember/ find a script that will change the buttons sprite depending on the state.
So that being said youd have to write your own script which would listen for the OnHover, OnPress, and OnLocalize. using those methods you should be able to change the sprite based on both language and state.
-
Thank you Philip!
I'll try and see what I can do