View Single Post
01-17-15, 07:37 PM   #10
Sweetsour
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Dec 2014
Posts: 130
So based on what I've leared from all this, I would assume Method A is better than Method B?

Method A
Lua Code:
  1. -- Initial Frame Setup
  2.     addon.CallBtn = CreateFrame("Button",nil,self); -- Used globablly across addon files
  3.     local CallBtn = addon.CallBtn;
  4.     CallBtn:SetNormalTexture("Interface\\Buttons\\UI-GroupLoot-Dice-Up");
  5.     CallBtn:SetHighlightTexture("Interface\\Buttons\\UI-GroupLoot-Dice-Highlight");
  6.     CallBtn:SetPushedTexture("Interface\\Buttons\\UI-GroupLoot-Dice-Down");
  7.     CallBtn:SetDisabledTexture("Interface\\Buttons\\UI-GroupLoot-Dice-Down");
  8.     CallBtn:SetWidth(50);
  9.     CallBtn:SetHeight(50);
  10.     CallBtn:SetPoint("TOP",0,-27);
  11.     CallBtn:Disable();
  12.     CallBtn:SetAlpha(0.4);

Method B
Lua Code:
  1. -- Initial Frame Setup
  2.     addon.CallBtn = CreateFrame("Button",nil,self); -- Used globablly across addon files
  3.     addon.CallBtn:SetNormalTexture("Interface\\Buttons\\UI-GroupLoot-Dice-Up");
  4.     addon.CallBtn:SetHighlightTexture("Interface\\Buttons\\UI-GroupLoot-Dice-Highlight");
  5.     addon.CallBtn:SetPushedTexture("Interface\\Buttons\\UI-GroupLoot-Dice-Down");
  6.     addon.CallBtn:SetDisabledTexture("Interface\\Buttons\\UI-GroupLoot-Dice-Down");
  7.     addon.CallBtn:SetWidth(50);
  8.     addon.CallBtn:SetHeight(50);
  9.     addon.CallBtn:SetPoint("TOP",0,-27);
  10.     addon.CallBtn:Disable();
  11.     addon.CallBtn:SetAlpha(0.4);
  Reply With Quote