Beispiel #1
0
    public void LineEdit(EditorDirect direction, EditorAct action)
    {
        if (action == EditorAct.Add)
        {
            editMethods.CreateLineObj(ref button, direction, this.gameObject, PartsOfFrameObj[(int)PartsOfFrame.Button]);
            editMethods.CreateLineObj(ref text, direction, this.gameObject, PartsOfFrameObj[(int)PartsOfFrame.LineText]);
            editMethods.CreateLineObj(ref inputField, direction, this.gameObject, PartsOfFrameObj[(int)PartsOfFrame.InputField]);

            editMethods.ModifyFrame(this.gameObject.GetComponent <RectTransform> (), isPlus: true);

            SetBaseRenameButton();
            SetSiblingBaseObj();
        }
        else if (action == EditorAct.Remove)
        {
            editMethods.DeleteLineObj(ref button, direction, this.gameObject);
            editMethods.DeleteLineObj(ref text, direction, this.gameObject);
            editMethods.DeleteLineObj(ref inputField, direction, this.gameObject);

            editMethods.ModifyFrame(this.gameObject.GetComponent <RectTransform> (), isPlus: false);

            SetSiblingBaseObj();
        }
    }
 private void ModifyFrame(bool isPlus)
 {
     editMethods.ModifyFrame(editTransform, isPlus);
     editMethods.ModifyFrame(baseTransform, isPlus);
 }