STL
Raid-Boss
- Registriert
- 10.06.2007
- Beiträge
- 6.464
- Reaktionspunkte
- 4
- Kommentare
- 192
- Buffs erhalten
- 46
Hallo leute
ich hab n Problem mit eChat.. Und zwar möchte ich da die Eingabeleiste verschieben, aber ich finds im Code nich=( könnt ihr mir da helfen?
So ich hoffe irgendwer blickt da durch ^^
MfG STL
ich hab n Problem mit eChat.. Und zwar möchte ich da die Eingabeleiste verschieben, aber ich finds im Code nich=( könnt ihr mir da helfen?
Code:
local _G = getfenv(0)
local tostring = tostring
local _AddMessage = ChatFrame1.AddMessage
local buttons = {"UpButton", "DownButton", "BottomButton"}
local dummy = function() end
local ts = "|cff999999%s|r %s"
local blacklist = {
[ChatFrame2] = true,
[ChatFrame4] = true,
}
_G.CHAT_GUILD_GET = "g %s:\32"
_G.CHAT_RAID_GET = "r %s:\32"
_G.CHAT_PARTY_GET = "p %s:\32"
_G.CHAT_RAID_WARNING_GET = "w %s:\32"
_G.CHAT_RAID_LEADER_GET = "R %s:\32"
_G.CHAT_OFFICER_GET = "o %s:\32"
_G.CHAT_BATTLEGROUND_GET = "b %s:\32"
_G.CHAT_BATTLEGROUND_LEADER_GET = "B %s:\32"
-- 1: index, 2: channelname, 3: twatt
-- Examples are based on this: [1. Channel] Otravi: Hi
local str = "%d %3$s" -- gives: 1 Otravi: Hi
--local str = "[%2$.3s] %s" -- gives: [Cha] Otravi: Hi
--local str = "[%d. %2$.3s] %s" -- gives: [1. Cha] Otravi: Hi
local channel = function(...)
return str:format(...)
end
local AddMessage = function(self, text,...)
text = tostring(text):gsub("|Hplayer:([^:]+):(%d+)|h%[(.-)%]|h", "|Hplayer:%1:%2|h%3|h")
text = text:gsub("%[(%d+)%. (.+)%].+(|Hplayer.+)", channel)
text = ts:format(date"%H:%M", text)
return _AddMessage(self, text, ...)
end
local scroll = function(self, dir)
if(dir > 0) then
if(IsShiftKeyDown()) then
self:ScrollToTop()
else
self:ScrollUp()
end
elseif(dir < 0) then
if(IsShiftKeyDown()) then
self:ScrollToBottom()
else
self:ScrollDown()
end
end
end
for i=1, NUM_CHAT_WINDOWS do
local cf = _G["ChatFrame"..i]
cf:EnableMouseWheel(true)
cf:SetFading(false)
cf:SetScript("OnMouseWheel", scroll)
for k, button in pairs(buttons) do
button = _G["ChatFrame"..i..button]
button:Hide()
button.Show = dummy
end
if(not blacklist[cf]) then
cf.AddMessage = AddMessage
end
end
ChatFrameMenuButton:Hide()
ChatFrameMenuButton.Show = dummy
local eb = ChatFrameEditBox
eb:ClearAllPoints()
eb:SetPoint("BOTTOMLEFT", ChatFrame1, "TOPLEFT", -5, 20)
eb:SetPoint("BOTTOMRIGHT", ChatFrame1, "TOPRIGHT", 5, 20)
eb:SetAltArrowKeyMode(false)
local a, b, c = select(6, eb:GetRegions())
a:Hide(); b:Hide(); c:Hide()
ChatTypeInfo['SAY'].sticky = 1
ChatTypeInfo['YELL'].sticky = 0
ChatTypeInfo['PARTY'].sticky = 1
ChatTypeInfo['GUILD'].sticky = 1
ChatTypeInfo['OFFICER'].sticky = 1
ChatTypeInfo['RAID'].sticky = 1
ChatTypeInfo['RAID_WARNING'].sticky = 0
ChatTypeInfo['BATTLEGROUND'].sticky = 1
ChatTypeInfo['WHISPER'].sticky = 0
ChatTypeInfo['CHANNEL'].sticky = 0
for i=1, NUM_CHAT_WINDOWS do
local cf = getglobal("ChatFrame"..i)
local fn, fs, ff = cf:GetFont()
cf:SetFontObject(nil)
cf:SetFont(fn, 10, ff)
end
-- tabs --------------------------------------------------------------------------------------------- --
local event = CreateFrame"Frame"
local dummy = function() end
local inherit = GameFontNormalSmall
local OnEnter = function(self)
local f, s = inherit:GetFont()
self:SetTextColor(.5, .65, 1)
self:SetFont(f, s, "OUTLINE")
end
local OnLeave = function(self)
if(_G["ChatFrame"..self:GetID()] == SELECTED_CHAT_FRAME) then
self:SetTextColor(.5, .65, 1)
else
self:SetTextColor(1, 1, 1)
end
local f, s = inherit:GetFont()
self:SetFont(f, s)
end
local OnShow = function(self)
local f, s = inherit:GetFont()
self:GetParent():SetFont(f, s+1)
self:GetParent():SetTextColor(1, 0, 0)
end
local OnHide = function(self)
local f, s = inherit:GetFont()
self:GetParent():SetFont(f, s)
self:GetParent():SetTextColor(1, 1, 1)
end
local rollCF = function()
for i = 1, 7 do
local chat = _G["ChatFrame"..i]
local tab = _G["ChatFrame"..i.."Tab"]
local flash = _G["ChatFrame"..i.."TabFlash"]
flash:GetRegions():SetTexture(nil)
flash:SetScript("OnShow", OnShow)
flash:SetScript("OnHide", OnHide)
_G["ChatFrame"..i.."TabLeft"]:Hide()
_G["ChatFrame"..i.."TabMiddle"]:Hide()
_G["ChatFrame"..i.."TabRight"]:Hide()
tab:SetScript("OnEnter", OnEnter)
tab:SetScript("OnLeave", OnLeave)
tab.SetAlpha = dummy
if(chat == SELECTED_CHAT_FRAME) then
tab:SetTextColor(.5, .65, 1)
else
tab:SetTextColor(1, 1, 1)
end
tab:GetHighlightTexture():SetTexture(nil)
if(chat.isDocked) then
tab:Show()
tab.Hide = dummy
else
tab.SetAlpha = nil
tab.Hide = nil
end
end
end
event.PLAYER_LOGIN = function()
rollCF()
hooksecurefunc("FCF_OpenNewWindow", rollCF)
hooksecurefunc("FCF_Close", function(self)
UIParent.Hide(_G[self:GetName().."Tab"])
end)
local _orig_FCF_Tab_OnClick = FCF_Tab_OnClick
FCF_Tab_OnClick = function(button)
_orig_FCF_Tab_OnClick(button)
for k, v in pairs(DOCKED_CHAT_FRAMES) do
if(v == SELECTED_CHAT_FRAME) then
_G[v:GetName().."Tab"]:SetTextColor(.5, .65, 1)
else
_G[v:GetName().."Tab"]:SetTextColor(1, 1, 1)
end
end
end
FCF_ChatTabFadeFinished = dummy
end
event:SetScript("OnEvent", function(self, event, ...)
self[event](self, event, ...)
end)
event:RegisterEvent"PLAYER_LOGIN"
So ich hoffe irgendwer blickt da durch ^^
MfG STL