Jump to content

UI.MENU enter bar and message log


Guest Uviao

Recommended Posts

Guest Uviao

So, I've modified quite a bit in terms of appearance with the UI.. I added a chatbox to the main combat log. 

 

Spoiler

    edit
    {
        name        "mpChatEdit"
        --enabled     "showMpChat"
        area        20 145 808 28
        --fill 112 111 111 45
        var            mpChatEditOverlay
        text style    "edit"
        text color G
        placeholder "..."
        text point 12
        text useFontZoom 0
        align left bottom
        scrollbar    'guiwrsp'
        scrollbar func "chatboxScroll"
        maxchars 125
        action
        "

            --On return pressed
            if (key_pressed == 13) then
                if (mpChatEditOverlay ~= '') then
                    Infinity_SendChatMessage(mpChatEditOverlay, false) 
                    Infinity_PlaySound('WAL_19B')
                    mpChatEditOverlay=''
                    resizeMpEditBox()
                    mpChatboxScrollToBottom = 1
                    return -1
                end
            end

            return 1
        "

What I did was basically -- out the entire section of name "MP_CHAT_OVERLAY" ... From there, I went to name 'WORLD_MESSAGES'
and added the above code to an edit under that section.. it works as the following:

1. When pressing enter for the FIRST time.. the chatbar will be highlighted, and it will allow a person to type and send a message, working as it should.
2. When pressing enter, the message sends, and it does not highlight the chatbar again, as it should.

Issue - 3: When ENTER is pressed again, it does nothing. In addition, it prevents the person from being able to use keybinds and various other things, UNTIL a mouse movement is issued. 
After the mouse command is issues, ENTER works again, and all other abilities work again. Until another message is typed, and the above has to happen.

What I figured was happening:

 

Spoiler

var            mpChatEditOverlay is somehow like.. toggling the whole Multiplayer chat aspect when refocuses the game to the chat window. 

Which, normally, a person has to use the mouse to either close it, or press somewhere else before it allows them to press keybinds.

I've tried a lot of stuff like adding a toggle, or a check to see if chatViewed == 1 then do X ... but none of it seems to work.

So... to recap, what I want it to do is this:

When a person presses enter the following happens:
1. The chatedit is highlighted, allowing them to type, they can then type the message and hit enter.
2. That message appears in the combatlog.
3. After hitting enter, it closes out the chathighlight and lets normal gameplay continue.

Link to comment

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...