Example #1
0
 private void OptionSelected(int i)
 {
     uAdventureRaycaster.Instance.enabled = true;
     InventoryManager.Instance.Show       = wasShowingInventory;
     doTimeOut = false;
     GameObject.Destroy(blur);
     guioptions.clicked(i);
     Interacted();
 }
Example #2
0
        void OnGUI()
        {
            float guiscale = Screen.width / 800f;

            style.box.fontSize    = Mathf.RoundToInt(guiscale * 20);
            style.button.fontSize = Mathf.RoundToInt(guiscale * 20);
            style.label.fontSize  = Mathf.RoundToInt(guiscale * 20);
            optionlabel.fontSize  = Mathf.RoundToInt(guiscale * 36);
            style.GetStyle("talk_player").fontSize = Mathf.RoundToInt(guiscale * 20);
            //float rectwith = guiscale * 330;

            switch (guistate)
            {
            case guiState.ANSWERS_MENU:
                GUILayout.BeginArea(new Rect(Screen.width * 0.1f, Screen.height * 0.1f, Screen.width * 0.8f, Screen.height * 0.8f));
                GUILayout.BeginVertical();
                OptionConversationNode options = (OptionConversationNode)guioptions.getNode();

                GUILayout.Label(GUIManager.Instance.Last, optionlabel);
                for (int i = 0; i < options.getLineCount(); i++)
                {
                    ConversationLine ono = options.getLine(i);
                    if (ConditionChecker.check(options.getLineConditions(i)))
                    {
                        if (GUILayout.Button((string)ono.getText(), style.button))
                        {
                            GameObject.Destroy(blur);
                            guioptions.clicked(i);

                            /*Tracker.T ().Choice (GUIManager.Instance.Last, ono.getText ());
                             * Tracker.T ().RequestFlush ();*/
                            Interacted();
                        }
                    }
                    ;
                }
                GUILayout.EndVertical();
                GUILayout.EndArea();
                break;

            default: break;
            }
        }