Disabling left click and right click on the chat edit box.
Hello there !
I've been writing my own UI last month to get rid of many addons. But here's my final boss.
I was set up like this before and got used by my edit box at center of the screen.
But sometimes i accidentally click on this space of the screen, opening chat box and writing "qqqqqqqqqqqqqqqdddddddddq" while being in raid. I'm looking for a way to disable clicking to open my edit chatbox and just using enter to do it.
I've been looking into this : https://github.com/Gethe/wow-ui-sour.../ChatFrame.lua
Found :
Quote:
function ChatFrame_OpenChat(text, chatFrame, desiredCursorPosition)
if chatFrame == nil and CHAT_FOCUS_OVERRIDE ~= nil then
if CHAT_FOCUS_OVERRIDE.supportsSlashCommands or not text or strsub(text, 0, 1) ~= "/" then
CHAT_FOCUS_OVERRIDE:SetFocus();
if text then
CHAT_FOCUS_OVERRIDE:SetText(text);
end
return;
end
end
local editBox = ChatEdit_ChooseBoxForSend(chatFrame);
ChatEdit_ActivateChat(editBox);
editBox.desiredCursorPosition = desiredCursorPosition;
if text then
editBox.text = text;
editBox.setText = 1;
end
if ( editBox:GetAttribute("chatType") == editBox:GetAttribute("stickyType") ) then
if ( (editBox:GetAttribute("stickyType") == "PARTY") and (not IsInGroup(LE_PARTY_CATEGORY_HOME)) or
(editBox:GetAttribute("stickyType") == "RAID") and (not IsInRaid(LE_PARTY_CATEGORY_HOME)) or
(editBox:GetAttribute("stickyType") == "INSTANCE_CHAT") and (not IsInGroup(LE_PARTY_CATEGORY_INSTANCE))) then
editBox:SetAttribute("chatType", "SAY");
end
end
ChatEdit_UpdateHeader(editBox);
return editBox;
end
|
But still, cannot find a way.
Hit me up if you have a hint.
|