Add() public method

Add a new paragraph.
public Add ( string text ) : void
text string
return void
Example #1
0
    /// <summary> 서버에서주는 채팅 응답 </summary>
    public void OnReciveChat(NetData.ChatData chatData, ChatType type)
    {
        string miniMsg = null;

        if (!chatData.Msg.Contains("[url=Item/"))
        {
            miniMsg = string.Format("{0} : {1}", chatData.UserName, chatData.Msg);
        }
        else
        {
            miniMsg = chatData.Msg;
        }

        if (type == ChatType.System)
        {
            char[] AlertArr = SceneManager.instance.optionData.OffAlram.ToCharArray(); //알림
            if (AlertArr[3] == '2')
            {
                return;
            }

            chatData.Msg = string.Format(_LowDataMgr.instance.GetStringCommon(913), chatData.Msg);
            miniMsg      = string.Format(_LowDataMgr.instance.GetStringCommon(913), miniMsg);
        }
        else if (type == ChatType.Guild)
        {
            chatData.Msg = string.Format(_LowDataMgr.instance.GetStringCommon(910), chatData.Msg);
            miniMsg      = string.Format(_LowDataMgr.instance.GetStringCommon(910), miniMsg);
        }
        else if (type == ChatType.Whisper)
        {
            char[] WhisperArr = SceneManager.instance.optionData.BlockWhisper.ToCharArray(); //귓말
            if (!chatData.UserName.Equals(NetData.instance.Nickname) && WhisperArr[0] == '2')
            {
                return;
            }

            chatData.Msg = string.Format(_LowDataMgr.instance.GetStringCommon(911), chatData.Msg);
            miniMsg      = string.Format(_LowDataMgr.instance.GetStringCommon(911), miniMsg);
        }
        else if (type == ChatType.World)
        {
            chatData.Msg = string.Format(_LowDataMgr.instance.GetStringCommon(912), chatData.Msg);
            miniMsg      = string.Format(_LowDataMgr.instance.GetStringCommon(912), miniMsg);
        }
        else if (type == ChatType.Map)
        {
            chatData.Msg = string.Format(_LowDataMgr.instance.GetStringCommon(961), chatData.Msg);
            miniMsg      = string.Format(_LowDataMgr.instance.GetStringCommon(961), miniMsg);
        }

        if (IsMyChat)//나의 채팅
        {
            InputMsg.value = "";
            IsMyChat       = false;
        }

        MiniTextList.Add(miniMsg);
        AddChatData(chatData, type);
    }
Example #2
0
 public void realize()
 {
     me.api_healthHint.text        = ((float)Program.I().ocgcore.life_0 > 0 ? Program.I().ocgcore.life_0 : 0).ToString();
     opponent.api_healthHint.text  = ((float)Program.I().ocgcore.life_1 > 0 ? Program.I().ocgcore.life_1 : 0).ToString();
     me.api_name.text              = Program.I().ocgcore.name_0_c;
     opponent.api_name.text        = Program.I().ocgcore.name_1_c;
     me.api_face.mainTexture       = UIHelper.getFace(Program.I().ocgcore.name_0_c);
     opponent.api_face.mainTexture = UIHelper.getFace(Program.I().ocgcore.name_1_c);
     iTween.MoveToLocal(me.api_healthBar.gameObject, new Vector3(
                            (float)(me.api_healthBar.width) - getRealLife(Program.I().ocgcore.life_0) / ((float)Program.I().ocgcore.lpLimit) * (float)(me.api_healthBar.width),
                            me.api_healthBar.gameObject.transform.localPosition.y,
                            me.api_healthBar.gameObject.transform.localPosition.z), 1f);
     iTween.MoveToLocal(opponent.api_healthBar.gameObject, new Vector3(
                            (float)(opponent.api_healthBar.width) - getRealLife(Program.I().ocgcore.life_1) / ((float)Program.I().ocgcore.lpLimit) * (float)(opponent.api_healthBar.width),
                            opponent.api_healthBar.gameObject.transform.localPosition.y,
                            opponent.api_healthBar.gameObject.transform.localPosition.z), 1f);
     instance_lab.Clear();
     if (Program.I().ocgcore.confirmedCards.Count > 0)
     {
         instance_lab.Add(GameStringHelper.yijingqueren);
     }
     foreach (var item in Program.I().ocgcore.confirmedCards)
     {
         instance_lab.Add(item);
     }
 }
    private void apply(YGOSharp.Card card, Texture2D def, string tail)
    {
        if (card == null)
        {
            return;
        }
        string smallstr = "";

        if (card.Id != 0)
        {
            smallstr  = GameStringHelper.getName(card) + GameStringHelper.getSmall(card);
            smallstr += "\n";
        }
        if (tail == "")
        {
            description.Clear();
            description.Add(smallstr + card.Desc);
        }
        else
        {
            description.Clear();
            description.Add(smallstr + "[FFD700]" + tail + "[-]" + card.Desc);
        }
        picLoader.code        = card.Id;
        picLoader.defaults    = def;
        picLoader.loaded_code = -1;
        currentCard           = card;
        shiftCardShower(true);
        Program.go(50, () => { shiftCardShower(true); });
    }
 private void ShowMessage(DataChat message)
 {
     if (message.Content.IndexOf(EMOTICON_CODE) != 0)
     {
         data.datas.Add(message);
         string msg = "[00ff00]" + message.Sender.userName + " : [-]" + message.Content;
         chatArea.Add(msg);
     }
 }
 public void Log(object message)
 {
     logData.Add(message.ToString());
     logContent.Add(combineColor(normalToken) + message.ToString());
     Debug.Log(message);
     if (logData.Count >= lineMax)
     {
         logData.RemoveAt(0);
     }
 }
