• 0

    posted a message on Poppins - Official Thread
    Well the scale bug was easy to fix... knew I had it working properly at some point.
    Posted in: General AddOns
  • 0

    posted a message on Poppins - Official Thread
    Damn, I knew saying "currently has no bugs that I know of" would come back and kick me.

    Quote from Phanx »

    Bug: When adjusting the popup button padding, the skin is reset to Blizzard. When changing the skin, the popup button padding is reset to 5.

    Thanks I'll look into it.
    Quote from Phanx »

    Question: I just made a commit to Numen allowing right-click to destroy the associated element's totem; could such functionality be duplicated in Poppins?

    It's possible, I was thinking of doing this when I made the TotemTimer module but I need to add callbacks for the buttons and popbuttons and havn't really decided the best way to go about it.
    Quote from Phanx »

    Question: Another feature in Numen that will prevent me from replacing it with Poppins if I can't replicate is the ability to right-click a pop-up button to cast that totem without swapping the main button's totem. Is that planned, or possible?

    Currently right click is "cast without setting" so i'll probably make middle click "set without casting" the default with an option to swap them.
    Posted in: General AddOns
  • 0

    posted a message on Poppins - Official Thread
    Quote from Vorsim »

    Hai

    I thought id give this addon a try as an easy to setup alternative to autobar. It does this well only im not seeing an option to adjust the size of buttons (i can adjust the size of the pop-up buttons alright) which is not good as the default button size is HUGE. Also a fadeout feature would be nice ;p

    There are two scaling options Button Scale and PopButton Scale, you want the 1st one (there seems to be a bug with the placement of the buttons when scaling them).

    Can you explain what you mean by a fadeout feature?
    Posted in: General AddOns
  • 0

    posted a message on Poppins - Official Thread
    Quote from fred »

    Will you still be maintaining Numen 'if' someone prefers it?

    Well I'm not really maintaining it at the moment, I think 2 or 3 people are updating it and doing abit of cleaning and are doing a good job of it.
    Posted in: General AddOns
  • 0

    posted a message on Poppins - Official Thread
    Poppins is a customisable popup button addon that allows you to create an infinate number of buttons and popup buttons independant from the Blizzard action buttons. You can drag & drop any spell, item or macro into it with any modifiers. Supports the ButtonFacade button skinner.

    I orginally started porting Numen to Ace3 just to try it out (and clean up the code) but I ended up thinking "why should I restict this to shamans?" so I took the basic popup button functionality and started from scratch. As it is now its got all the features I want working and as far as I know has no bugs.

    Setting up a new button is easy:
    Create a button
    Add how many extra popup buttons you want (1 is added on button creation because you should never have less than 1)
    Drag & drop your spells to the button and then into the pop button when they appear along with any modifiers (alt, ctrl and shift) that were held down when adding it to the popup button. If no modifiers are held down that action will be usable whenever no action is available with the currently held down modifiers.

    Commands:
    /poppins

    Modules:
    TotemTimer



    Tell me what you think, feel free to suggest any features and any developers feel free to suggest improvements for the code.
    Posted in: General AddOns
  • 0

    posted a message on Coders help wanted
    You have 2 functions with the same name (addon:OnEnable()), the last one will overwrite the 1st one. You also havn't embeded AceHook-3.0 which means self:SecureHook won't work and the slashcommand wouldn't do anything because there are no options and the database doesn't really do alot either.

    Anyway, the code below should work for what you want it to do:
    raidReRoute = LibStub("AceAddon-3.0"):NewAddon("raidReRoute", "AceConsole-3.0", "AceHook-3.0", "LibSink-2.0")
    local addon = raidReRoute
    
    local defaultDB = {
    	profile = {
    		enabled = true,
    		sinkOptions = {},
    	},
    }
    
    addon.options = {
    	type = "group",
    	handler = addon,
    	args = {
    		enable = {
    			name = "Enable",
    			desc = "Enables / disables the addon",
    			type = "toggle",
    			set = function(key, value)
    				if value then
    					addon:Enable()
    				else
    					addon:Disable()
    				end
    			end,
    			get = "IsEnabled",
    		},
    	}
    }
    
    function addon:OnInitialize()
    	self.db = LibStub("AceDB-3.0"):New(self.name.."DB", defaultDB, "Default")
    	self:SetEnabledState(self.db.profile.enabled)
    	self.db.RegisterCallback(self, "OnProfileChanged")
    	self.db.RegisterCallback(self, "OnProfileReset", "OnProfileChanged")
    	self:SetSinkStorage(self.db.profile.sinkOptions)
    
    	self:RegisterChatCommand( "/rrr", self.options)
    	self.options.args.sinkOptions = self:GetSinkAce3OptionsDataTable()
    end
    
    function addon:OnEnable()
    	self.db.profile.enabled = true
    	self:SecureHook("RaidWarningFrame_OnEvent")
    end
    
    function addon:OnDisable()
    	self.db.profile.enabled = false
    	self:UnhookAll()
    end
    
    function addon:OnProfileChanged()
    	local enabled = self.db.profile.enabled
    	if enabled ~= self:IsEnabled() then
    		if enabled then
    			self:Enable()
    		else
    			self:Disable()
    		end
    	else
    		if enabled then
    			self:OnEnable()
    		else
    			self:OnDisable()
    		end
    	end
    end
    
    function addon:RaidWarningFrame_OnEvent(orig , event, message, ...)
    	if event == "CHAT_MSG_RAID_WARNING" then
    		self:Pour(message) --add [, red , blue , green , alpha ] to this to add color.
    		return RaidWarningFrame:Hide()
    	end
    end
    Posted in: Lua Code Discussion
  • 0

    posted a message on Coders help wanted
    well from the looks of it you havn't added AceDB-3.0 :P. 3.0 is implemented abit differently than 2.0 in that its not a mixin and because of that you need a few extra lines of code to get things like enable/disabling working but other than that it works quite similar.

    Below is how I use it in my addons
    local defaultDB = {
    	profile = {
    		enabled = true,
    	},
    }
    function addon:OnInitialize()
    	self.db = LibStub("AceDB-3.0"):New(self.name.."DB", defaultDB, "Default")
    	self:SetEnabledState(self.db.profile.enabled)
    	self.db.RegisterCallback(self, "OnProfileChanged")
    	self.db.RegisterCallback(self, "OnProfileReset", "OnProfileChanged")
    end
    function addon:OnEnable()
    	self.db.profile.enabled = true
    end
    function addon:OnDisable()
    	self.db.profile.enabled = false
    end
    function addon:OnProfileChanged()
    	local enabled = self.db.profile.enabled
    	if enabled ~= self:IsEnabled() then
    		if enabled then
    			self:Enable()
    		else
    			self:Disable()
    		end
    	else
    		if enabled then
    			self:OnEnable()
    		else
    			self:OnDisable()
    		end
    	end
    end

    http://www.wowace.com/wiki/AceDB-3.0
    Posted in: Lua Code Discussion
  • 0

    posted a message on ButtonFacade (was LibButtonSkin-1.0)
    Bug: If you try and remove a button from a group that isn't in the group you get an error when it tries to reskin it because it doesn't have the btndata.
    I added a fix to my local copy by just checking if btndata existed
    RemoveButton = function(self,btn,noReskin)
    	local btndata = self.Buttons[btn]
    	if not btndata then return end
    	reverse[btn] = nil
    	if not noReskin then -- damn that sounds redneck...
    		ApplySkin("Blizzard",false,false,btn,btndata)
    	end
    	self.Buttons[btn] = nil
    end


    Also, you could reduce the amount of table creation by making a table and then using that table when ever a button doesn't pass the btndata. e.g.
    local tmpTable = {}
    AddButton = function(self,btn,btndata)
    	btndata = btndata or tmpTable

    instead of
    AddButton = function(self,btn,btndata)
    	btndata = btndata or {}
    Posted in: General AddOns
  • 0

    posted a message on Coders help wanted
    Ace3 is quite similar to Ace2. Unfortunatly there isn't alot of the documentation for it in the wiki but the actual files are very well commented so you'll need to look through them to find the mixins and how to use them. Here are a few links that may help:

    http://www.wowace.com/wiki/Ace3
    http://www.wowace.com/wiki/Differences_from_Ace2_to_Ace3
    http://www.wowace.com/wiki/WelcomeHome_-_Your_first_Ace3_Addon
    Posted in: Lua Code Discussion
  • 0

    posted a message on Coders help wanted
    I don't think AceAddon-2.0 supports embeding non AceLibrary addons so you need to use LibStub to retrieve the lib and :Embed(addon) to embed it.
    raidReRoute = AceLibrary("AceAddon-2.0"):new("AceConsole-2.0","AceDB-2.0","AceHook-2.1")
    LibStub("LibSink-2.0"):Embed(raidReRoute)
    Posted in: Lua Code Discussion
  • 0

    posted a message on Undocumented COMBAT_LOG_EVENT arguments
    Tried it out on the PTR and the SPELL_HEAL subevent doesn't send any extra info when you overheal. I'm hoping we'll be seeing this Soon?.
    Posted in: Lua Code Discussion
  • 0

    posted a message on Numen (a totem button addon) - Official Topic
    Quote from sid »

    I agree.

    I want to switch to this from YaTa, but the fact I have to shift click to cast a totem and have it NOT over-write the ones I have intentionally picked as the ones I want on the first button is just flat out backwards to me.

    Why would I ever want it to swap it unless I tell it to?

    Please add an inverter in the options :)

    If you would prefer for it to only set it as the active totem on left click then you can open NumenPopButtons.lua and go to line 41 and change:
    self.button:SetAttribute("onmouseupbutton", "mup")

    to
    self.button:SetAttribute("onmouseupbutton1", "mup")
    Posted in: General AddOns
  • 0

    posted a message on Numen (a totem button addon) - Official Topic
    Quote from Astaldo »

    That is actually a very nice suggestion if it's feasible.

    I can't think of a scenario where you'd want the "currently active" totem listed on the popup bar again.
    All the secondary actions like setting it as default without casting it, or casting it without setting it as default (with modifiers pressed)
    are redundant in this particular case.

    So, /sign the request (if it's not a huge trouble to code).

    As it currently is I don't think it's possible as the popup buttons don't know about the buttons state (which totem is currently active). Though it might be possible if the popup button was parented to another secureframe.
    Posted in: General AddOns
  • 0

    posted a message on Custom Chat Link possible?
    If you need the addon on the receiving end, why not just make it work like this?:
    Player: [p:Name]
    Item: [i:Name]
    spell: [s:Name]
    Posted in: Lua Code Discussion
  • 0

    posted a message on ButtonFacade (was LibButtonSkin-1.0)
    I think I'd approch adding buttons/groups abit differently, instead of being oriented around a group I would orientate it more around the button. (Its just how I'd approch it, not sure if its a better way or not)


    local buttons = {}
    local addons = {}
    local groups = {}
    function lib:AddButton("addonName", {button}, {buttonData} or nil)
    buttons[button] = buttonData
    addons[button] = addonName
    end

    function lib:RemoveButton({button}, noReskin or nil)
    addons[button] = nil
    groups[button] = nil
    buttons[button] = nil
    end

    function lib:SetGroup({button}, "groupName" or nil)
    groups[button] = groupName
    end

    function lib:GetButtonInfo({button})
    return buttons[button], addons[button], groups[button]
    end

    function lib:ListButtons()
    local button, buttonData = next(buttons)
    while button ~= nil do
    return function()
    return button, buttonData, addons[button], groups[button]
    end
    button, buttonData = next(buttons, button)
    end
    end

    function lib:ListAddonButtons(addon)
    local button, buttonAddon = next(addons)
    while button ~= nil do
    if buttonAddon == addon then
    return function()
    return button, buttons[button], groups[button]
    end
    end
    button, buttonAddon = next(addons, button)
    end
    end

    function lib:ListGroupButtons(group)
    local button, buttonGroup = next(groups)
    while button ~= nil do
    if buttonGroup == group then
    return function()
    return button, buttons[button], addons[button]
    end
    end
    button, buttonGroup = next(groups, button)
    end
    end

    do
    local t = {}
    function lib:ListAddons()
    for k in pairs(t) do t[k] = nil end
    for _,_,addon in lib:ListButtons()
    if not t[addon] then t[addon] = true end
    end
    return pairs(t)
    end
    end

    do
    local t = {}
    function lib:ListGroups()
    for k in pairs(t) do t[k] = nil end
    for _,_,_,group in lib:ListButtons()
    if not t[group] then t[group] = true end
    end
    return pairs(t)
    end
    end

    -- group > addon > default
    local defaultSkin = "Blizzard"
    local addonSkins = {
    --["AddonExample"] = "Dreamlayout"
    }
    local groupSkins = {
    --["GroupExample"] = "Zoomed"
    }
    function lib:ApplyGroupSkin(group)
    local groupSkin = groupSkins[group]
    for button in lib:ListGroupButtons(group) do
    lib:ApplyButtonSkin(button, groupSkin)
    end
    end

    function lib:ApplyAddonSkin(addon)
    local addonSkin = addonSkins[addon]
    for button, _, group in lib:ListAddonButtons(addon) do
    if not groupSkins[group] then
    lib:ApplyButtonSkin(button, addonSkin)
    end
    end
    end

    function lib:ApplyDefaultSkin()
    for button, _, addon, group in lib:ListButtons() do
    if not addonSkins[addon] or not groupSkins[group] then
    lib:ApplyButtonSkin(button, defaultSkin)
    end
    end
    end

    function lib:ApplyAllSkins()
    for button, _, addon, group in lib:ListButtons() do
    local skin = addonSkins[addon] or groupSkins[group] or defaultSkin
    lib:ApplyButtonSkin(button, skin)
    end
    end

    Posted in: General AddOns
  • To post a comment, please or register a new account.