I noticed that with the way the volume buttons worked (particularly the volume up button, though they are coded similarly), if you decreased the volume to 0%, the + button would not bring the volume back up. Also, you could use the + button to apparently bring the volume over 100%. I fixed both these problems with the following code, and changed the - button to similar code.
Code:
local c = RAID_CLASS_COLORS[select(2, UnitClass("player"))]
local vol = tonumber(GetCVar(TUSUI_VOLUME_CVAR[TUSUI_VOLUME_SETTING]))
if pressed then
if vol >= 0 and vol <= 1 then
if IsControlKeyDown() then
vol = vol + 0.01
else
vol = vol + 0.1
end
else
vol = 0
end
if vol > 1 then vol = 1 end
SetCVar(TUSUI_VOLUME_CVAR[TUSUI_VOLUME_SETTING],vol)
self.bg:SetGradientAlpha("VERTICAL",c.r,c.g,c.b,1,1,1,1,1)
elseif released then
self.bg:SetGradientAlpha("VERTICAL",c.r,c.g,c.b,1,0.074,0.074,0.074,1)
end
I have also messed around with some other things in KGPanels, such as getting the skada frame looking centered and skada staying hidden when the top buttons are toggled off then on if it was hidden to start out with, getting the omen frame to actually show up, getting my Archy addon to blend in like everything else, and just making everything nice in general for the 1920x1200 resolution.
Just got done fixing a tiny tiny tiny bug that was bugging me about the top buttons. If you click on a button and then drag the mouse off, then release the left mouse button, the color would be as if the mouse was hovering over the button.