Example #6
0
    // Use this for initialization
    void Start()
    {
        UITextList mytext = GetComponent <UITextList>();

        mytext.Add(contentTitle);
//		mytext.Add ("\n\t");
        mytext.Add(contents);

        mytext.Add(contents);
    }
Example #7
0
 private void Start()
 {
     mInput = GetComponent <UIInput>();
     if (fillWithDummyData && textList != null)
     {
         for (int i = 0; i < 30; i++)
         {
             textList.Add(((i % 2 != 0) ? "[AAAAAA]" : "[FFFFFF]") + "This is an example paragraph for the text list, testing line " + i + "[-]");
         }
     }
 }
 void Start()
 {
     _Input = GetComponent <UIInput>();
     _Input.label.maxLineCount = 1;
     if (GameManager.oldChat.Count > 0)
     {
         foreach (string s in GameManager.oldChat)
         {
             textList.Add(s);
         }
     }
 }
Example #9
0
    /// <summary>
    /// Add some dummy text to the text list.
    /// </summary>

    void Start()
    {
        mInput = GetComponent <UIInput>();
        mInput.label.maxLineCount = 1;

        if (fillWithDummyData && textList != null)
        {
            for (int i = 0; i < 30; ++i)
            {
                textList.Add(((i % 2 == 0) ? "[FFFFFF]" : "[AAAAAA]") +
                             "This is an example paragraph for the text list, testing line " + i + "[-]");
            }
        }
    }
Example #10
0
    private void OnSubmit()
    {
        if (textList != null)
        {
            var str = NGUITools.StripSymbols(mInput.text);
            if (!string.IsNullOrEmpty(str))
            {
                textList.Add(str);
                mInput.text     = string.Empty;
                mInput.selected = false;
            }
        }

        mIgnoreNextEnter = true;
    }
Example #11
0
    /// <summary>
    /// Submit notification is sent by UIInput when 'enter' is pressed or iOS/Android keyboard finalizes input.
    /// </summary>

    public void OnSubmit()
    {
        if (textList != null)
        {
            // It's a good idea to strip out all symbols as we don't want user input to alter colors, add new lines, etc
            string text = NGUIText.StripSymbols(mInput.value);

            if (!string.IsNullOrEmpty(text))
            {
                textList.Add("[FF0000]" + player.Handle + ": " + "[000000]" + text);
                photonView.RPC("recieveMessage", PhotonTargets.OthersBuffered, "[0000FF]" + player.Handle + ": " + "[000000]" + text);
                mInput.value = "";
            }
        }
    }
