Example #1
0
    public static void UpdateActiveButton()
    {
        if (ButtonGroupState.activeButtonList.ContainsKey(ButtonGroupState.activeGroup))
        {
            if (ButtonGroupState.activeButtonList[ButtonGroupState.activeGroup] == (UnityEngine.Object)null)
            {
                return;
            }
            ButtonGroupState component = ButtonGroupState.activeButtonList[ButtonGroupState.activeGroup].GetComponent <ButtonGroupState>();
            if (component != (UnityEngine.Object)null)
            {
                component.SetHover(false);
            }
            if (component.Help.Enable)
            {
                Singleton <PointerManager> .Instance.SetPointerHelpAt(ButtonGroupState.activeButtonList[ButtonGroupState.activeGroup], ButtonGroupState.helpEnabled, true);

                if (ButtonGroupState.helpEnabled)
                {
                    ButtonGroupState.ShowHelpDialog(ButtonGroupState.activeButtonList[ButtonGroupState.activeGroup]);
                }
            }
            else
            {
                Singleton <PointerManager> .Instance.SetPointerHelpAt(ButtonGroupState.activeButtonList[ButtonGroupState.activeGroup], false, true);

                Singleton <HelpDialog> .Instance.HideDialog();
            }
            if (ButtonGroupState.pointerNumberList.ContainsKey(ButtonGroupState.activeGroup) && ButtonGroupState.pointerNumberList[ButtonGroupState.activeGroup] != 0)
            {
                Singleton <PointerManager> .Instance.SetPointerNumberAt(ButtonGroupState.activeButtonList[ButtonGroupState.activeGroup], ButtonGroupState.pointerNumberList[ButtonGroupState.activeGroup]);
            }
        }
    }