Page 1 of 1

Chat/Inputfield

Posted: Thu Jul 07, 2022 1:45 am
by Gallery Whitte
Hi

I d like to change the script
to make the Chat-Inputfield
not to desapear
after the User hits "Return".

At the end the Inputfield should always be visible.

I tried to modify the bl_ChatRoom.cs:
by disabling
" //chatInputField.DeactivateInputField();"

but this does not work.

My c#-skills end here,
so I would be very thankful for any help,
as the multiplayer-chat is a main feature for my project.
tx

Code: Select all

public void OnSubmit()
    {
        bl_GameData.Instance.isChating = !bl_GameData.Instance.isChating;
        chatInputField.gameObject.SetActive(bl_GameData.Instance.isChating);

        if (bl_GameData.Instance.isChating)
        {
            chatInputField.text = string.Empty;
            chatInputField.ActivateInputField();
        }
        else
        {
            SetChat(chatInputField.text);
            //chatInputField.DeactivateInputField();
        }
    }
    

Re: Chat/Inputfield

Posted: Sat Jul 09, 2022 6:27 pm
by Lovatto
What version of MFPS are you using?

Re: Chat/Inputfield

Posted: Sun Jul 10, 2022 8:32 pm
by Gallery Whitte
MFPS 2.0
Vers 1.8.2