Example #12
0
    public void UpdateNoticeDate()
    {
        if (m_BaseWndObject == null || m_BaseWndObject.activeSelf != true)
        {
            return;
        }
        if (PlayerRole.Instance.RoleAnnouncement.GetAllAnnouncementList() == null)
        {
            return;
        }
        m_NoticeLabel.Clear();
        List <AnnouncementOnce> pNoticeList = PlayerRole.Instance.RoleAnnouncement.GetAllAnnouncementList();

        for (byte i = 0; i < pNoticeList.Count; ++i)
        {
            if (FishConfig.Instance.m_ShopInfo.ShopMap[pNoticeList[i].ShopID].ShopItemStrMap.ContainsKey(pNoticeList[i].ShopOnlyID) == false)
            {
                continue;
            }
            //m_NoticeLabel.Add("[ffcc00]Enter[-]" + i.ToString());
            string strName = FishConfig.Instance.m_ShopInfo.ShopMap[pNoticeList[i].ShopID].ShopItemStrMap[pNoticeList[i].ShopOnlyID].ItemName;
            string StrText = string.Format(StringTable.GetString("GlobalShop_Exchange_Notice"), pNoticeList[i].NickName, strName);
            m_NoticeLabel.Add(StrText);
        }
    }
Example #13
0
    /// <summary>
    /// 初始化.
    /// </summary>
    internal void Init()
    {
        UnityEngine.Screen.showCursor = true;
        SSGameWXPayDataManage payDataManage = new SSGameWXPayDataManage();

        SSGameWXPayData[] payDataArray = payDataManage.GetGamePayDataInfo();

        if (m_TextList != null)
        {
            int    revenues = 0;
            int    rebates  = 0;
            string head     = "";
            string info     = "";
            for (int i = 0; i < payDataArray.Length; ++i)
            {
                head = (i % 2 == 0) ? "[FFFFFF]" : "[000000]";
                info = head + payDataArray[i].Time
                       + GetSpaceInfo(payDataArray[i].Revenue) + payDataArray[i].Revenue
                       + GetSpaceInfo(payDataArray[i].Rebate) + payDataArray[i].Rebate + "[-]";
                m_TextList.Add(info);

                revenues += System.Convert.ToInt32(payDataArray[i].Revenue);
                rebates  += System.Convert.ToInt32(payDataArray[i].Rebate);
            }

            m_TotalRevenue.text = revenues + "元";
            m_TotalRebate.text  = rebates + "元";
        }
    }
 public void showChatMessage(string text)
 {
     if (chatMessageList != null)
     {
         chatMessageList.Add(text);
     }
 }
Example #15
0
    IEnumerator fill()
    {
        yield return(new WaitForEndOfFrame());

        TouZhuNeiRong.Clear();
        TouZhuNeiRong.Add(orderValue);
    }
Example #16
0
    public void OnSubmitClick()
    {
        string submit = uiInput.value;

        textList.Add(submit);
        uiInput.value = "";
    }
Example #17
0
    public void OnChatSubmit()
    {
        string chatMessage = input.value;

        ChatList.Add("Player1:" + chatMessage);
        input.value = null;
    }
 // Update is called once per frame
 void Update()
 {
     if (Input.GetMouseButtonDown(1))
     {
         textList.Add("www.wangjunedu.com" + number++);
     }
 }
    private void OnChatSubmit()
    {
        string chat = uiInput.value;

        textList.Add(chat);
        uiInput.value = "";
    }
Example #20
0
 // Update is called once per frame
 void Update()
 {
     if (qMsg.Count > 0)
     {
         textList.Add(qMsg.Dequeue());
     }
 }
