示例#1
0
 //Draw Node
 protected virtual void DrawNodeHolder()
 {
     inPoint.Place(rect);
     outPoint.Place(rect);
     GUI.Box(rect, Title);
 }
示例#2
0
    public override void OnGUI()
    {
        NodeHight = 0;
        Rect DialogueTextRect = RectTextArea();

        AddOptionRect   = AddOptionButton();
        EraseOptionRect = AddOptionButton();

        //Option1 Rects
        if (options > 0)
        {
            OptionBox01Rect  = GetOptionBoxRect();
            OptionText01Rect = GetOptionTextRect();
        }

        if (options > 1)
        {
            OptionBox02Rect  = GetOptionBoxRect();
            OptionText02Rect = GetOptionTextRect();
        }

        if (options > 2)
        {
            OptionBox03Rect  = GetOptionBoxRect();
            OptionText03Rect = GetOptionTextRect();
        }

        NodeHight  += VerticalOffset;
        rect.height = NodeHight;

        DrawNodeHolder();

        DialogueText = GUI.TextArea(DialogueTextRect, DialogueText);

        //BUttons
        GUI.Box(AddOptionRect, "+");
        GUI.Box(EraseOptionRect, "-");

        if (options > 0)
        {
            //Option1
            GUI.Box(OptionBox01Rect, "Option 1");
            OptionText01 = GUI.TextArea(OptionText01Rect, OptionText01);
            outPoint.Place(OptionBox01Rect);
        }

        if (options > 1)
        {
            //Option2
            GUI.Box(OptionBox02Rect, "Option 2");
            OptionText02 = GUI.TextArea(OptionText02Rect, OptionText02);
            outPoint01.Place(OptionBox02Rect);
        }

        if (options > 2)
        {
            //Option2
            GUI.Box(OptionBox03Rect, "Option 3");
            OptionText03 = GUI.TextArea(OptionText03Rect, OptionText03);
            outPoint02.Place(OptionBox03Rect);
        }
    }