Ejemplo n.º 1
0
    public static void ReadjustRoundButtonsMenuSizeParameters(GameObject gameObject, float buttonSize, float buttonHeight, float buttonSpacing, float toplineBezelHeight, float bezelHeight)
    {
        RoundButtonsMenuController buttonsMenuController = gameObject.transform.GetComponent <RoundButtonsMenuController>();

        buttonsMenuController.ButtonSize         = buttonSize;
        buttonsMenuController.ButtonHeight       = buttonHeight;
        buttonsMenuController.ButtonSpacing      = buttonSpacing;
        buttonsMenuController.ToplineBezelHeight = toplineBezelHeight;
        buttonsMenuController.BezelHeight        = bezelHeight;
    }
Ejemplo n.º 2
0
    public static GameObject CreateRoundButtonsMenu(GameObject parent, ColorProvider.Department departmentColor, int buttonsCount, float buttonSize, float buttonHeight, float buttonSpacing,
                                                    float toplineBezelHeight, float bezelHeight, bool isExclusive)
    {
        GameObject go = MonoBehaviour.Instantiate(roundButtonsMenuPrefab, parent.transform);

        go.transform.GetComponent <RectTransform>().anchoredPosition = new Vector3(0, 0, 0);

        RoundButtonsMenuController buttonsMenuController = go.transform.GetComponent <RoundButtonsMenuController>();

        buttonsMenuController.ButtonsCount       = buttonsCount;
        buttonsMenuController.ButtonSize         = buttonSize;
        buttonsMenuController.ButtonHeight       = buttonHeight;
        buttonsMenuController.ButtonSpacing      = buttonSpacing;
        buttonsMenuController.ToplineBezelHeight = toplineBezelHeight;
        buttonsMenuController.BezelHeight        = bezelHeight;
        buttonsMenuController.DepartmentColor    = departmentColor;
        buttonsMenuController.IsExclusive        = isExclusive;

        return(go);
    }