Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: loopyllama on April 17, 2012, 11:14:00 AM
-
I have a checkbox that I wish to start unchecked. I achieve this but I always see the checkbox in the gui checked, then I see it disappear. In my game, the player sees this when they load a new level and hit pause. My menu pops up and the checkbox gets checked for a split second, then turns off.
What is the best way to get a checkbox to not appear on for a splt second?
Example: place a check box in unity, turn off "starts checked", hit play. Notice the check box appears checked, then turns off. I wish for the user to not see it ever checked if it is indeed in the "off" state.
-
I have found a working solution. It appears if I set the button to isChecked = false in Awake () then the menu will appear unchecked at the start. It looks like the code has a special case: if you call isChecked before awake it will directly set the alpha of the check mark to the state you pass it.
-
This is a solution if ever you need to start unchecked.
I use playerpref to store status with a bol and when i start my app i check and set status stored with uichecbox.ischecked
-
Btw, UISavedOption script can be used to automatically store the state of the checkbox in PlayerPrefs (or a group of radio buttons made out of checkboxes).
-
ArenMook,
Just to confirm, where should the UISavedOption be placed for a radio set? On each individual checkbox or the Radio Root?
Regards,
mm
-
Depends on what you have. If you have a group of checkboxes set up in a radio button group, then the radio root. Otherwise, individual checkboxes.