示例#1
0
        public void SetText(object ui, string text)
        {
            // must also update TextData

            _property.Set(ui, text);

            UnityTypes.UguiNovelText_Methods.SetAllDirty.Invoke(ui);
            var textGenerator = UnityTypes.UguiNovelText_Properties.TextGenerator.Get(ui);

            UnityTypes.UguiNovelTextGenerator_Methods.Refresh.Invoke(textGenerator);
        }
示例#2
0
        public void SetText(object ui, string text)
        {
            var html = (bool)_html.Get(ui);

            if (html)
            {
                _htmlText.Set(ui, text);
            }
            else
            {
                _text.Set(ui, text);
            }
        }
        public void SetText(object ui, string text)
        {
            if (UnityTypes.AdvUiMessageWindow != null && UnityTypes.AdvPage != null)
            {
                var uiMessageWindow = GameObject.FindObjectOfType(UnityTypes.AdvUiMessageWindow.UnityType);

                var textUI     = UnityTypes.AdvUiMessageWindow_Fields.text.Get(uiMessageWindow);
                var nameTextUI = UnityTypes.AdvUiMessageWindow_Fields.nameText.Get(uiMessageWindow);

                if (Equals(textUI, ui))
                {
                    var advPage  = GameObject.FindObjectOfType(UnityTypes.AdvPage.UnityType);
                    var textData = Activator.CreateInstance(UnityTypes.TextData.ClrType, new object[] { text });

                    _TextData.Set(ui, textData); // is this needed?
                    set_textData(advPage, textData);
                    set_status(advPage, 0);
                    set_isInputSendMessage(advPage, false);

                    return;
                }
                else if (Equals(nameTextUI, ui))
                {
                    var advPage  = GameObject.FindObjectOfType(UnityTypes.AdvPage.UnityType);
                    var textData = Activator.CreateInstance(UnityTypes.TextData.ClrType, new object[] { text });

                    _TextData.Set(ui, textData); // is this needed?
                    set_nameText(advPage, text);

                    return;
                }
            }

            var textData2 = Activator.CreateInstance(UnityTypes.TextData.ClrType, new object[] { text });

            _text.Set(ui, text);
            _TextData.Set(ui, textData2);
        }