Exemple #1
0
        public void draw()
        {
            EditorGUI.BeginChangeCheck();
            // Line
            EditorGUILayout.LabelField(TC.get("ConversationEditor.Line"));
            effect.setText(EditorGUILayout.TextArea(effect.getText(), GUILayout.MinWidth(200), GUILayout.MinHeight(50)));
            // Position
            var position = EditorGUILayout.Vector2IntField("", new Vector2Int(effect.getX(), effect.getY()));

            effect.setTextPosition(position.x, position.y);
            // Style
            GUILayout.BeginHorizontal();
            effect.setRgbFrontColor(EditorGUILayout.ColorField(effect.getRgbFrontColor()));
            effect.setRgbBorderColor(EditorGUILayout.ColorField(effect.getRgbBorderColor()));
            GUILayout.EndHorizontal();

            // Preview
            CharactersWindowDialogConfiguration.DrawPreview(new GUIContent(effect.getText()), false, null, default(Color), default(Color), effect.getRgbFrontColor(), effect.getRgbBorderColor(), previewTextStyle);

            EditorGUILayout.HelpBox(TC.get("ShowTextEffect.Title"), MessageType.Info);
            if (EditorGUI.EndChangeCheck())
            {
                Event.current.Use();
            }
        }
Exemple #2
0
        public void ShowItemWindowView(int o)
        {
            isConcreteItemVisible = true;
            GameRources.GetInstance().selectedCharacterIndex = o;

            charactersWindowActions             = new CharactersWindowActions(m_Rect, new GUIContent(TC.get("NPC.ActionsPanelTitle")), "Window");
            charactersWindowAppearance          = new CharactersWindowAppearance(m_Rect, new GUIContent(TC.get("NPC.LookPanelTitle")), "Window");
            charactersWindowDialogConfiguration = new CharactersWindowDialogConfiguration(m_Rect, new GUIContent(TC.get("NPC.DialogPanelTitle")), "Window");
            charactersWindowDocumentation       = new CharactersWindowDocumentation(m_Rect, new GUIContent(TC.get("NPC.Documentation")), "Window");
        }
Exemple #3
0
        public CharactersWindow(Rect aStartPos, GUIStyle aStyle, params GUILayoutOption[] aOptions)
            : base(aStartPos, new GUIContent(TC.get("Element.Name27")), aStyle, aOptions)
        {
            var c = new GUIContent();

            c.image       = (Texture2D)Resources.Load("EAdventureData/img/icons/npcs", typeof(Texture2D));
            c.text        = TC.get("Element.Name27");
            ButtonContent = c;

            charactersWindowActions             = new CharactersWindowActions(aStartPos, new GUIContent(TC.get("NPC.ActionsPanelTitle")), "Window");
            charactersWindowAppearance          = new CharactersWindowAppearance(aStartPos, new GUIContent(TC.get("NPC.LookPanelTitle")), "Window");
            charactersWindowDialogConfiguration = new CharactersWindowDialogConfiguration(aStartPos, new GUIContent(TC.get("NPC.DialogPanelTitle")), "Window");
            charactersWindowDocumentation       = new CharactersWindowDocumentation(aStartPos, new GUIContent(TC.get("NPC.Documentation")), "Window");

            selectedButtonSkin = (GUISkin)Resources.Load("Editor/ButtonSelected", typeof(GUISkin));
        }
Exemple #4
0
        public CharactersWindow(Rect aStartPos, GUIStyle aStyle, params GUILayoutOption[] aOptions)
            : base(aStartPos, new GUIContent(TC.get("Element.Name27")), aStyle, aOptions)
        {
            ButtonContent = new GUIContent()
            {
                image = Resources.Load <Texture2D>("EAdventureData/img/icons/npcs"),
                text  = "Element.Name27"
            };

            charactersWindowActions             = new CharactersWindowActions(aStartPos, new GUIContent(TC.get("NPC.ActionsPanelTitle")), "Window");
            charactersWindowAppearance          = new CharactersWindowAppearance(aStartPos, new GUIContent(TC.get("NPC.LookPanelTitle")), "Window");
            charactersWindowDialogConfiguration = new CharactersWindowDialogConfiguration(aStartPos, new GUIContent(TC.get("NPC.DialogPanelTitle")), "Window");
            charactersWindowDocumentation       = new CharactersWindowDocumentation(aStartPos, new GUIContent(TC.get("NPC.Documentation")), "Window");

            AddTab(TC.get("NPC.LookPanelTitle"), CharactersWindowType.Appearance, charactersWindowAppearance);
            AddTab(TC.get("NPC.Documentation"), CharactersWindowType.Documentation, charactersWindowDocumentation);
            AddTab(TC.get("NPC.DialogPanelTitle"), CharactersWindowType.DialogConfiguration, charactersWindowDialogConfiguration);
            AddTab(TC.get("NPC.ActionsPanelTitle"), CharactersWindowType.Action, charactersWindowActions);
        }