update to 1.0.0
Cette révision appartient à :
Parent
67633a994f
révision
9da175d295
4
Bar.lua
4
Bar.lua
|
@ -141,7 +141,7 @@ function Bar.New(BarSave)
|
|||
NewBar.ButtonFrame = ButtonFrame;
|
||||
|
||||
--[[Background Layer, this will contain all controls and is used in resizing]]--
|
||||
local Background = CreateFrame("FRAME", nil, ControlFrame);
|
||||
local Background = CreateFrame("FRAME", nil, ControlFrame, "BackdropTemplate");
|
||||
Background:SetSize(1, 1);
|
||||
Background:SetPoint("TOPLEFT", ControlFrame, "TOPLEFT");
|
||||
Background:SetBackdrop({bgFile = Const.ImagesDir.."Backdrop.tga", edgeFile = "Interface/Tooltips/UI-Tooltip-Border", tile = true, tileSize = 16, edgeSize = 16, insets = {left=3, right=3, bottom=3, top=3}});
|
||||
|
@ -182,7 +182,7 @@ function Bar.New(BarSave)
|
|||
NewBar.TileTexture = TileTexture;
|
||||
|
||||
--[[Label Frame]]--
|
||||
local LabelFrame = CreateFrame("FRAME", nil, ControlFrame);
|
||||
local LabelFrame = CreateFrame("FRAME", nil, ControlFrame, "BackdropTemplate");
|
||||
LabelFrame:SetSize(1, 1);
|
||||
LabelFrame:SetBackdrop({bgFile = "Interface/Tooltips/UI-Tooltip-Background", edgeFile = "Interface/Tooltips/UI-Tooltip-Border", tile = true, tileSize = 16, edgeSize = 8, insets = {left=1.5, right=1.5, bottom=1.5, top=1.5}});
|
||||
LabelFrame:SetBackdropColor(0, 0, 0, 1);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
## Interface: 80200
|
||||
## Interface: 90002
|
||||
## Title: Button Forge
|
||||
## Notes: Add as many or few extra Action Bars and Buttons to your user interface to complement the standard (or other) Action Bars
|
||||
## Version: 0.9.50.2
|
||||
## Version: 0.9.60
|
||||
## Author: Massiner of Nathrezim
|
||||
## SavedVariables: ButtonForgeGlobalSettings, ButtonForgeGlobalProfiles, ButtonForgeGlobalBackup
|
||||
## SavedVariablesPerCharacter: ButtonForgeSave, BFSave
|
||||
|
|
|
@ -98,9 +98,9 @@ Const.SlashCommands["-tooltips"] = {params = "bool", group = "bar"};
|
|||
Const.SlashCommands["-emptybuttons"] = {params = "bool", group = "bar"};
|
||||
Const.SlashCommands["-lockbuttons"] = {params = "bool", group = "bar"};
|
||||
Const.SlashCommands["-scale"] = {params = "^%s*(%d*%.?%d+)%s*$", group = "bar"};
|
||||
Const.SlashCommands["-rows"] = {params = "^%s*(%d+)%s*$", group = "bar", requires = {"-bar"}};
|
||||
Const.SlashCommands["-cols"] = {params = "^%s*(%d+)%s*$", group = "bar", requires = {"-bar"}};
|
||||
Const.SlashCommands["-coords"] = {params = "^%s*(%d*%.?%d+)%s*,?%s*(%d*%.?%d+)%s*$", group = "bar", requires = {"-bar"}};
|
||||
Const.SlashCommands["-rows"] = {params = "^%s*(%d+)%s*$", group = "bar", requires = {"-createbar", "-bar"}};
|
||||
Const.SlashCommands["-cols"] = {params = "^%s*(%d+)%s*$", group = "bar", requires = {"-createbar", "-bar"}};
|
||||
Const.SlashCommands["-coords"] = {params = "^%s*(%d*%.?%d+)%s*,?%s*(%d*%.?%d+)%s*$", group = "bar", requires = {"-createbar", "-bar"}};
|
||||
Const.SlashCommands["-gap"] = {params = "^%s*(%d*%.?%d+)%s*$", group = "bar"};
|
||||
Const.SlashCommands["-enabled"] = {params = "bool", group = "bar"};
|
||||
Const.SlashCommands["-info"] = {params = "^()$", group = "bar", requires = {"-bar"}};
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
</Scripts>
|
||||
</Frame>
|
||||
|
||||
<Frame name="BFBindingDialog" parent="UIParent" hidden="true" clampedtoscreen="true" enablemouse="true" movable="true" frameStrata="FULLSCREEN_DIALOG">
|
||||
<Frame name="BFBindingDialog" parent="UIParent" hidden="true" clampedtoscreen="true" enablemouse="true" movable="true" frameStrata="FULLSCREEN_DIALOG" inherits="BackdropTemplate">
|
||||
<!--<FrameSkin skinid="dcb143e1-a4ab-4e7c-b934-1efa40101d21" frameid="2d508883-59c2-4f83-ae10-27aaad48391b" />-->
|
||||
<Size>
|
||||
<AbsDimension x="341" y="137" />
|
||||
|
|
|
@ -1,7 +1,11 @@
|
|||
Button Forge
|
||||
Mod for World of Warcraft
|
||||
|
||||
Author: Alternator (Massiner of Nathrezim)
|
||||
Author: Massiner of Nathrezim
|
||||
Contributor: xfsbill
|
||||
Past Contributors: DT85, DandierSphinx
|
||||
|
||||
Version: 1.0.0
|
||||
|
||||
Description: Graphically create as many Action Bars and Buttons in the game as you choose
|
||||
|
||||
|
@ -19,6 +23,8 @@ Restrictions:
|
|||
|
||||
|
||||
History:
|
||||
19-Nov-2020 v1 - Updated for Wow v9.0 - This update is provided by xfsbill , jee_dae (possibly others ?) - thanks for keeping a version of the addon working all this time!
|
||||
|
||||
26-July-2018 v0.9.50 - Updated for Wow v8.0 - this update is provided by DT85 (Zaranias - Aman'thul) & DandierSphinx... A big thanks for this!!!
|
||||
- The below issues all prevented Button Forge functioning correctly or in some cases at all
|
||||
- Corrected issue with removed UPDATE_WORLD_STATES event
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
<Script file="UILibLayers.lua"/>
|
||||
|
||||
<Frame name="BFOverlay" enablemouse="true" hidden="true" virtual="true">
|
||||
<Frame name="BFOverlay" enablemouse="true" hidden="true" virtual="true" inherits="BackdropTemplate">
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT" relativeTo="UIParent" relativePoint="TOPLEFT">
|
||||
<Offset>
|
||||
|
|
|
@ -9,12 +9,12 @@
|
|||
local UILib = BFUILib;
|
||||
local Const = BFConst;
|
||||
|
||||
local VertLine = CreateFrame("FRAME", nil, UIParent);
|
||||
VertLine:SetBackdrop({bgFile = Const.ImagesDir.."VertLine.tga", edgeFile = nil, tile = false, tileSize = 1, edgeSize = 0, insets = {left=0, right=0, bottom=0, top=0}});
|
||||
local VertLine = CreateFrame("FRAME", nil, UIParent, "BackdropTemplate");
|
||||
VertLine:SetBackdrop({bgFile = Const.ImagesDir.."VertLine.tga", edgeFile = nil, tile = false, tileSize = 1, edgeSize = 1, insets = {left=0, right=0, bottom=0, top=0}});
|
||||
VertLine:SetWidth(Const.VLineThickness / UIParent:GetScale());
|
||||
|
||||
local HorizLine = CreateFrame("FRAME", nil, UIParent);
|
||||
HorizLine:SetBackdrop({bgFile = Const.ImagesDir.."HorizontalLine.tga", edgeFile = nil, tile = false, tileSize = 1, edgeSize = 0, insets = {left=0, right=0, bottom=0, top=0}});
|
||||
local HorizLine = CreateFrame("FRAME", nil, UIParent, "BackdropTemplate");
|
||||
HorizLine:SetBackdrop({bgFile = Const.ImagesDir.."HorizontalLine.tga", edgeFile = nil, tile = false, tileSize = 1, edgeSize = 1, insets = {left=0, right=0, bottom=0, top=0}});
|
||||
HorizLine:SetHeight(Const.HLineThickness / UIParent:GetScale());
|
||||
|
||||
|
||||
|
|
|
@ -2,8 +2,11 @@
|
|||
<!--Autogenerated by wowuides, Version=1.0.300.0, Culture=neutral, PublicKeyToken=null-->
|
||||
<Script file="UILibToolbar.lua"/>
|
||||
|
||||
<Frame name="BFToolbar" parent="BFConfigureLayer" enablemouse="true" movable="true">
|
||||
<Frame name="BFToolbar" parent="BFConfigureLayer" enablemouse="true" movable="true" inherits="BackdropTemplate">
|
||||
<!--<FrameSkin skinid="dcb143e1-a4ab-4e7c-b934-1efa40101d21" frameid="2d508883-59c2-4f83-ae10-27aaad48391b" />-->
|
||||
<KeyValues>
|
||||
<KeyValue key="backdropInfo" value="BACKDROP_DIALOG_32_32" type="global"/>
|
||||
</KeyValues>
|
||||
<Scripts>
|
||||
<OnMouseDown>
|
||||
self:StartMoving();
|
||||
|
@ -22,17 +25,6 @@
|
|||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<Backdrop bgFile="Interface\DialogFrame\UI-DialogBox-Background" edgeFile="Interface\DialogFrame\UI-DialogBox-Border" tile="true">
|
||||
<BackgroundInsets>
|
||||
<AbsInset left="11" right="12" top="12" bottom="11" />
|
||||
</BackgroundInsets>
|
||||
<TileSize>
|
||||
<AbsValue val="32" />
|
||||
</TileSize>
|
||||
<EdgeSize>
|
||||
<AbsValue val="32" />
|
||||
</EdgeSize>
|
||||
</Backdrop>
|
||||
<Layers>
|
||||
<Layer>
|
||||
<Texture name="$parentTitleBorder" file="Interface\DialogFrame\UI-DialogBox-Header">
|
||||
|
|
48
Util.lua
48
Util.lua
|
@ -1208,6 +1208,7 @@ function Util.SlashShowMessageByLine(Message)
|
|||
end
|
||||
|
||||
function SlashCmdList.BUTTONFORGE(msg, editbox)
|
||||
local FirstCommand;
|
||||
local PreparedCommands = {};
|
||||
local Command, Params;
|
||||
local Count = 0;
|
||||
|
@ -1215,6 +1216,9 @@ function SlashCmdList.BUTTONFORGE(msg, editbox)
|
|||
for Token, Space in string.gmatch(msg, '([^%s]+)([%s]*)') do
|
||||
if (Const.SlashCommands[strlower(Token)]) then
|
||||
if (Command) then
|
||||
if (FirstCommand == nil) then
|
||||
FirstCommand = Command;
|
||||
end;
|
||||
Count = Count + 1;
|
||||
--PreparedCommands["Count"] = Count;
|
||||
PreparedCommands[Command] = Util.ProcessSlashCommandParams(Command, Params);
|
||||
|
@ -1248,7 +1252,7 @@ function SlashCmdList.BUTTONFORGE(msg, editbox)
|
|||
-- 2. A rules required's must be present
|
||||
-- 3. A rules exclusions must not be present
|
||||
local Group;
|
||||
local FirstCommand;
|
||||
|
||||
for k, v in pairs(Commands) do
|
||||
FirstCommand = FirstCommand or k;
|
||||
if (Group ~= nil and Group ~= Const.SlashCommands[k].group) then
|
||||
|
@ -1260,13 +1264,20 @@ function SlashCmdList.BUTTONFORGE(msg, editbox)
|
|||
|
||||
local Requires = Const.SlashCommands[k].requires;
|
||||
if (Requires) then
|
||||
local RequiresValid = false;
|
||||
local RequiresInfo = {};
|
||||
-- make sure we have at least one of the requirements
|
||||
for k1, v1 in pairs(Requires) do
|
||||
if (Commands[v1] == nil) then
|
||||
-- Missing a required command
|
||||
DEFAULT_CHAT_FRAME:AddMessage(string.gsub(string.gsub(Util.GetLocaleString("SlashCommandRequired"), "<COMMANDA>", k), "<COMMANDB>", v1), .5, 1, 0, 1);
|
||||
return;
|
||||
table.insert(RequiresInfo,v1);
|
||||
if (Commands[v1] ~= nil) then
|
||||
RequiresValid = true;
|
||||
end
|
||||
end
|
||||
if (RequiresValid == false) then
|
||||
-- Missing a required command
|
||||
DEFAULT_CHAT_FRAME:AddMessage(string.gsub(string.gsub(Util.GetLocaleString("SlashCommandRequired"), "<COMMANDA>", k), "<COMMANDB>", table.concat(RequiresInfo, " or ")), .5, 1, 0, 1);
|
||||
return;
|
||||
end
|
||||
end
|
||||
|
||||
local Incompat = Const.SlashCommands[k].incompat;
|
||||
|
@ -1536,7 +1547,13 @@ function Util.SetCursor(Command, Data, Subvalue, Subsubvalue)
|
|||
UILib.StopDraggingIcon();
|
||||
SpellFlyout:Hide();
|
||||
if (Command == "spell") then
|
||||
PickupSpell(Subsubvalue);
|
||||
-- pet spell or not
|
||||
local name = GetSpellInfo(Subsubvalue);
|
||||
if ( Util.PetSpellIndex[name] ) then
|
||||
PickupSpellBookItem(Util.PetSpellIndex[name], BOOKTYPE_PET);
|
||||
else
|
||||
PickupSpell(Subsubvalue);
|
||||
end;
|
||||
elseif (Command == "item") then
|
||||
PickupItem(Data);
|
||||
elseif (Command == "macro") then
|
||||
|
@ -1668,7 +1685,7 @@ end
|
|||
-------------------------------------------]]
|
||||
function Util.GetFullSpellName(Name, Rank)
|
||||
--BFA fix: GetSpellInfo now returns a nil for the rank. That's passed in here
|
||||
--So we check to make sure ranx exists or only pass back the name itself.
|
||||
--So we check to make sure rank exists or only pass back the name itself.
|
||||
if (Rank) then
|
||||
Rank = "("..Rank..")";
|
||||
else
|
||||
|
@ -1759,21 +1776,16 @@ end
|
|||
function Util.CachePetSpellIndexes()
|
||||
local i = 1;
|
||||
local NewPSI = {};
|
||||
--Util.NewPetSpellIndex = {};
|
||||
while true do
|
||||
local NameRank = Util.GetFullSpellName(GetSpellInfo(i, BOOKTYPE_PET));
|
||||
if (not NameRank) then
|
||||
break;
|
||||
local spellName, spellSubName = GetSpellBookItemName(i, BOOKTYPE_PET)
|
||||
if not spellName then
|
||||
do break end
|
||||
end
|
||||
--if (not Util.PetSpellIndex[NameRank]) then
|
||||
-- Util.NewPetSpellIndex[NameRanl] = i;
|
||||
--end
|
||||
NewPSI[NameRank] = i;
|
||||
i = i + 1;
|
||||
NewPSI[spellName] = i;
|
||||
i = i + 1
|
||||
end
|
||||
|
||||
Util.PetSpellIndex = NewPSI;
|
||||
|
||||
Util.PetSpellIndex = NewPSI;
|
||||
end
|
||||
|
||||
function Util.LookupSpellIndex(NameRank)
|
||||
|
|
Chargement…
Référencer dans un nouveau ticket