Beispiel #1
0
    void Start()
    {
        Transform parent = transform.parent;

        shapePanelContainer  = parent.GetComponent <ShapePanelContainer>();
        nameText             = nameTextTransform.GetComponent <Text>();
        formulaText          = formulaTextTransform.GetComponent <Text>();
        parameterAInputField = parameterAInputFieldTransform.GetComponent <InputField>();
        parameterBInputField = parameterBInputFieldTransform.GetComponent <InputField>();
        parameterCInputField = parameterCInputFieldTransform.GetComponent <InputField>();

        dialogContainer = GameObject.Find("Dialog Container");

        detailDisplayMode = DetailDisplayMode.StandardForm;

        // TODO: dirty hack but seems necessary for resolution-independent layout
        RectTransform rectTransform = GetComponent <RectTransform>();

        rectTransform.localScale = new Vector2(1f, 1f);

        layoutElement           = GetComponent <LayoutElement>();
        layoutElement.minHeight = contractedHeight;
        expandContainerTransform.gameObject.SetActive(false);
        isExpanded = false;
    }
Beispiel #2
0
    public void FormulaButtonClicked()
    {
        detailDisplayMode++;

        if (detailDisplayMode > DetailDisplayMode.Points)
        {
            detailDisplayMode = DetailDisplayMode.Formula;
        }
    }