Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: strangeioc on January 27, 2014, 09:40:15 PM

Title: Possible bug in UIToggleInspector: exposing optionCanBeNone
Post by: strangeioc on January 27, 2014, 09:40:15 PM
I've noticed that I can't (can no longer?) set UIToggle.optionCanBeNone in the associated inspector, which seems wrong to me.

I've altered my local UIToggleInspector to:

  1.       NGUIEditorTools.DrawProperty("Starting State", serializedObject, "startsActive");
  2.       //New line here.......
  3.       NGUIEditorTools.DrawProperty("Option Can Be None", serializedObject, "optionCanBeNone");
  4.       NGUIEditorTools.SetLabelWidth(80f);
  5.  

Maybe I'm not understanding why you're not exposing optionCanBeNone, but it feels like an accidental omission. Anyway, just pointing it out.

Thanks.
Title: Re: Possible bug in UIToggleInspector: exposing optionCanBeNone
Post by: ArenMook on January 28, 2014, 09:29:35 AM
This happened ~4 months ago, and you are the first one to mention something. I basically saw little use for that option, which is why I removed it from the inspector. Those that need it, such as yourself, can still use it either via code or by re-adding the property as you have.
Title: Re: Possible bug in UIToggleInspector: exposing optionCanBeNone
Post by: strangeioc on January 28, 2014, 01:08:23 PM
Fair enough, though isn't this an intrinsic requirement for any toggleable boolean switch (i.e., I want to toggle a behavior like mute/unmute, rather than use it as part of a radio set). Maybe there's a better way to accomplish this?
Title: Re: Possible bug in UIToggleInspector: exposing optionCanBeNone
Post by: BeShifty on January 28, 2014, 01:32:11 PM
If the group id is 0 (no group), it will ignore optionCanBeNone entirely, since that option only pertains to radio groups.
Title: Re: Possible bug in UIToggleInspector: exposing optionCanBeNone
Post by: strangeioc on January 28, 2014, 01:37:34 PM
If the group id is 0 (no group), it will ignore optionCanBeNone entirely, since that option only pertains to radio groups.

Ah, ok. That makes sense. Thanks.