Jump to content

Need help with a script


  • Please log in to reply
4 replies to this topic

#1 Prozaak

Prozaak
  • Members
  • Posts: 19

Posted 23 September 2012 - 05:47 PM

hello everyone
I need a little help with the script below:

View PostSyncrow, on 19 August 2012 - 12:58 AM, said:

Hi guys,
i'm back with another small script, cause i changed my UI so my Chat messes up with my FocusFrame...and so i thought to add a Button to Hide the Chat if not needed!
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()

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)

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)
Posted Image

I wish he would save if I set it to keep hidden or chat show.
If I choose to log out and hidden, I want it to remain hidden when I log in again

sorry for bad english

#2 Syncrow

Syncrow
  • Premium
  • Curse Premium
  • Posts: 183

Posted 24 September 2012 - 06:18 PM

View PostProzaak, on 23 September 2012 - 05:47 PM, said:


I wish he would save if I set it to keep hidden or chat show.
If I choose to log out and hidden, I want it to remain hidden when I log in again

sorry for bad english
yeah thats not really a big deal, but tonight is mop launch, so i'll take care of it after reaching lvl 90, i just have to fix the chat-marks {star, skull, cross} to hide...

#3 Prozaak

Prozaak
  • Members
  • Posts: 19

Posted 29 September 2012 - 12:14 AM

View PostSyncrow, on 24 September 2012 - 06:18 PM, said:

yeah thats not really a big deal, but tonight is mop launch, so i'll take care of it after reaching lvl 90, i just have to fix the chat-marks {star, skull, cross} to hide...


yea im using your script to toggle show/hide my actionbars but im having some problems if i toggle show and enter some stances.
I tried as a SavedVariable but i dont understand much about lua script and didnt work
thanks for replying. I am awaiting the update for this great script

#4 Syncrow

Syncrow
  • Premium
  • Curse Premium
  • Posts: 183

Posted 29 September 2012 - 04:25 AM

View PostProzaak, on 29 September 2012 - 12:14 AM, said:

yea im using your script to toggle show/hide my actionbars but im having some problems if i toggle show and enter some stances.
I tried as a SavedVariable but i dont understand much about lua script and didnt work
thanks for replying. I am awaiting the update for this great script

here the download link for v 1.1
http://www.file-uplo...Button.rar.html
(but is still buggin cause of the current tab and the pet-battle-log....) but should do what it should mainly!!!

#5 Prozaak

Prozaak
  • Members
  • Posts: 19

Posted 29 September 2012 - 11:59 PM

View PostSyncrow, on 29 September 2012 - 04:25 AM, said:

here the download link for v 1.1
http://www.file-uplo...Button.rar.html
(but is still buggin cause of the current tab and the pet-battle-log....) but should do what it should mainly!!!

Thank you so much man!
i improved your script for my actionbars

Im also using your script on my chat and its working pretty well
thank you again for the help




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

<