Esempio n. 1
0
    public static void ReadjustSquareButtonsMenuParameters(GameObject gameObject, float buttonSize, float buttonHeight, float toplineBezelHeight, float bezelHeight)
    {
        SquareButtonsMenuController buttonsMenuController = gameObject.transform.GetComponent <SquareButtonsMenuController>();

        buttonsMenuController.ButtonSize         = buttonSize;
        buttonsMenuController.ButtonHeight       = buttonHeight;
        buttonsMenuController.ToplineBezelHeight = toplineBezelHeight;
        buttonsMenuController.BezelHeight        = bezelHeight;
    }
Esempio n. 2
0
    public static GameObject CreateSquareButtonsMenu(GameObject parent, ColorProvider.Department departmentColor, int buttonsCount, float buttonSize, float buttonHeight,
                                                     float toplineBezelHeight, float bezelHeight, float faceBorderSize, bool isExclusive)
    {
        GameObject go = MonoBehaviour.Instantiate(squareButtonsMenuPrefab, parent.transform);

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

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

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

        return(go);
    }