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


  • New
  • Enhancment
Open
Assigned to moonfann
  • _ForgeUser6163876 created this issue Sep 20, 2013

    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!

  • _ForgeUser6163876 added the tags New Enhancment Sep 20, 2013
  • Stanzilla unassigned issue from ardentvark Oct 24, 2014
  • Stanzilla assigned issue to moonfann Oct 24, 2014

To post a comment, please login or register a new account.