Esempio n. 1
0
 public override void DrawNode(GUISkin viewSkin)
 {
     GUILayout.BeginHorizontal();
     NodePort.DrawPortBtn(flowInput, viewSkin);
     GUILayout.FlexibleSpace();
     GUILayout.EndHorizontal();
 }
Esempio n. 2
0
        public override void DrawNode(GUISkin viewSkin)
        {
            if ((_loaded == false) && (Event.current.type == EventType.Repaint))
            {
                return;
            }

            if (Event.current.type == EventType.Layout)
            {
                _loaded = true;
            }


            GUILayout.BeginHorizontal();
            //input: flow input port for node
            NodePort.DrawPortBtn(flowInput, viewSkin);
            GUILayout.FlexibleSpace();
            //output, succ def., port
            NodePort.DrawPortBtn(flowOutputSucc, viewSkin);
            GUILayout.EndHorizontal();


            GUILayout.BeginHorizontal();
            GUILayout.BeginVertical();
            GUILayout.Label("Story Text:");
            textData.text = GUILayout.TextArea(textData.text);
            GUILayout.Label("SubText:");
            textData.subText = GUILayout.TextArea(textData.subText);
            GUILayout.EndVertical();
            GUILayout.EndHorizontal();
        }
Esempio n. 3
0
        public override void DrawNode(GUISkin viewSkin)
        {
            GUILayout.BeginHorizontal(GUILayout.MaxWidth(this.nodeRect.width));
            GUILayout.FlexibleSpace();
            NodePort.DrawPortBtn(flowOutputSucc, viewSkin);
            GUILayout.EndHorizontal();

            GUILayout.BeginHorizontal();
            GUILayout.Label("Input Type:");
            inputType = (InputType)EditorGUILayout.EnumPopup(inputType);
            GUILayout.EndHorizontal();

            GUILayout.BeginHorizontal();
            if (inputType == InputType.Integer)
            {
                GUILayout.Label("Input value:");
                inputValue = EditorGUILayout.TextField(inputValue);
            }
            else
            {
                randomFrom = EditorGUILayout.TextField("From:", randomFrom);
                randomTo   = EditorGUILayout.TextField("To:", randomTo);
            }
            GUILayout.EndHorizontal();
        }
Esempio n. 4
0
        public void DrawOption(GUISkin viewSkin)
        {
            if (_loaded != true)
            {
                _loaded = true;
                return;
            }
            GUILayout.BeginHorizontal();
            GUILayout.Label("Option::");
            GUILayout.FlexibleSpace();
            if (GUILayout.Button("Del"))
            {
            }
            GUILayout.EndHorizontal();

            GUILayout.BeginHorizontal();
            GUILayout.Label("'" + optionText.Substring(0, (optionText.Length > 20) ? 20 : optionText.Length) + "' ...");
            GUILayout.EndHorizontal();

            GUILayout.BeginHorizontal();
            NodePort.DrawPortBtn(activeInput, viewSkin);
            GUILayout.Label("Active");
            GUILayout.FlexibleSpace();
            GUILayout.Label("Succ: ");
            NodePort.DrawPortBtn(flowOutputSucc, viewSkin);
            GUILayout.EndHorizontal();

            GUILayout.BeginHorizontal();
            NodePort.DrawPortBtn(showInput, viewSkin);
            GUILayout.Label("Show");
            GUILayout.FlexibleSpace();
            GUILayout.Label("Fail: ");
            NodePort.DrawPortBtn(flowOutputFail, viewSkin);
            GUILayout.EndHorizontal();

            /*showPosition = EditorGUILayout.Foldout (showPosition, "'" + text.Substring (0, (text.Length > 15) ? 15 : text.Length) + "' ...");
             * if (showPosition) {
             *      GUILayout.BeginHorizontal (GUILayout.ExpandWidth (false));
             *
             *      text = GUILayout.TextArea (text, 100, GUILayout.MaxWidth (parentNode.nodeRect.width - 15), GUILayout.ExpandWidth (false));
             *
             *      GUILayout.EndHorizontal ();
             * }*/

            GUILayout.Space(10);
        }
Esempio n. 5
0
        public override void DrawNode(GUISkin viewSkin)
        {
            //do all gui component drawing here
            if (GUILayout.Button("Add option"))
            {
                DialogOption newopt = DialogOption.createAsset(this);
                options.Add(newopt);
            }


            //input: flow input port for node
            GUILayout.BeginHorizontal();
            NodePort.DrawPortBtn(flowInput, viewSkin);
            GUILayout.FlexibleSpace();
            GUILayout.EndHorizontal();


            DrawOptions(viewSkin);
        }
Esempio n. 6
0
        public override void DrawNode(GUISkin viewSkin)
        {
            GUILayout.BeginHorizontal(GUILayout.MaxWidth(this.nodeRect.width));
            GUILayout.FlexibleSpace();
            NodePort.DrawPortBtn(flowOutputSucc, viewSkin);
            GUILayout.EndHorizontal();

            GUILayout.BeginHorizontal();
            GUILayout.Label("Input Type:");
            inputType = (InputType)EditorGUILayout.EnumPopup(inputType);
            GUILayout.EndHorizontal();

            GUILayout.BeginHorizontal();
            if (inputType == InputType.Boolean)
            {
                GUILayout.Label("Input value:");
                inputValue = (InputValue)EditorGUILayout.EnumPopup(inputValue);
            }
            GUILayout.EndHorizontal();
        }