Example #21
0
File: Tex.cs Project: wuhenLin/U3D
 // Update is called once per frame
 void Update()
 {
     if (Input.GetMouseButtonDown(0))
     {
         text.Add("jinzhongzhizhuwannsui!!!");
     }
 }
 // Update is called once per frame
 void Update()
 {
     if (Input.GetKeyDown("x"))
     {
         textList.Add("If you want it, work for it. line:" + lineNum++);
     }
 }
    public override void OnBeforeShow(params object[] pArgs)
    {
        Single.Coroutine.NextUpdate(() =>
        {
            m_pLabelTitle.text = (string)pArgs[0];
            //m_pLabelBody.text = (string)pArgs[1];

            m_pTextListBody.Clear();
            m_pTextListBody.textLabel.pivot = UIWidget.Pivot.Center;
            m_pTextListBody.Add((string)pArgs[1]);

            switch ((eAlertButtonType)pArgs[2])
            {
            case eAlertButtonType.NoButton:
                m_pOneButton.SetActive(false);
                m_pTwoButton.SetActive(false);
                break;

            case eAlertButtonType.OneButton:
                m_pOneButton.SetActive(true);
                m_pTwoButton.SetActive(false);
                break;

            case eAlertButtonType.TwoButton:
                m_pOneButton.SetActive(false);
                m_pTwoButton.SetActive(true);
                break;
            }

            m_pCallback = (Action <eAlertButtonAction>)pArgs[3];
        });
    }
Example #24
0
    void OnClick()
    {
        GameObject input_Label = GameObject.Find("Input_Label");
        string     text_str    = "[8bddfc]Some say:[-] " + input_Label.GetComponent <UILabel> ().text;

        textList.Add(text_str);
    }
Example #25
0
 // Update is called once per frame
 void Update()
 {
     if (Input.GetMouseButtonDown(0))
     {
         Num++;
         textList.Add("dsadasdsadsadsadsadasdsasdgjkhdfgkjahkfjdgkadgadhjvhjdvbsahfahjgfhdagfhja" + Num);
     }
 }
Example #26
0
    void OnClick()
    {
        GameObject input_Label = GameObject.Find("Input_Label");
        string     text_str    = "[FF0000FF]玩家:[-]" + input_Label.GetComponent <UILabel>().text;

        textList.Add(text_str);
        input_Label.GetComponent <UILabel>().text = "";
    }
Example #27
0
 private void Update()
 {
     if (message != "!!!@@@###$$$%%%")
     {
         textList.Add(message.Trim());
         message = "!!!@@@###$$$%%%";
     }
 }
    // Update is called once per frame
    public void SendButtonClick()
    {
        string currentName = names[Random.Range(0, 3)];

        chatString = InputuILabel.value;
        textList.Add(currentName + ":" + chatString);
        InputuILabel.value = "";
    }
Example #29
0
    public void Ontextchange()
    {
        string message = input.value;
        string name    = names[Random.Range(0, 3)];

        text.Add(name + message);
        input.value = "";
    }
    void Start()
    {
        GSApi = GameObject.FindObjectOfType(typeof(GameSparks)) as GameSparks;
        //GSApi.listChallengeDetails(GameGlobals.relevantID);



        GSApi.GSMessageReceived += (GS, args) =>
        {
            Debug.Log("message recieved");
            if (args.Message.ContainsKey("challenge"))
            {
                Debug.Log("adding line");
                if ((string)(((Hashtable)args.Message["challenge"])["challengeId"]) == GameGlobals.relevantID)
                {
                    Debug.Log((string)args.Message["who"]);
                    Debug.Log((string)args.Message["message"]);
                    callbackString  = (whiteGreySwitch ? "[FFFFFF]" : "[AAAAAA]") + (string)args.Message["who"] + ": " + (string)args.Message["message"];
                    whiteGreySwitch = !whiteGreySwitch;
                }
            }
        };


        mInput = GetComponent <UIInput>();

        ArrayList messages = GSApi.GetMessages()["messageList"] as ArrayList;

        if (messages != null)
        {
            foreach (Hashtable message in messages)
            {
                if (((string)message["@class"] == ".ChallengeChatMessage"))
                {
                    if (((string)((Hashtable)message["challenge"])["challengeId"]) == GameGlobals.relevantID)
                    {
                        Debug.Log(message["message"]);

                        textList.Add((whiteGreySwitch ? "[FFFFFF]" : "[AAAAAA]") +
                                     ((string)message["who"]) + ": " + ((string)message["message"]));
                        whiteGreySwitch = !whiteGreySwitch;
                    }
                }
            }
        }
    }