View Single Post
Old 07-01-11, 06:59 PM   #10
SDPhantom
A Molten Giant
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 933
Originally Posted by Ketho View Post
Why did blizzard change the old functionality?
I think the old functionality was much more useful
GetCVar() has always acted this way. Blizzard later created GetCVarBool() that returns CVars stored as "0" and "1" as a boolean.





Originally Posted by litesung View Post
So there's no way to turn it into a toggle? It has to be done with two different macros?
See my post above:
Originally Posted by SDPhantom View Post
There are Lua functions provided in the default UI that are run by the keybind system for toggling music and sound... To do this in a macro, you make calls to Sound_ToggleMusic() and/or Sound_ToggleSound(). Both are defined in Sound.lua within the FrameXML.

Toggle Music:
Code:
/run Sound_ToggleMusic();
Toggle Sound:
Code:
/run Sound_ToggleSound();
Note: These are two different commands, you can put them together in a single macro if you wish.
Code:
/run Sound_ToggleMusic();
/run Sound_ToggleSound();
or more efficiently...
Code:
/run Sound_ToggleMusic();Sound_ToggleSound();
__________________
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)

Last edited by SDPhantom : 07-01-11 at 07:04 PM.
SDPhantom is offline   Reply With Quote