Chatter

275 - Module to set Hover Alpha for chat windows through Chatter

Hi!

When hovering over the chat window you can see the background, even if the background alpha has been set to 0. I wrote a small chatter module that allows you to set the hover alpha:

File: HoverAlpha.lua

local addon, private = ...
local Chatter = LibStub("AceAddon-3.0"):GetAddon(addon)
local mod = Chatter:NewModule("Hover Alpha", "AceHook-3.0","AceEvent-3.0")

mod.modName = "Hover Alpha"

local defaults = { profile = { hoverAlpha = 0 } }
local options = {
	lines = {
		type = "range",
		name = "Hover Alpha",
		desc = "Sets the chat frame alpha on hover",
		min = 0,
		max = 1,
		step = 0.05,
		bigStep = 0.1,
		get = function() return mod.db.profile.hoverAlpha end,
		set = function(info, v) mod.db.profile.hoverAlpha = v; DEFAULT_CHATFRAME_ALPHA = v end
	}
}

function mod:OnInitialize()
	self.db = Chatter.db:RegisterNamespace(self:GetName(), defaults)
end

function mod:OnEnable()
	DEFAULT_CHATFRAME_ALPHA = mod.db.profile.hoverAlpha
end

function mod:Info()
	return "Sets the hover alpha of the chat frame."
end

function mod:GetOptions()
	return options
end

Would be great if you could incorporate that into chatter!

User When Change
0xygen Sep 20, 2013 at 09:46 UTC Create

You must login to post a comment. Don't have an account? Register to get one!

Facts

Reported
Sep 20, 2013
Status
New - Issue has not had initial review yet.
Type
Enhancement - A change which is intended to better the project in some way
Priority
Medium - Normal priority.
Votes
0

Reported by

Possible assignees