Jump to content

  • Curse Sites
Help

Toggle Chat Button Help.


  • Please log in to reply
2 replies to this topic

#1 Sascatuan

Sascatuan
  • Junkies
  • Undeadclass_name
  • US-Tichondrius
  • Bloodlust
  • Posts: 409
  • Talents: Affliction 0/0/2/2/0/1

Posted 21 September 2012 - 07:10 AM

local f = CreateFrame("Button",nil,UIParent)
f:SetSize(30,30)
f.t=f:CreateTexture(nil,"BORDER")
f.t:SetTexture("Interface\\CHATFRAME\\UI-ChatIcon-Minimize-Up.blp")
f.t:SetAllPoints(f)
f:SetPoint("BOTTOM","ChatFrame1ButtonFrame","BOTTOM",0,-35)
f:Show()[/sub][/sup]
[sup][sub]local ChatHide = false
--[[although not required, but makes the button more alive
f:SetScript("OnMouseDown", function(self, button)
				if ChatHide  == false then
								if button == "LeftButton" then
												f.t:SetTexture("Interface\\CHATFRAME\\UI-ChatIcon-Minimize-Down.blp")
								end
				elseif ChatHide == true then
								if button == "LeftButton" then
												f.t:SetTexture("Interface\\CHATFRAME\\UI-ChatIcon-Maximize-Down.blp")
								end
				end
end)[/sub][/sup]
[sup][sub]f:SetScript("OnMouseUp", function(self, button)
				if ChatHide  == false then
								if button == "LeftButton" then
												f.t:SetTexture("Interface\\CHATFRAME\\UI-ChatIcon-Minimize-Up.blp")
								end
				elseif ChatHide == true then
								if button == "LeftButton" then
												f.t:SetTexture("Interface\\CHATFRAME\\UI-ChatIcon-Maximize-Up.blp")
								end
				end
end)
--]]
f:SetScript("OnClick", function(self, button)
				if ChatHide == false then
								f.t:SetTexture("Interface\\CHATFRAME\\UI-ChatIcon-Maximize-Up.blp")
								FriendsMicroButton:Hide()
								GeneralDockManager:Hide()
								ChatFrameMenuButton:Hide()
								for i=1, NUM_CHAT_WINDOWS do
												_G["ChatFrame"..i..""]:SetAlpha(0)
												_G["ChatFrame"..i.."ButtonFrame"]:Hide()
								end
								ChatHide = true
				elseif ChatHide == true then
								f.t:SetTexture("Interface\\CHATFRAME\\UI-ChatIcon-Minimize-Up.blp")
								FriendsMicroButton:Show()
								GeneralDockManager:Show()
								ChatFrameMenuButton:Show()
								for i=1, NUM_CHAT_WINDOWS do
												_G["ChatFrame"..i..""]:SetAlpha(1)
												_G["ChatFrame"..i.."ButtonFrame"]:Show()
								end
								ChatHide = false
				end
end)

Was posted by another junkie awhile ago, the issue is that it keeps returning  lua:7: unexpected symbol near '/' , and i don't know anything about lua, Any help with fixing this would be appreciated thanks.

Edited by Sascatuan, 21 September 2012 - 07:11 AM.

Posted Image

#2 riccod

riccod
  • Junkies
  • Undeadclass_name
  • EU-Blackrock
  • Glutsturm / Emberstorm
  • Posts: 218
  • Talents: Subtlety 1/2/2/1/0/1
  • 2v2: 1788

Posted 21 September 2012 - 02:24 PM

go to line 7 & 8 and remove:
[/sub][/sup]
[sup][sub]

#3 Sascatuan

Sascatuan
  • Junkies
  • Undeadclass_name
  • US-Tichondrius
  • Bloodlust
  • Posts: 409
  • Talents: Affliction 0/0/2/2/0/1

Posted 22 September 2012 - 12:22 AM

problem im having now, is that when its hidden, the realid symbols for the friend icon, and the game they are playing show thru, and idea how to fix that?
Posted Image




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

<