Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle content with length longer than 350 chars #1

Closed
adefee opened this issue Apr 16, 2019 · 3 comments
Closed

Handle content with length longer than 350 chars #1

adefee opened this issue Apr 16, 2019 · 3 comments
Labels
enhancement New feature or request

Comments

@adefee
Copy link
Owner

adefee commented Apr 16, 2019

ESO doesn't presently allow for chat messages in public rooms to be longer than 350 chars. However, some jokes, riddles, and other content may be longer than this.

Current Solution: Content longer than 350 chars is ignored

Proposed Solution(s):
a) Popup allowing user to interact with (or copy/paste) the content,
b) Split content into pieces and give user each successive piece after the preceding piece has been posted

Solution a) Seems like best route at current time; earmarking this as an enhancement for future release.

@adefee adefee added the enhancement New feature or request label Apr 16, 2019
@adefee
Copy link
Owner Author

adefee commented Apr 16, 2019

From @Baertram, copying a couple of points from Gitter for future reference here:

There is a copy chat entry "popup" within pChat addon. MAybe you can use this same popup somehow to show the first 350 chars and if you click on the button put it into the chat and let the user click enter. register an event upon pressing the button or set a global var of your addon, which listens for the "text posted" function (not sure if there is any but I think there is!). If your var was set, check if the text posted is he same like in the open box. if so, advanced the popup box to next page -< part 2. And the same for part3ff of the long text

ZO_PreHook("ZO_ChatTextEntry_Execute", function(control) ... end) should be the func for pressing return key in chat edit box

Get the current chatChannel speaking with local activeChannelAtTab if CHAT_SYSTEM and CHAT_SYSTEM.currentChannel then activeChannelAtTab = CHAT_SYSTEM.currentChannel end
Could also remember what was sent with this Prehook: ZO_PreHook(CHAT_SYSTEM, "StartTextEntry", function(ctrl, text, channel, target, showVirtualKeyboard) ... end) .. should be called prior to above prehook. Or check the "control" variable with ZGOO ingame in the prehook of ZO_ChatTextEntry_Execute! MAybe there is a :Gettext() or there are children controls having the text with :GetText() then

Just expose it within the prehook to global namespace, like MYADDON._control = control and then inspect it. If you need more chat prehooks etc. check my addon FCOChatTabBrain, file /src/FCOCTB_hooks.lua. Maybe one of them helps

@Dolgubon
Copy link

The following code takes in a table of strings, and puts them into the chat entry box. Once a line is 'said' it will put the next line in the chat entry box, until there are no further lines. The check for the channel is probably not exactly what you want, but you could change that.

function outputMultipleLinesChat(textToOutput)
    StartChatInput(textToOutput[1])
    local function OutputNextLine(eventCode,  channelType, fromName, text, isCustomerService, fromDisplayName)
    
        if fromDisplayName == GetDisplayName() or channelType == CHAT_CHANNEL_WHISPER_SENT then
            testActualOutput = text
            testAssume = textToOutput[1]
            if text == textToOutput[1] then
                table.remove(textToOutput, 1)
                if #textToOutput>0 then
                    StartChatInput(textToOutput[1])
                else
                    EVENT_MANAGER:UnregisterForEvent(DolgubonSetCrafter.name,EVENT_CHAT_MESSAGE_CHANNEL)
                end
            else
            end
        end
    end
    EVENT_MANAGER:RegisterForEvent(DolgubonSetCrafter.name,EVENT_CHAT_MESSAGE_CHANNEL, OutputNextLine)
end

@adefee
Copy link
Owner Author

adefee commented Nov 28, 2019

Solved by 4.1.0

@adefee adefee closed this as completed Nov 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants