Initial Commit, version 0.9.47
|
@ -0,0 +1,32 @@
|
|||
## Interface: 70100
|
||||
## 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.47
|
||||
## Author: Massiner of Nathrezim
|
||||
## SavedVariables: ButtonForgeGlobalSettings, ButtonForgeGlobalProfiles, ButtonForgeGlobalBackup
|
||||
## SavedVariablesPerCharacter: ButtonForgeSave, BFSave
|
||||
## OptionalDeps: Masque
|
||||
Declares.lua
|
||||
Const.lua
|
||||
Locale-enUS.lua
|
||||
Locale-koKR.lua
|
||||
Locale-ruRU.lua
|
||||
Locale-zhCN.lua
|
||||
Locale-zhTW.lua
|
||||
Locale-deDE.lua
|
||||
EventManager.lua
|
||||
UILibLayers.xml
|
||||
UILibConfigPage.xml
|
||||
UILibClickMask.lua
|
||||
UILibDragIcon.lua
|
||||
UILibCreateButton.lua
|
||||
UILibInputBox.lua
|
||||
UILibLines.lua
|
||||
Util.lua
|
||||
UILibToolbar.xml
|
||||
KeyBinder.xml
|
||||
Button.lua
|
||||
Bar.lua
|
||||
CustomAction.lua
|
||||
bindings.lua
|
||||
ButtonForge_API1.lua
|
|
@ -0,0 +1,135 @@
|
|||
--[[
|
||||
Author: Alternator (Massiner of Nathrezim)
|
||||
Copyright 2011
|
||||
|
||||
Major Version: 1
|
||||
Minor Version: 1
|
||||
|
||||
Notes: This API may expand over time, each change to it will see an update to the API minor version numbering
|
||||
If a large change to the API is required a whole new API will be created (and this one retained if appropriate)
|
||||
]]
|
||||
|
||||
|
||||
local APIMinorVersion = 1;
|
||||
|
||||
local API = ButtonForge_API1;
|
||||
local Const = BFConst;
|
||||
local Util = BFUtil;
|
||||
|
||||
|
||||
--[[
|
||||
Returns API minor version
|
||||
|
||||
Note: The API object cannot change it's major version from that in the api name, so in this case will always be 1)
|
||||
--]]
|
||||
function API.GetAPIMinorVersion()
|
||||
return APIMinorVersion;
|
||||
end
|
||||
|
||||
|
||||
--[[
|
||||
Returns Version, Version Minor
|
||||
--]]
|
||||
function API.GetButtonForgeVersion()
|
||||
return Const.Version, Const.VersionMinor;
|
||||
end
|
||||
|
||||
|
||||
--[[
|
||||
Returns true if the ButtonForge has finished initialising (loading creating the players buttons)
|
||||
|
||||
Notes: - Button Forge will usually have finished initialising when the player first enters the gameworld, but sometimes
|
||||
may take a little longer if companion/macro info is not yet available in the game
|
||||
--]]
|
||||
function API.GetButtonForgeInitialised()
|
||||
return Util.Loaded or false;
|
||||
end
|
||||
|
||||
|
||||
--[[
|
||||
Returns a table with all the frame names for allocated buttons. The table is created and belongs to the caller (i.e. no reference is kept by the API)
|
||||
|
||||
Notes: - Further buttons may be allocated/deallocated during a play session by the player, (recommended to use a callback to stay up to date)
|
||||
- ButtonFrameNames wont be available until Button Forge has finished Initialising
|
||||
- Deallocated buttons will remain valid (frames cant be destroyed), but they wont be reported back by this function
|
||||
As an aside Deallocated buttons are recycled by the system if the user chooses to allocate more buttons
|
||||
--]]
|
||||
function API.GetButtonFrameNames()
|
||||
local Buttons = Util.ActiveButtons;
|
||||
local FrameNames = {};
|
||||
for i = 1, #Buttons do
|
||||
table.insert(FrameNames, Buttons[i].Widget:GetName());
|
||||
end
|
||||
|
||||
return FrameNames;
|
||||
end
|
||||
|
||||
|
||||
--[[
|
||||
Register a callback to receive Button Forge events
|
||||
|
||||
Callback: The function that will be called whenever a BF event occurs
|
||||
Arg: First arg to be passed to the callback (e.g. the self parameter if using : syntax)
|
||||
the function will be called as follows:
|
||||
Callback(Arg, ButtonForgeEvent, ...);
|
||||
|
||||
|
||||
ButtonForgeEvents:
|
||||
"INITIALISED"
|
||||
"BUTTON_ALLOCATED", ButtonName
|
||||
"BUTTON_DEALLOCATED", ButtonName
|
||||
--]]
|
||||
function API.RegisterCallback(Callback, Arg)
|
||||
Util.RegisterCallback(Callback, Arg);
|
||||
end
|
||||
|
||||
|
||||
--[[
|
||||
Unregister a callback
|
||||
|
||||
The Callback/Arg combination to unregister
|
||||
--]]
|
||||
function API.UnregisterCallback(Callback, Arg)
|
||||
Util.UnregisterCallback(Callback, Arg);
|
||||
end
|
||||
|
||||
|
||||
--[[
|
||||
Returns the command currently on the button
|
||||
|
||||
This function has been designed to provide the same returns as the GetActionInfo API would
|
||||
(there may be some slight differences such as possibly with spells that have dual modes. E.g. Hunter Traps, each mode is a different spellid)
|
||||
|
||||
Returns:
|
||||
"spell", SpellId, SpellBook
|
||||
"item", ItemId
|
||||
"macro", MacroIndex
|
||||
"companion", CompanionSpellId, CompanionType
|
||||
"equipmentset", Name
|
||||
"flyout", FlyoutId
|
||||
--]]
|
||||
function API.GetButtonActionInfo(ButtonName)
|
||||
return Util.GetButtonActionInfo(ButtonName);
|
||||
end
|
||||
|
||||
|
||||
--[[
|
||||
Returns the command currently on the button
|
||||
Similar to GetButtonActionInfo, except this is designed to return potentially more useful information relating to the action on the button
|
||||
|
||||
returns:
|
||||
"spell", SpellName, SpellSubName, SpellIndex, SpellBook
|
||||
"item", ItemId, ItemName
|
||||
"macro", MacroIndex
|
||||
"companion", CompanionType, CompanionIndex
|
||||
"equipmentset", Name
|
||||
"flyout", FlyoutId
|
||||
"bonusaction", BonusActionSlot
|
||||
"customaction", CustomActionName
|
||||
|
||||
NB: bonusactions are the buttons that trigger bonusbar5 actions, the BonusActionSlots start at 121 (which is where the default interface allocates them in terms of action slot)
|
||||
customactions are specific to Button Forge for extended Button Forge specific actions (such as opening and closing the button forge configuration
|
||||
--]]
|
||||
function API.GetButtonActionInfo2(ButtonName)
|
||||
return Util.GetButtonActionInfo2(ButtonName);
|
||||
end
|
|
@ -0,0 +1,147 @@
|
|||
--[[
|
||||
Author: Alternator (Massiner of Nathrezim)
|
||||
Copyright 2012
|
||||
|
||||
--]]
|
||||
|
||||
|
||||
local Button = BFButton;
|
||||
|
||||
|
||||
function Button.SecureOnReceiveDrag = [[
|
||||
if (kind) then
|
||||
--store the cursor from the button
|
||||
end
|
||||
|
||||
if (kind == "spell") then
|
||||
|
||||
elseif (kind == "item") then
|
||||
|
||||
elseif (kind == "macro") then
|
||||
|
||||
elseif (kind == "companion") then
|
||||
|
||||
elseif (kind == "equipmentset") then
|
||||
|
||||
elseif (kind == "bonusaction") then
|
||||
|
||||
elseif (kind == "flyout") then
|
||||
|
||||
elseif (kind == "customaction") then
|
||||
|
||||
elseif (kind == nil or kind == "") then
|
||||
|
||||
else
|
||||
|
||||
end
|
||||
|
||||
]];
|
||||
|
||||
function Button.SecureOnStateMode = [[
|
||||
self:SetAttribute("type", nil);
|
||||
self:SetAttribute("spell", nil);
|
||||
self:SetAttribute("item", nil);
|
||||
self:SetAttribute("macro", nil);
|
||||
self:SetAttribute("macrotext", nil);
|
||||
self:SetAttribute("action", nil);
|
||||
|
||||
--Type and Value are Member values in the secure space for the button
|
||||
if (Type == "spell" or Type == "item" or Type == "macro") then
|
||||
self:SetAttribute("type", Type);
|
||||
self:SetAttribute(Type, Value);
|
||||
|
||||
elseif (Type == "companion") then
|
||||
self:SetAttribute("type", "spell");
|
||||
self:SetAttribute("spell", Value);
|
||||
|
||||
elseif (Type == "equipmentset") then
|
||||
self:SetAttribute("type", "macro");
|
||||
self:SetAttribute("macrotext", "/equipset "..Value);
|
||||
elseif (Type == "bonusaction") then
|
||||
self:SetAttribute("type", "action");
|
||||
self:SetAttribute("action", Value + 120);
|
||||
elseif (Type == "flyout") then
|
||||
self:SetAttribute("type", "flyout");
|
||||
self:SetAttribute("spell", Value);
|
||||
|
||||
elseif (Type == "customaction") then
|
||||
if (Value == "configuremode") then
|
||||
self:SetAttribute("type", "macro");
|
||||
self:SetAttribute("macrotext", "/click BFToolbarToggle");
|
||||
elseif (Value == "createbarmode") then
|
||||
self:SetAttribute("type", "macro");
|
||||
self:SetAttribute("macrotext", "/click BFToolbarCreateBar");
|
||||
elseif (Value == "createbonusbarmode") then
|
||||
self:SetAttribute("type", "macro");
|
||||
self:SetAttribute("macrotext", "/click BFToolbarCreateBonusBar");
|
||||
elseif (Value == "destroybarmode") then
|
||||
self:SetAttribute("type", "macro");
|
||||
self:SetAttribute("macrotext", "/click BFToolbarDestroyBar");
|
||||
elseif (Value == "advancedtoolsmode") then
|
||||
self:SetAttribute("type", "macro");
|
||||
self:SetAttribute("macrotext", "/click BFToolbarAdvanced");
|
||||
elseif (Value == "rightclickselfcast") then
|
||||
self:SetAttribute("type", "macro");
|
||||
self:SetAttribute("macrotext", "/click BFToolbarRightClickSelfCast");
|
||||
elseif (Value == "vehicleexit") then
|
||||
self:SetAttribute("type", "macro");
|
||||
self:SetAttribute("macrotext", "/run VehicleExit()");
|
||||
elseif (Value == "possesscancel") then
|
||||
self:SetAttribute("type", "macro");
|
||||
self:SetAttribute("macrotext", "/run CancelUnitBuff(\"player\", select(2, GetPossessInfo(2)) or \"\")");
|
||||
end
|
||||
end
|
||||
]]
|
||||
|
||||
--[[ Set the buttons attributes (When I get some spare time this could be put in the secure env to allow changing the button during combat) --]]
|
||||
function Button:SetAttributes(Type, Value)
|
||||
--Firstly clear all relevant fields
|
||||
self.Widget:SetAttribute("type", nil);
|
||||
self.Widget:SetAttribute("spell", nil);
|
||||
self.Widget:SetAttribute("item", nil);
|
||||
self.Widget:SetAttribute("macro", nil);
|
||||
self.Widget:SetAttribute("macrotext", nil);
|
||||
self.Widget:SetAttribute("action", nil);
|
||||
|
||||
--Now if a valid type is passed in set it
|
||||
if (Type == "spell" or Type == "item" or Type == "macro") then
|
||||
self.Widget:SetAttribute("type", Type);
|
||||
self.Widget:SetAttribute(Type, Value);
|
||||
|
||||
elseif (Type == "companion") then
|
||||
self.Widget:SetAttribute("type", "spell");
|
||||
self.Widget:SetAttribute("spell", Value);
|
||||
|
||||
elseif (Type == "equipmentset") then
|
||||
self.Widget:SetAttribute("type", "macro");
|
||||
self.Widget:SetAttribute("macrotext", "/equipset "..Value);
|
||||
elseif (Type == "bonusaction") then
|
||||
self.Widget:SetAttribute("type", "action");
|
||||
self.Widget:SetAttribute("action", Value + 120);
|
||||
elseif (Type == "flyout") then
|
||||
self.Widget:SetAttribute("type", "flyout");
|
||||
self.Widget:SetAttribute("spell", Value);
|
||||
elseif (Type == "customaction") then
|
||||
CustomAction.SetAttributes(Value, self.Widget);
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
(self, button, kind, value, …)
|
||||
|
||||
local self = Widget.ParentButton;
|
||||
if (not InCombatLockdown()) then
|
||||
if (GetCursorInfo()) then
|
||||
Util.StoreCursor(self:GetCursor());
|
||||
if (self:SetCommandFromTriplet(GetCursorInfo())) then
|
||||
Util.SetCursor(Util.GetStoredCursor());
|
||||
end
|
||||
elseif (UILib.GetDragInfo()) then
|
||||
Util.StoreCursor(self:GetCursor());
|
||||
if (self:SetCommandFromTriplet(UILib.GetDragInfo())) then
|
||||
Util.SetCursor(Util.GetStoredCursor());
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,137 @@
|
|||
--[[
|
||||
Author: Alternator (Massiner of Nathrezim)
|
||||
Copyright 2010
|
||||
|
||||
Notes:
|
||||
|
||||
--]]
|
||||
|
||||
local Const = BFConst;
|
||||
Const.SUMMON_RANDOM_FAVORITE_MOUNT_SPELL = 150544;
|
||||
Const.SUMMON_RANDOM_FAVORITE_MOUNT_ID = 268435455;
|
||||
Const.Version = 0.9;
|
||||
Const.VersionMinor = 47;
|
||||
Const.MAX_ACCOUNT_MACROS = 120;
|
||||
Const.ButtonNaming = "ButtonForge"
|
||||
Const.ButtonSeq = 1; --This value will increment (so not technically a const...)
|
||||
Const.BarNaming = "ButtonForge"
|
||||
Const.BarSeq = 1;
|
||||
Const.DefaultCols = 4;
|
||||
Const.DefaultRows = 1;
|
||||
Const.BarInset = 21; --I
|
||||
Const.BarEdge = 3.5;
|
||||
Const.ButtonGap = 6; --BG --Don't mess with the ButtonSize/Gap
|
||||
Const.ButtonSize = 36; --BS
|
||||
Const.MinScale = 0.2;
|
||||
Const.MiniIconSize = 16;
|
||||
Const.MiniIconGap = 2;
|
||||
Const.DoubleClickSpeed = 0.3;
|
||||
Const.MaxButtonsPerBar = 1500;
|
||||
Const.MaxButtonsTotal = 5000;
|
||||
Const.CreateBarOverlayColor = {0.02, 0.03, 0.8, 0.4};
|
||||
Const.DestroyBarOverlayColor = {1, 0.03, 0.8, 0.4};
|
||||
Const.KeyBindOverlayColor = {0.3, 0.7, 0.1, 0.4};
|
||||
Const.BarBackdrop = {0.1, 0.1, 0.4, 0.85};
|
||||
Const.BonusBarBackdrop = {0.1, 0.5, 0.1, 0.85};
|
||||
Const.IconDragOverlayColor = {0.0, 0.1, 0.3, 0.0};
|
||||
Const.ImagesDir = "Interface\\Addons\\ButtonForge\\Images\\";
|
||||
Const.SlashNumLines = 4; --Num of lines to show before breaking the message up
|
||||
|
||||
Const.DisableAutoAlignAgainstDefaultBars = false; --Set to true and reload UI in order to not check the Blizzard bars when performing auto-alignment, this probably isn't needed but just in case
|
||||
|
||||
|
||||
Const.VLineThickness = 1;
|
||||
Const.HLineThickness = 1;
|
||||
--Or if you want pixel perfect alignment lines and feel adventurous put your screen resolution in below (Note: WoW is not designed to give pixel level control, so it may not work perfectly)
|
||||
--E.g. 1920x1200 would be:
|
||||
--Const.VLineThickness = (768.0 / 1920) * GetMonitorAspectRatio();
|
||||
--Const.HLineThickness = (768.0 / 1200);
|
||||
|
||||
|
||||
Const.ThresholdVSnapSq = 6 * 6;
|
||||
Const.ThresholdVPressureSq = 12 * 12;
|
||||
Const.ThresholdHSnapSq = 10 * 10;
|
||||
Const.ThresholdHPressureSq = 20 * 20;
|
||||
|
||||
|
||||
Const.WispSpellIds = {};
|
||||
Const.WispSpellIds[19746] = 1; --Concentration Aura
|
||||
Const.WispSpellIds[32223] = 1; --Crusader Aura
|
||||
Const.WispSpellIds[465] = 1; --Devotion Aura
|
||||
Const.WispSpellIds[19891] = 1; --Resistance Aura
|
||||
Const.WispSpellIds[7294] = 1; --Retribution Aura
|
||||
Const.WispSpellIds[5118] = 1; --Aspect of the Cheetah
|
||||
Const.WispSpellIds[82661] = 1; --Aspect of the Fox
|
||||
Const.WispSpellIds[13165] = 1; --Aspect of the Hawk
|
||||
Const.WispSpellIds[13159] = 1; --Aspect of the Pack
|
||||
Const.WispSpellIds[20043] = 1; --Aspect of the Wild
|
||||
Const.WispSpellIds[45438] = 1; --Ice Block
|
||||
Const.WispSpellIds[1066] = 1; --Aquatic Form
|
||||
Const.WispSpellIds[5487] = 1; --Bear Form
|
||||
Const.WispSpellIds[768] = 1; --Cat Form
|
||||
Const.WispSpellIds[33943] = 1; --Flight Form
|
||||
Const.WispSpellIds[40120] = 1; --Swift Flight Form
|
||||
Const.WispSpellIds[783] = 1 --Travel Form
|
||||
|
||||
|
||||
|
||||
--[[ These next Consts are calculated from the previous consts ]]
|
||||
Const.I = Const.BarInset;
|
||||
Const.I2 = Const.I * 2;
|
||||
Const.BG = Const.ButtonGap;
|
||||
Const.BS = Const.ButtonSize;
|
||||
Const.BSize = Const.BS + Const.BG;
|
||||
Const.GFrac = Const.BG / Const.BSize;
|
||||
|
||||
|
||||
Const.LightBlue = "ff0099DD";
|
||||
Const.DarkBlue = "ff2233DD";
|
||||
Const.DarkOrange = "ffEE5500";
|
||||
|
||||
Const.SlashCommands = {};
|
||||
Const.SlashCommands["-bar"] = {params = "^%s*(..-)%s*$", group = "bar"};
|
||||
Const.SlashCommands["-macrotext"] = {params = "bool", group = "bar"};
|
||||
Const.SlashCommands["-keybindtext"] = {params = "bool", group = "bar"};
|
||||
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["-gap"] = {params = "^%s*(%d*%.?%d+)%s*$", group = "bar"};
|
||||
Const.SlashCommands["-enabled"] = {params = "bool", group = "bar"};
|
||||
Const.SlashCommands["-info"] = {params = "^()$", group = "bar", requires = {"-bar"}};
|
||||
Const.SlashCommands["-technicalinfo"] = {params = "^()$", group = "bar", requires = {"-bar"}};
|
||||
Const.SlashCommands["-rename"] = {params = "^%s*(..-)%s*$", group = "bar", requires = {"-bar"}};
|
||||
Const.SlashCommands["-hidespec1"] = {params = "bool", group = "bar"};
|
||||
Const.SlashCommands["-hidespec2"] = {params = "bool", group = "bar"};
|
||||
Const.SlashCommands["-hidespec3"] = {params = "bool", group = "bar"};
|
||||
Const.SlashCommands["-hidespec4"] = {params = "bool", group = "bar"};
|
||||
Const.SlashCommands["-hidevehicle"] = {params = "bool", group = "bar"};
|
||||
Const.SlashCommands["-hideoverridebar"] = {params = "bool", group = "bar"};
|
||||
Const.SlashCommands["-hidepetbattle"] = {params = "bool", group = "bar"};
|
||||
Const.SlashCommands["-vismacro"] = {params = "^%s*(.-)%s*$", group = "bar"}; -- I'm tempted to make this one require a bar, but to some degree it is player beware until/if I implement an undo stack
|
||||
Const.SlashCommands["-gui"] = {params = "bool", group = "bar"};
|
||||
Const.SlashCommands["-alpha"] = {params = "^%s*(%d*%.?%d+)%s*$", group = "bar", validate = function (p) return tonumber(p) <= 1; end};
|
||||
|
||||
Const.SlashCommands["-createbar"] = {params = "^%s*(..-)%s*$", group = "bar", incompat = {"-bar"}};
|
||||
Const.SlashCommands["-destroybar"] = {params = "^%s*(..-)%s*$", group = "bar", incompat = {"ALL"}};
|
||||
|
||||
Const.SlashCommands["-saveprofile"] = {params = "^%s*(..-)%s*$", group = "profile", incompat = {"ALL"}};
|
||||
Const.SlashCommands["-loadprofile"] = {params = "^%s*(..-)%s*$", group = "profile", incompat = {"ALL"}};
|
||||
Const.SlashCommands["-loadprofiletemplate"] = {params = "^%s*(..-)%s*$", group = "profile", incompat = {"ALL"}};
|
||||
Const.SlashCommands["-undoprofile"] = {params = "^()$", group = "profile", incompat = {"ALL"}};
|
||||
Const.SlashCommands["-listprofiles"] = {params = "^()$", group = "profile", incompat = {"ALL"}};
|
||||
Const.SlashCommands["-deleteprofile"] = {params = "^%s*(..-)%s*$", group = "profile", incompat = {"ALL"}};
|
||||
|
||||
Const.SlashCommands["-macrocheckdelay"] = {params = "^%s*(%d+)%s*$", group = "globalsettings"};
|
||||
Const.SlashCommands["-removemissingmacros"] = {params = "bool", group = "globalsettings"};
|
||||
Const.SlashCommands["-forceoffcastonkeydown"] = {params = "bool", group = "globalsettings"};
|
||||
Const.SlashCommands["-usecollectionsfavoritemountbutton"] = {params = "bool", group = "globalsettings"};
|
||||
|
||||
|
||||
|
||||
Const.SlashCommands["-globalsettings"] = {params = "^()$", group = "globalsettings"};
|
||||
|
||||
|
|
@ -0,0 +1,77 @@
|
|||
--[[
|
||||
Author: Alternator (Massiner of Nathrezim)
|
||||
|
||||
Copyright: 2012
|
||||
|
||||
]]
|
||||
|
||||
--local AddonName, AddonTable = ...;
|
||||
local CursorUtil = BFCursorUtil;
|
||||
|
||||
local UILib = BFUILib;
|
||||
local Util = BFUtil;
|
||||
local PetActionIndex;
|
||||
|
||||
function CursorUtil.GetCursorInfo()
|
||||
local Command, Data, Subvalue, Subsubvalue = GetCursorInfo();
|
||||
if (Command) then
|
||||
if (Command == "petaction") then
|
||||
Data = PetActionIndex;
|
||||
local Type, Id = GetSpellBookItemInfo(Data, BOOKTYPE_PET);
|
||||
if (Type == "PETACTION") then
|
||||
Command = "petcommand";
|
||||
else
|
||||
Command = "petability";
|
||||
end
|
||||
end
|
||||
return Command, Data, Subvalue, Subsubvalue;
|
||||
end
|
||||
return UILib.GetDragInfo();
|
||||
end
|
||||
|
||||
local CompatibleActions = {
|
||||
["spell"] = true
|
||||
, ["item"] = true
|
||||
, ["macro"] = true
|
||||
, ["flyout"] = true
|
||||
, ["petaction"] = true
|
||||
, ["companion"] = true
|
||||
, ["battlepet"] = true
|
||||
, ["equipmentset"] = true};
|
||||
function CursorUtil.CursorHasAction()
|
||||
return CompatibleActions[GetCursorInfo()] or CustomCommand ~= nil;
|
||||
end
|
||||
|
||||
local StoredCursor = {};
|
||||
function CursorUtil.StoreCursor(...)
|
||||
StoredCursor = {...};
|
||||
end
|
||||
|
||||
function CursorUtil.GetStoredCursor()
|
||||
return unpack(StoredCursor);
|
||||
end
|
||||
|
||||
|
||||
local function CapturePickupSpellBookItem(Index, BookType)
|
||||
PetActionIndex = Index;
|
||||
end
|
||||
|
||||
local function CapturePickupPetAction(Slot)
|
||||
PetActionIndex = Util.FindPetActionIndexByTexture(Util.GetTrackedPetSlotAction(Slot, true));
|
||||
print(Slot, PetActionIndex);
|
||||
end
|
||||
|
||||
local function CaptureCastPetAction(Slot)
|
||||
PetActionIndex = Util.FindPetActionIndexByTexture(Util.GetTrackedPetSlotAction(Slot, false));
|
||||
end
|
||||
|
||||
local function CapturePickupPetSpell(Id)
|
||||
PetActionIndex = Util.FindPetActionIndexById(Id);
|
||||
end
|
||||
|
||||
hooksecurefunc("PickupSpellBookItem", CapturePickupSpellBookItem);
|
||||
hooksecurefunc("PickupPetAction", CapturePickupPetAction);
|
||||
hooksecurefunc("PickupPetSpell", CapturePickupPetSpell);
|
||||
hooksecurefunc("CastPetAction", CaptureCastPetAction);
|
||||
|
||||
|
|
@ -0,0 +1,189 @@
|
|||
--[[
|
||||
Author: Alternator (Massiner of Nathrezim)
|
||||
Copyright 2010
|
||||
|
||||
Notes:
|
||||
|
||||
--]]
|
||||
|
||||
local CustomAction = BFCustomAction;
|
||||
local Const = BFConst;
|
||||
local Util = BFUtil;
|
||||
local UILib = BFUILib;
|
||||
|
||||
--If too many more custom actions are added here this will be a good candidate the turn into a table
|
||||
function CustomAction.GetTexture(Action)
|
||||
if (Action == "configuremode") then
|
||||
return Const.ImagesDir.."Configure.tga";
|
||||
elseif (Action == "createbarmode") then
|
||||
return Const.ImagesDir.."CreateBar.tga";
|
||||
elseif (Action == "createbonusbarmode") then
|
||||
return Const.ImagesDir.."CreateBonusBar.tga";
|
||||
elseif (Action == "destroybarmode") then
|
||||
return Const.ImagesDir.."DestroyBar.tga";
|
||||
elseif (Action == "advancedtoolsmode") then
|
||||
return Const.ImagesDir.."AdvancedTools.tga";
|
||||
elseif (Action == "rightclickselfcast") then
|
||||
return Const.ImagesDir.."RightClickSelfCast.tga";
|
||||
elseif (Action == "vehicleexit") then
|
||||
return "Interface/Vehicles/UI-Vehicles-Button-Exit-Up", {0.171875, 0.84375, 0.140625, 0.84375};
|
||||
elseif (Action == "possesscancel") then
|
||||
local Texture = GetPossessInfo(2);
|
||||
return Texture or "Interface/Icons/Spell_Shadow_SacrificialShield";
|
||||
--[[
|
||||
elseif (Action == "vehicleaimup") then
|
||||
return "Interface/Vehicles/UI-Vehicles-Button-Pitch-Up", {0.234375, 0.765625, 0.25, 0.78125};
|
||||
elseif (Action == "vehicleaimdown") then
|
||||
return "Interface/Vehicles/UI-VEHICLES-BUTTON-PITCHDOWN-UP", {0.234375, 0.765625, 0.25, 0.78125};
|
||||
elseif (Action == "possessspell") then
|
||||
local Texture = GetPossessInfo(1);
|
||||
return Texture or Const.ImagesDir.."AdvancedTools.tga";
|
||||
--]]
|
||||
end
|
||||
end
|
||||
|
||||
function CustomAction.SetAttributes(Action, Widget)
|
||||
if (Action == "configuremode") then
|
||||
Widget:SetAttribute("type", "macro");
|
||||
Widget:SetAttribute("macrotext", "/click BFToolbarToggle");
|
||||
elseif (Action == "createbarmode") then
|
||||
Widget:SetAttribute("type", "macro");
|
||||
Widget:SetAttribute("macrotext", "/click BFToolbarCreateBar");
|
||||
elseif (Action == "createbonusbarmode") then
|
||||
Widget:SetAttribute("type", "macro");
|
||||
Widget:SetAttribute("macrotext", "/click BFToolbarCreateBonusBar");
|
||||
elseif (Action == "destroybarmode") then
|
||||
Widget:SetAttribute("type", "macro");
|
||||
Widget:SetAttribute("macrotext", "/click BFToolbarDestroyBar");
|
||||
elseif (Action == "advancedtoolsmode") then
|
||||
Widget:SetAttribute("type", "macro");
|
||||
Widget:SetAttribute("macrotext", "/click BFToolbarAdvanced");
|
||||
elseif (Action == "rightclickselfcast") then
|
||||
Widget:SetAttribute("type", "macro");
|
||||
Widget:SetAttribute("macrotext", "/click BFToolbarRightClickSelfCast");
|
||||
elseif (Action == "vehicleexit") then
|
||||
Widget:SetAttribute("type", "macro");
|
||||
Widget:SetAttribute("macrotext", "/leavevehicle");
|
||||
elseif (Action == "possesscancel") then
|
||||
Widget:SetAttribute("type", "macro");
|
||||
Widget:SetAttribute("macrotext", "/run CancelUnitBuff(\"player\", select(2, GetPossessInfo(2)) or \"\")");
|
||||
--[[
|
||||
elseif (Action == "vehicleaimup") then
|
||||
Widget:SetAttribute("type", "macro");
|
||||
Widget:SetAttribute("macrotext", "/click VehicleMenuBarPitchUpButton");
|
||||
elseif (Action == "vehicleaimdown") then
|
||||
Widget:SetAttribute("type", "macro");
|
||||
Widget:SetAttribute("macrotext", "/click VehicleMenuBarPitchDownButton");
|
||||
elseif (Action == "possessspell") then
|
||||
Widget:SetAttribute("type", "macro");
|
||||
Widget:SetAttribute("macrotext", "/do nothing");
|
||||
--]]
|
||||
end
|
||||
end
|
||||
|
||||
function CustomAction.GetChecked(Action)
|
||||
if (Action == 'configuremode') then
|
||||
if (BFConfigureLayer:IsShown()) then
|
||||
return true;
|
||||
end
|
||||
elseif (Action == 'createbarmode') then
|
||||
if (UILib.CreateBarMode) then
|
||||
return true;
|
||||
end
|
||||
elseif (Action == 'createbonusbarmode') then
|
||||
if (UILib.CreateBonusBarMode) then
|
||||
return true;
|
||||
end
|
||||
elseif (Action == 'destroybarmode') then
|
||||
if (BFDestroyBarOverlay:IsShown()) then
|
||||
return true;
|
||||
end
|
||||
elseif (Action == 'advancedtoolsmode') then
|
||||
if (BFAdvancedToolsLayer:IsShown() and BFConfigureLayer:IsShown()) then
|
||||
return true;
|
||||
end
|
||||
elseif (Action == "rightclickselfcast") then
|
||||
if (ButtonForgeSave["RightClickSelfCast"]) then
|
||||
return true;
|
||||
end
|
||||
end
|
||||
return false;
|
||||
end
|
||||
|
||||
function CustomAction.IsUsable(Action)
|
||||
-- I could wire in a combat check for several of the actions here...
|
||||
if (Action == 'createbonusbarmode') then
|
||||
return BFConfigureLayer:IsShown(), nil;
|
||||
elseif (Action == 'vehicleexit') then
|
||||
return CanExitVehicle(), nil;
|
||||
elseif (Action == 'possesscancel') then
|
||||
--perhaps try the third param in getpossessinfo(2)??
|
||||
return IsPossessBarVisible(), nil;
|
||||
--[[
|
||||
elseif (Action == 'vehicleaimup') then
|
||||
return IsVehicleAimAngleAdjustable(), nil;
|
||||
elseif (Action == 'vehicleaimdown') then
|
||||
return IsVehicleAimAngleAdjustable(), nil;
|
||||
elseif (Action == 'possessspell') then
|
||||
return IsPossessBarVisible(), nil;
|
||||
--]]
|
||||
end
|
||||
return 1, nil;
|
||||
end
|
||||
|
||||
function CustomAction.UpdateTooltip(Action)
|
||||
if (Action == 'configuremode') then
|
||||
GameTooltip:SetText(Util.GetLocaleString("ConfigureModeTooltip"), nil, nil, nil, nil, 1);
|
||||
elseif (Action == 'createbarmode') then
|
||||
GameTooltip:SetText(Util.GetLocaleString("CreateBarTooltip"), nil, nil, nil, nil, 1);
|
||||
elseif (Action == 'createbonusbarmode') then
|
||||
GameTooltip:SetText(Util.GetLocaleString("CreateBonusBarTooltip"), nil, nil, nil, nil, 1);
|
||||
elseif (Action == 'destroybarmode') then
|
||||
GameTooltip:SetText(Util.GetLocaleString("DestroyBarTooltip"), nil, nil, nil, nil, 1);
|
||||
elseif (Action == 'advancedtoolsmode') then
|
||||
GameTooltip:SetText(Util.GetLocaleString("AdvancedToolsTooltip"), nil, nil, nil, nil, 1);
|
||||
elseif (Action == "rightclickselfcast") then
|
||||
GameTooltip:SetText(BFToolbarRightClickSelfCast.Tooltip, nil, nil, nil, nil, 1);
|
||||
elseif (Action == 'vehicleexit') then
|
||||
GameTooltip:SetText(LEAVE_VEHICLE, nil, nil, nil, nil, 1); --This prob needs a better tooltip (although is not as bad as the possesscancel)
|
||||
elseif (Action == 'possesscancel') then
|
||||
GameTooltip:SetText(Util.GetLocaleString("CancelPossessionTooltip")); --This needs a better tooltip than the default one (the default one has the advantage of context)
|
||||
--[[
|
||||
elseif (Action == 'vehicleaimup') then
|
||||
GameTooltip:SetText(AIM_UP, nil, nil, nil, nil, 1);
|
||||
elseif (Action == 'vehicleaimdown') then
|
||||
GameTooltip:SetText(AIM_DOWN, nil, nil, nil, nil, 1);
|
||||
elseif (Action == 'possessspell') then
|
||||
GameTooltip:SetPossession(1);
|
||||
--]]
|
||||
end
|
||||
end
|
||||
|
||||
function CustomAction.SetCursor(Action)
|
||||
if (Action == 'configuremode') then
|
||||
UILib.StartDraggingIcon(Const.ImagesDir.."Configure.tga", 23, 23, "customaction", Action);
|
||||
elseif (Action == 'createbarmode') then
|
||||
UILib.StartDraggingIcon(Const.ImagesDir.."CreateBar.tga", 23, 23, "customaction", Action);
|
||||
elseif (Action == 'createbonusbarmode') then
|
||||
UILib.StartDraggingIcon(Const.ImagesDir.."CreateBonusBar.tga", 23, 23, "customaction", Action);
|
||||
elseif (Action == 'destroybarmode') then
|
||||
UILib.StartDraggingIcon(Const.ImagesDir.."DestroyBar.tga", 23, 23, "customaction", Action);
|
||||
elseif (Action == 'advancedtoolsmode') then
|
||||
UILib.StartDraggingIcon(Const.ImagesDir.."AdvancedTools.tga", 23, 23, "customaction", Action);
|
||||
elseif (Action == "rightclickselfcast") then
|
||||
UILib.StartDraggingIcon(Const.ImagesDir.."RightClickSelfCast.tga", 23, 23, "customaction", Action);
|
||||
elseif (Action == 'vehicleexit') then
|
||||
UILib.StartDraggingIcon("Interface/Vehicles/UI-Vehicles-Button-Exit-Up", 23, 23, "customaction", Action, nil, {0.171875, 0.84375, 0.140625, 0.84375});
|
||||
elseif (Action == 'possesscancel') then
|
||||
UILib.StartDraggingIcon("Interface/Icons/Spell_Shadow_SacrificialShield", 23, 23, "customaction", Action);
|
||||
--[[
|
||||
elseif (Action == 'vehicleaimup') then
|
||||
UILib.StartDraggingIcon("Interface/Vehicles/UI-Vehicles-Button-Pitch-Up", 23, 23, "customaction", Action, nil, {0.234375, 0.765625, 0.25, 0.78125});
|
||||
elseif (Action == 'vehicleaimdown') then
|
||||
UILib.StartDraggingIcon("Interface/Vehicles/UI-VEHICLES-BUTTON-PITCHDOWN-UP", 23, 23, "customaction", Action, nil, {0.234375, 0.765625, 0.25, 0.78125});
|
||||
elseif (Action == 'possessspell') then
|
||||
UILib.StartDraggingIcon("Interface/Vehicles/UI-VEHICLES-BUTTON-PITCHDOWN-UP", 23, 23, "customaction", Action, nil, {0.234375, 0.765625, 0.25, 0.78125});
|
||||
--]]
|
||||
end
|
||||
end
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
--[[
|
||||
Author: Alternator (Massiner of Nathrezim)
|
||||
Copyright 2010
|
||||
|
||||
Notes:
|
||||
|
||||
|
||||
]]
|
||||
|
||||
BFLocales = {};
|
||||
BFConst = {};
|
||||
BFUtil = {};
|
||||
BFUILib = {};
|
||||
BFButton = {};
|
||||
BFBar = {};
|
||||
BFCustomAction = {};
|
||||
ButtonForge_API1 = {};
|
|
@ -0,0 +1,612 @@
|
|||
--[[
|
||||
Author: Alternator (Massiner of Nathrezim)
|
||||
Copyright 2010
|
||||
|
||||
Notes:
|
||||
|
||||
|
||||
]]
|
||||
|
||||
local Const = BFConst;
|
||||
local UILib = BFUILib;
|
||||
|
||||
BFEventFrames = {};
|
||||
|
||||
BFEventFrames["Full"] = CreateFrame("FRAME"); --This frame is also responsible for the OnUpdate event to trigger most button refreshing
|
||||
BFEventFrames["Checked"] = CreateFrame("FRAME");
|
||||
BFEventFrames["Equipped"] = CreateFrame("FRAME");
|
||||
BFEventFrames["Usable"] = CreateFrame("FRAME");
|
||||
BFEventFrames["Cooldown"] = CreateFrame("FRAME");
|
||||
BFEventFrames["Text"] = CreateFrame("FRAME"); --Counts of spells/items
|
||||
BFEventFrames["Glow"] = CreateFrame("FRAME");
|
||||
BFEventFrames["Range"] = CreateFrame("FRAME"); --Update the Range Timer (includes the timer and checking if spells need to check their targets)
|
||||
BFEventFrames["Flash"] = CreateFrame("FRAME"); --Update the flashing of auto attacks
|
||||
BFEventFrames["Conditional"] = CreateFrame("FRAME"); --Conditionals are to keep macros updated
|
||||
BFEventFrames["Misc"] = CreateFrame("FRAME"); --Misc (and less frequent) events to do with keeping data synchronised
|
||||
BFEventFrames["Delay"] = CreateFrame("FRAME"); --used for delay event (currently just for the macro check)
|
||||
|
||||
local Full = BFEventFrames["Full"];
|
||||
local Checked = BFEventFrames["Checked"];
|
||||
local Equipped = BFEventFrames["Equipped"];
|
||||
local Usable = BFEventFrames["Usable"];
|
||||
local Cooldown = BFEventFrames["Cooldown"];
|
||||
local Text = BFEventFrames["Text"];
|
||||
local Glow = BFEventFrames["Glow"];
|
||||
local Range = BFEventFrames["Range"];
|
||||
local Flash = BFEventFrames["Flash"];
|
||||
local Conditional = BFEventFrames["Conditional"];
|
||||
local Misc = BFEventFrames["Misc"];
|
||||
local Delay = BFEventFrames["Delay"];
|
||||
local Util = BFUtil;
|
||||
|
||||
Full.Util = BFUtil; --Since this frame can get a runtime generated OnUpdate it needs a member reference to the Util lib
|
||||
Full:SetFrameStrata("LOW"); --So we OnUpdate at the right time
|
||||
Full.RefreshButtons = false;
|
||||
Full.RefFull = false;
|
||||
Full.RefChecked = false;
|
||||
Full.RefEquipped = false;
|
||||
Full.RefUsable = false;
|
||||
Full.RefCooldown = false;
|
||||
Full.RefText = false;
|
||||
Full.RefFlyouts = false;
|
||||
Full.RefGlow = false;
|
||||
Full.RefConditional = false;
|
||||
|
||||
Range:SetFrameStrata("MEDIUM");
|
||||
Flash:SetFrameStrata("MEDIUM");
|
||||
|
||||
Misc:SetFrameStrata("BACKGROUND");
|
||||
Misc.PromoteSpells = false;
|
||||
Misc.TalentSwap = false;
|
||||
Misc.RefreshSpells = false;
|
||||
|
||||
|
||||
--[[------------------------------------------------------------------------
|
||||
Secure Hooks
|
||||
--------------------------------------------------------------------------]]
|
||||
function Misc.SetCVarCalled(cvar, ...)
|
||||
if (cvar == "ActionButtonUseKeyDown") then
|
||||
Util.UpdateButtonClickHandling();
|
||||
end
|
||||
end
|
||||
--This secure hook is only applied if during the Util.Load function it is determined to be needed
|
||||
--hooksecurefunc("SetCVar", SetCVarCalled);
|
||||
|
||||
|
||||
|
||||
--[[------------------------------------------------------------------------
|
||||
Misc Resync type events
|
||||
--------------------------------------------------------------------------]]
|
||||
Misc:RegisterEvent("COMPANION_LEARNED"); --resync companions
|
||||
Misc:RegisterEvent("PET_JOURNAL_LIST_UPDATE"); --textures etc should now be available
|
||||
Misc:RegisterEvent("LEARNED_SPELL_IN_TAB"); --refresh/promote spells
|
||||
Misc:RegisterEvent("SPELLS_CHANGED"); --refresh spells depending on play style this could trigger often, we will instead rely on other events to keep spells synched
|
||||
Misc:RegisterEvent("CHARACTER_POINTS_CHANGED"); --refresh spells
|
||||
Misc:RegisterEvent("UPDATE_MACROS"); --resync macros
|
||||
Misc:RegisterEvent("ACTIVE_TALENT_GROUP_CHANGED"); --refresh spells (and prevent spell promotion)
|
||||
Misc:RegisterEvent("EQUIPMENT_SETS_CHANGED"); --resync equip sets
|
||||
Misc:RegisterEvent("PLAYER_REGEN_DISABLED"); --enter combat
|
||||
Misc:RegisterEvent("PLAYER_REGEN_ENABLED"); --out of combat
|
||||
Misc:RegisterEvent("CURSOR_UPDATE"); --possibly show button grids
|
||||
Misc:RegisterEvent("ACTIONBAR_SHOWGRID"); --...
|
||||
Misc:RegisterEvent("ACTIONBAR_HIDEGRID"); --...
|
||||
Misc:RegisterEvent("BAG_UPDATE"); --Refresh the bag item index cache
|
||||
Misc:RegisterEvent("UNIT_INVENTORY_CHANGED"); --Refresh the inv (equipped) item index cache
|
||||
Misc:RegisterEvent("SPELL_FLYOUT_UPDATE"); --Refresh the spell_flyouts (mainly due to default blizz code that forces my custom flyout border off)
|
||||
Misc:RegisterEvent("UI_SCALE_CHANGED");
|
||||
Misc:RegisterEvent("MODIFIER_STATE_CHANGED");
|
||||
|
||||
|
||||
|
||||
|
||||
--[[------------------------------------------------------------------------
|
||||
Checked Events
|
||||
--------------------------------------------------------------------------]]
|
||||
Checked:RegisterEvent("TRADE_SKILL_SHOW");
|
||||
Checked:RegisterEvent("TRADE_SKILL_CLOSE");
|
||||
Checked:RegisterEvent("ARCHAEOLOGY_TOGGLE");
|
||||
Checked:RegisterEvent("ARCHAEOLOGY_CLOSED");
|
||||
Checked:RegisterEvent("COMPANION_UPDATE");
|
||||
Checked:RegisterEvent("PET_BATTLE_PET_CHANGED");
|
||||
Checked:RegisterEvent("CURRENT_SPELL_CAST_CHANGED");
|
||||
Checked:RegisterEvent("ACTIONBAR_UPDATE_STATE"); --I am not certain how excessive this event is yet, it may not be needed and is a canidate to remove
|
||||
Checked:RegisterEvent("PLAYER_ENTER_COMBAT");
|
||||
Checked:RegisterEvent("PLAYER_LEAVE_COMBAT");
|
||||
Checked:RegisterEvent("START_AUTOREPEAT_SPELL");
|
||||
Checked:RegisterEvent("STOP_AUTOREPEAT_SPELL");
|
||||
Checked:RegisterEvent("UPDATE_OVERRIDE_ACTIONBAR");
|
||||
Checked:RegisterEvent("UPDATE_VEHICLE_ACTIONBAR");
|
||||
Checked:RegisterEvent("ACTIONBAR_PAGE_CHANGED");
|
||||
|
||||
--[[------------------------------------------------------------------------
|
||||
Equipped Events
|
||||
--------------------------------------------------------------------------]]
|
||||
Equipped:RegisterEvent("PLAYER_EQUIPMENT_CHANGED");
|
||||
|
||||
|
||||
--[[------------------------------------------------------------------------
|
||||
Usable Events
|
||||
--------------------------------------------------------------------------]]
|
||||
Usable:RegisterEvent("SPELL_UPDATE_USABLE");
|
||||
Usable:RegisterEvent("PLAYER_CONTROL_LOST");
|
||||
Usable:RegisterEvent("PLAYER_CONTROL_GAINED");
|
||||
Usable:RegisterEvent("BAG_UPDATE");
|
||||
Usable:RegisterEvent("MINIMAP_UPDATE_ZOOM");
|
||||
Usable:RegisterEvent("UPDATE_OVERRIDE_ACTIONBAR");
|
||||
Usable:RegisterEvent("UPDATE_VEHICLE_ACTIONBAR");
|
||||
Usable:RegisterEvent("ACTIONBAR_UPDATE_USABLE"); --Use this as a backup...
|
||||
Usable:RegisterEvent("VEHICLE_UPDATE");
|
||||
Usable:RegisterEvent("ACTIONBAR_PAGE_CHANGED");
|
||||
Usable:RegisterEvent("UPDATE_WORLD_STATES");
|
||||
|
||||
|
||||
--[[------------------------------------------------------------------------
|
||||
Cooldown Events
|
||||
--------------------------------------------------------------------------]]
|
||||
Cooldown:RegisterEvent("SPELL_UPDATE_COOLDOWN");
|
||||
Cooldown:RegisterEvent("BAG_UPDATE_COOLDOWN");
|
||||
Cooldown:RegisterEvent("ACTIONBAR_UPDATE_COOLDOWN");
|
||||
Cooldown:RegisterEvent("UPDATE_SHAPESHIFT_COOLDOWN");
|
||||
--Cooldown:RegisterEvent("SPELL_UPDATE_CHARGES");
|
||||
|
||||
|
||||
--[[------------------------------------------------------------------------
|
||||
Text Events
|
||||
--------------------------------------------------------------------------]]
|
||||
Text:RegisterEvent("BAG_UPDATE");
|
||||
Text:RegisterEvent("SPELL_UPDATE_CHARGES");
|
||||
Text:RegisterEvent("UNIT_AURA");
|
||||
|
||||
|
||||
--[[------------------------------------------------------------------------
|
||||
Glow Events
|
||||
--------------------------------------------------------------------------]]
|
||||
Glow:RegisterEvent("SPELL_ACTIVATION_OVERLAY_GLOW_SHOW");
|
||||
Glow:RegisterEvent("SPELL_ACTIVATION_OVERLAY_GLOW_HIDE");
|
||||
|
||||
|
||||
--[[------------------------------------------------------------------------
|
||||
Range Events
|
||||
--------------------------------------------------------------------------]]
|
||||
Range:RegisterEvent("PLAYER_TARGET_CHANGED");
|
||||
Range:RegisterEvent("UNIT_FACTION");
|
||||
|
||||
|
||||
--[[------------------------------------------------------------------------
|
||||
Flash Events
|
||||
--------------------------------------------------------------------------]]
|
||||
Flash:RegisterEvent("PLAYER_ENTER_COMBAT");
|
||||
Flash:RegisterEvent("PLAYER_LEAVE_COMBAT");
|
||||
Flash:RegisterEvent("START_AUTOREPEAT_SPELL");
|
||||
Flash:RegisterEvent("STOP_AUTOREPEAT_SPELL");
|
||||
|
||||
|
||||
--[[------------------------------------------------------------------------
|
||||
Conditional Events (for macros)
|
||||
--------------------------------------------------------------------------]]
|
||||
Conditional:RegisterEvent("MODIFIER_STATE_CHANGED"); --mod:
|
||||
Conditional:RegisterEvent("PLAYER_TARGET_CHANGED"); --harm, help, etc
|
||||
Conditional:RegisterEvent("PLAYER_FOCUS_CHANGED"); --harm, help, etc
|
||||
Conditional:RegisterEvent("ACTIONBAR_PAGE_CHANGED"); --actionbar
|
||||
Conditional:RegisterEvent("UPDATE_OVERRIDE_ACTIONBAR");
|
||||
Conditional:RegisterEvent("UPDATE_VEHICLE_ACTIONBAR");
|
||||
Conditional:RegisterEvent("PLAYER_REGEN_ENABLED"); --nocombat
|
||||
Conditional:RegisterEvent("PLAYER_REGEN_DISABLED"); --combat
|
||||
Conditional:RegisterEvent("UNIT_SPELLCAST_CHANNEL_START"); --channel:
|
||||
Conditional:RegisterEvent("UNIT_SPELLCAST_CHANNEL_STOP"); --channel:
|
||||
Conditional:RegisterEvent("PLAYER_EQUIPMENT_CHANGED"); --equipped:
|
||||
Conditional:RegisterEvent("ACTIVE_TALENT_GROUP_CHANGED"); --spec:
|
||||
Conditional:RegisterEvent("UPDATE_SHAPESHIFT_COOLDOWN"); --stance/form:
|
||||
Conditional:RegisterEvent("UPDATE_SHAPESHIFT_FORM"); --stance/form:
|
||||
Conditional:RegisterEvent("UPDATE_STEALTH"); --stealth
|
||||
Conditional:RegisterEvent("UNIT_ENTERED_VEHICLE"); --vehicleui
|
||||
Conditional:RegisterEvent("UNIT_EXITED_VEHICLE"); --vehicleui
|
||||
Conditional:RegisterEvent("MINIMAP_UPDATE_ZOOM"); --indoors/outdoors
|
||||
Conditional:RegisterEvent("ACTIONBAR_SLOT_CHANGED"); --This event is excessive, the system is designed not to need it; although at times it may provide slightly (very slightly) faster macro refreshes
|
||||
|
||||
--these following conditionals and targets are via the dynamic OnUpdate or are not yet handled
|
||||
--flyable
|
||||
--flying
|
||||
--mounted
|
||||
--pet
|
||||
--swimming
|
||||
--group??part/raid
|
||||
--mouseover (help,harm etc)
|
||||
|
||||
--[[-------------------------------------------------------------------------
|
||||
Full Events (includes init events)
|
||||
---------------------------------------------------------------------------]]
|
||||
Full:RegisterEvent("PLAYER_ENTERING_WORLD"); --Both Full Refresh, and also Spell/Companion cache (definte spell, possibly companion)
|
||||
Full:RegisterEvent("COMPANION_UPDATE"); --Cache companion (possibly... not used here after init)
|
||||
Full:RegisterEvent("VARIABLES_LOADED"); --Macros are available
|
||||
Full:RegisterEvent("ADDON_LOADED"); --Saved info is available
|
||||
|
||||
|
||||
--[[Come back to these events to prepare for the flashing
|
||||
PLAYER_ENTER_COMBAT
|
||||
PLAYER_LEAVE_COMBAT
|
||||
START_AUTOREPEAT_SPELL
|
||||
STOP_AUTOREPEAT_SPELL
|
||||
--]]
|
||||
|
||||
function Full:InitialOnEvent(Event, Arg1)
|
||||
if (Event == "ADDON_LOADED" and Arg1 == "ButtonForge") then
|
||||
self.AddonLoaded = true; --Before setting up is complete we also need to have companion, spell, and macro data available
|
||||
|
||||
elseif (Event == "PLAYER_ENTERING_WORLD") then
|
||||
Util.CacheCompanions();
|
||||
Util.CacheSpellIndexes();
|
||||
Util.CachePetSpellIndexes();
|
||||
Util.CacheBagItems();
|
||||
Util.CacheInvItems();
|
||||
self.LowManaThreshold, self.HighManaThreshold, self.LowManaIndex = Util.FindNewThresholds(0, 2, true);
|
||||
self.SpellsCached = true;
|
||||
|
||||
elseif (Event == "VARIABLES_LOADED") then
|
||||
self.MacrosLoaded = true;
|
||||
|
||||
elseif (Event == "COMPANION_UPDATE") then
|
||||
Util.CacheCompanions(); --Just while we are starting up we are trying to cache companion info... there is no reliable event to let us know when this is possible - it could be this overloaded event or none at all?!?
|
||||
end
|
||||
|
||||
if (Util.CompanionsCached and self.AddonLoaded and self.MacrosLoaded and self.SpellsCached) then
|
||||
self:SetScript("OnEvent", nil); --Swap to our standard event processor
|
||||
if (LibStub) then
|
||||
Util.LBF = LibStub("Masque", true);
|
||||
if (Util.LBF) then
|
||||
Util.LBFMasterGroup = Util.LBF:Group("Button Forge");
|
||||
--Util.LBF:RegisterSkinCallback("Button Forge", Util.ButtonFacadeCallback, Util);
|
||||
end
|
||||
end
|
||||
|
||||
Util.UpdateSavedData();
|
||||
Util.Load();
|
||||
Util.RefreshCompanions();
|
||||
Util.RefreshMacros();
|
||||
Util.RefreshEquipmentSets();
|
||||
Util.RefreshSpells();
|
||||
Util.CreateBlizzardBarWrappers();
|
||||
|
||||
|
||||
--self:SetScript("OnUpdate", self.OnUpdate);
|
||||
self:UnregisterEvent("COMPANION_UPDATE");
|
||||
end
|
||||
end
|
||||
|
||||
function Full:OnUpdate(Elapsed)
|
||||
-- self.FrameCount = self.FrameCount + 1;
|
||||
-- self.Elapsed = self.Elapsed + Elapsed;
|
||||
-- if (self.UnitPower ~= UnitPower("player")) then
|
||||
-- self.UnitPower = UnitPower("player");
|
||||
--print(self.UnitPower, "Frames ", self.FrameCount, "elapsed ", self.Elapsed);
|
||||
-- self.FrameCount = 0;
|
||||
-- self.Elapsed = 0;
|
||||
-- end
|
||||
-- local Mana = UnitPower("player", 0);
|
||||
--if (Mana < self.LowManaThreshold) then
|
||||
-- self.RefreshButtons = true;
|
||||
-- self.LowManaThreshold, self.HighManaThreshold, self.LowManaIndex = self.Util.FindNewThresholds(Mana, self.LowManaIndex, true);
|
||||
--elseif (Mana >= self.HighManaThreshold) then
|
||||
-- self.RefreshButtons = true;
|
||||
-- self.LowManaThreshold, self.HighManaThreshold, self.LowManaIndex = self.Util.FindNewThresholds(Mana, self.LowManaIndex, false);
|
||||
--end
|
||||
|
||||
if (self.RefreshButtons) then
|
||||
local ActiveButtons = Util.ActiveButtons;
|
||||
for i = 1, #ActiveButtons do
|
||||
ActiveButtons[i]:UpdateTexture(); --make sure the texture is always upto date (most actions wont need to do anything here, really this is just for spellwisp)
|
||||
end
|
||||
if (self.RefChecked) then
|
||||
for i = 1, #ActiveButtons do
|
||||
ActiveButtons[i]:UpdateChecked();
|
||||
end
|
||||
end
|
||||
if (self.RefEquipped) then
|
||||
for i = 1, #ActiveButtons do
|
||||
ActiveButtons[i]:UpdateEquipped();
|
||||
end
|
||||
end
|
||||
if (self.RefUsable) then
|
||||
--print("Usable");
|
||||
for i = 1, #ActiveButtons do
|
||||
ActiveButtons[i]:UpdateUsable();
|
||||
end
|
||||
end
|
||||
if (self.RefCooldown) then
|
||||
for i = 1, #ActiveButtons do
|
||||
ActiveButtons[i]:UpdateCooldown();
|
||||
end
|
||||
end
|
||||
if (self.RefText) then
|
||||
for i = 1, #ActiveButtons do
|
||||
ActiveButtons[i]:UpdateTextCount();
|
||||
end
|
||||
end
|
||||
if (self.RefFlyouts) then
|
||||
for i = 1, #ActiveButtons do
|
||||
ActiveButtons[i]:UpdateFlyout();
|
||||
end
|
||||
end
|
||||
if (self.RefGlow) then
|
||||
for i = 1, #ActiveButtons do
|
||||
ActiveButtons[i]:UpdateGlow();
|
||||
end
|
||||
end
|
||||
if (self.RefConditional) then
|
||||
local ActiveMacros = Util.ActiveMacros;
|
||||
for i = 1, #ActiveMacros do
|
||||
ActiveMacros[i]:TranslateMacro();
|
||||
end
|
||||
end
|
||||
self.RefreshButtons = false;
|
||||
self.RefFull = false;
|
||||
self.RefChecked = false;
|
||||
self.RefEquipped = false;
|
||||
self.RefUsable = false;
|
||||
self.RefCooldown = false;
|
||||
self.RefText = false;
|
||||
self.RefFlyouts = false;
|
||||
self.RefGlow = false;
|
||||
self.RefConditional = false;
|
||||
end
|
||||
end
|
||||
Full:SetScript("OnEvent", Full.InitialOnEvent);
|
||||
|
||||
|
||||
function Checked:OnEvent()
|
||||
Full.RefChecked = true;
|
||||
Full.RefreshButtons = true;
|
||||
end
|
||||
function Equipped:OnEvent()
|
||||
Full.RefEquipped = true;
|
||||
Full.RefreshButtons = true;
|
||||
end
|
||||
function Usable:OnEvent(...)
|
||||
Full.RefUsable = true;
|
||||
Full.RefreshButtons = true;
|
||||
end
|
||||
function Cooldown:OnEvent()
|
||||
Full.RefCooldown = true;
|
||||
Full.RefreshButtons = true;
|
||||
end
|
||||
function Text:OnEvent(Event, UnitId)
|
||||
if (Event ~= "UNIT_AURA" or UnitId == "player") then
|
||||
Full.RefText = true;
|
||||
Full.RefreshButtons = true;
|
||||
end
|
||||
end
|
||||
function Glow:OnEvent(Event, Arg1)
|
||||
local Name = GetSpellInfo(Arg1);
|
||||
|
||||
if (Event == "SPELL_ACTIVATION_OVERLAY_GLOW_SHOW") then
|
||||
Util.GlowSpells[Name] = true;
|
||||
else
|
||||
Util.GlowSpells[Name] = false;
|
||||
end
|
||||
Full.RefGlow = true;
|
||||
Full.RefreshButtons = true;
|
||||
end
|
||||
function Conditional:OnEvent()
|
||||
Full.RefConditional = true;
|
||||
Full.RefreshButtons = true;
|
||||
end
|
||||
Checked:SetScript("OnEvent", Checked.OnEvent);
|
||||
Equipped:SetScript("OnEvent", Equipped.OnEvent);
|
||||
Usable:SetScript("OnEvent", Usable.OnEvent);
|
||||
Cooldown:SetScript("OnEvent", Cooldown.OnEvent);
|
||||
Text:SetScript("OnEvent", Text.OnEvent);
|
||||
Glow:SetScript("OnEvent", Glow.OnEvent);
|
||||
Conditional:SetScript("OnEvent", Conditional.OnEvent);
|
||||
|
||||
|
||||
|
||||
--[[--------------------------------------------------------------------------------------------------------------------------]]
|
||||
|
||||
|
||||
function Misc:OnEvent(Event, ...)
|
||||
if (Event == "CURSOR_UPDATE") then
|
||||
local Command = GetCursorInfo();
|
||||
if (Command == "item") then
|
||||
--We are now carrying an item, we do this since some items won't trigger the SHOW/HIDE GRID event (macros, spells, etc always do)
|
||||
Util.CursorAction = true;
|
||||
Util.RefreshGridStatus();
|
||||
Util.RefreshBarStrata();
|
||||
Util.RefreshBarGUIStatus();
|
||||
elseif (Util.CursorAction and not Command and not UILib.GetDragInfo()) then
|
||||
--had an action (Util.CursorAction), but now we don't so update state
|
||||
Util.CursorAction = false;
|
||||
Util.RefreshGridStatus();
|
||||
Util.RefreshBarStrata();
|
||||
Util.RefreshBarGUIStatus();
|
||||
end
|
||||
elseif (Event == "MODIFIER_STATE_CHANGED") then
|
||||
if (Util.CursorAction) then
|
||||
-- BarStrata and the forced GUI can be updated in response to the shift key
|
||||
-- We use the CursorAction test purely to save on doing the full more expensive check on this as we know it isn't necessary
|
||||
self.RefreshBarStrata = true;
|
||||
self.RefreshBarGUIStatus = true;
|
||||
self:SetScript("OnUpdate", self.OnUpdate);
|
||||
end
|
||||
elseif (Event == "ACTIONBAR_SHOWGRID") then
|
||||
Util.CursorAction = true;
|
||||
Util.RefreshGridStatus();
|
||||
Util.RefreshBarStrata();
|
||||
Util.RefreshBarGUIStatus();
|
||||
|
||||
elseif (Event == "ACTIONBAR_HIDEGRID") then
|
||||
Util.CursorAction = false;
|
||||
Util.RefreshGridStatus();
|
||||
Util.RefreshBarStrata();
|
||||
Util.RefreshBarGUIStatus();
|
||||
|
||||
elseif (Event == "BAG_UPDATE") then
|
||||
Util.CacheBagItems();
|
||||
|
||||
elseif (Event == "UNIT_INVENTORY_CHANGED") then
|
||||
Util.CacheInvItems();
|
||||
|
||||
elseif (Event == "PET_JOURNAL_LIST_UPDATE") then
|
||||
Util.RefreshBattlePets();
|
||||
|
||||
elseif (Event == "SPELL_FLYOUT_UPDATE") then
|
||||
Full.RefreshButtons = true;
|
||||
Full.RefFlyouts = true;
|
||||
|
||||
elseif (Event == "UPDATE_MACROS") then
|
||||
Util.UpdateMacroEventCount = Util.UpdateMacroEventCount + 1; --2 update macro events need to have run before we can start refreshing macros
|
||||
Util.RefreshMacros();
|
||||
|
||||
elseif (Event == "LEARNED_SPELL_IN_TAB" or Event == "SPELLS_CHANGED") then
|
||||
--Defer processing till the onupdate since this could get slammed by a Spec Swap
|
||||
self.PromoteSpells = true;
|
||||
self.RefreshSpells = true;
|
||||
self:SetScript("OnUpdate", self.OnUpdate);
|
||||
|
||||
elseif (Event =="ACTIVE_TALENT_GROUP_CHANGED") then
|
||||
--Set the talentswap flag so we know not to auto promote any spells
|
||||
self.RefreshSpells = true;
|
||||
self.TalentSwap = true;
|
||||
self:SetScript("OnUpdate", self.OnUpdate);
|
||||
|
||||
elseif (Event == "COMPANION_LEARNED") then
|
||||
Util.CacheCompanions();
|
||||
Util.RefreshCompanions();
|
||||
|
||||
elseif (Event == "EQUIPMENT_SETS_CHANGED") then
|
||||
Util.RefreshEquipmentSets();
|
||||
|
||||
elseif (Event == "PLAYER_REGEN_DISABLED") then
|
||||
Util.PreCombatStateUpdate();
|
||||
|
||||
elseif (Event == "PLAYER_REGEN_ENABLED") then
|
||||
Util.PostCombatStateUpdate();
|
||||
|
||||
elseif (Event == "UI_SCALE_CHANGED") then
|
||||
UILib.RescaleLines();
|
||||
|
||||
elseif (Event == "EDITBOX_MESSAGE") then
|
||||
self.EditBoxMessage, self.EditBox = ...;
|
||||
self:SetScript("OnUpdate", self.OnUpdate);
|
||||
end
|
||||
end
|
||||
function Misc:OnUpdate(Elapsed)
|
||||
if (self.RefreshSpells) then
|
||||
Util.CacheSpellIndexes();
|
||||
Util.CachePetSpellIndexes();
|
||||
Util.RefreshSpells();
|
||||
end
|
||||
if (self.PromoteSpells) then
|
||||
if (not self.TalentSwap) then
|
||||
Util.PromoteSpells();
|
||||
end
|
||||
end
|
||||
if (self.RefreshBarStrata) then
|
||||
Util.RefreshBarStrata();
|
||||
end
|
||||
if (self.RefreshBarGUIStatus) then
|
||||
Util.RefreshBarGUIStatus();
|
||||
end
|
||||
if (self.EditBox) then
|
||||
self.EditBox:SetText(self.EditBoxMessage or "");
|
||||
self.EditBox:SetFocus();
|
||||
end
|
||||
|
||||
self.PromoteSpells = false;
|
||||
self.TalentSwap = false;
|
||||
self.RefreshSpells = false;
|
||||
self.RefreshBarStrata = false;
|
||||
self.RefreshBarGUIStatus = false;
|
||||
self.EditBoxMessage = nil;
|
||||
self.EditBox = nil;
|
||||
self:SetScript("OnUpdate", nil);
|
||||
end
|
||||
Misc:SetScript("OnEvent", Misc.OnEvent);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
--[[--------------------------------------------------------------------------------------------------------------------------]]
|
||||
function Range:OnEvent()
|
||||
local ActiveButtons = Util.ActiveButtons;
|
||||
for i = 1, #ActiveButtons do
|
||||
ActiveButtons[i]:UpdateRangeTimer();
|
||||
end
|
||||
end
|
||||
Range.RangeTimer = 0;
|
||||
function Range:OnUpdate(Elapsed)
|
||||
local RangeTimer = self.RangeTimer - Elapsed;
|
||||
if (RangeTimer <= 0) then
|
||||
for k, v in pairs(Util.RangeTimerButtons) do
|
||||
k:CheckRangeTimer();
|
||||
end
|
||||
RangeTimer = TOOLTIP_UPDATE_TIME;
|
||||
end
|
||||
self.RangeTimer = RangeTimer;
|
||||
end
|
||||
Range:SetScript("OnEvent", Range.OnEvent);
|
||||
Range:SetScript("OnUpdate", Range.OnUpdate);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
--[[--------------------------------------------------------------------------------------------------------------------------]]
|
||||
function Flash:OnEvent()
|
||||
local ActiveSpells = Util.ActiveSpells;
|
||||
local ActiveMacros = Util.ActiveMacros;
|
||||
local ActiveBonusActions = Util.ActiveBonusActions;
|
||||
for i = 1, #ActiveSpells do
|
||||
ActiveSpells[i]:UpdateFlash();
|
||||
end
|
||||
for i = 1, #ActiveMacros do
|
||||
ActiveMacros[i]:UpdateFlash();
|
||||
end
|
||||
for i = 1, #ActiveBonusActions do
|
||||
ActiveBonusActions[i]:UpdateFlash();
|
||||
end
|
||||
end
|
||||
Flash.FlashTime = 0;
|
||||
Flash.On = false;
|
||||
function Flash:OnUpdate(Elapsed)
|
||||
local FlashTime = self.FlashTime - Elapsed;
|
||||
if (FlashTime <= 0) then
|
||||
if (-FlashTime >= ATTACK_BUTTON_FLASH_TIME) then
|
||||
FlashTime = ATTACK_BUTTON_FLASH_TIME;
|
||||
else
|
||||
FlashTime = ATTACK_BUTTON_FLASH_TIME + FlashTime;
|
||||
end
|
||||
|
||||
if (self.On) then
|
||||
self.On = false;
|
||||
for k, v in pairs(Util.FlashButtons) do
|
||||
k:FlashShow();
|
||||
end
|
||||
else
|
||||
self.On = true;
|
||||
for k, v in pairs(Util.FlashButtons) do
|
||||
k:FlashHide();
|
||||
end
|
||||
end
|
||||
end
|
||||
self.FlashTime = FlashTime;
|
||||
end
|
||||
Flash:SetScript("OnEvent", Flash.OnEvent);
|
||||
Flash:SetScript("OnUpdate", Flash.OnUpdate);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
--[[----------------------------------]]
|
||||
Delay.DelayTime = 0;
|
||||
function Delay:OnUpdate(Elapsed)
|
||||
self.DelayTime = self.DelayTime + Elapsed;
|
||||
if (self.DelayTime > tonumber(ButtonForgeGlobalSettings["MacroCheckDelay"])) then
|
||||
Util.StopMacroCheckDelay();
|
||||
end
|
||||
end
|
Après Largeur: | Hauteur: | Taille: 16 KiB |
Après Largeur: | Hauteur: | Taille: 16 KiB |
Après Largeur: | Hauteur: | Taille: 16 KiB |
Après Largeur: | Hauteur: | Taille: 16 KiB |
Après Largeur: | Hauteur: | Taille: 16 KiB |
Après Largeur: | Hauteur: | Taille: 16 KiB |
Après Largeur: | Hauteur: | Taille: 16 KiB |
Après Largeur: | Hauteur: | Taille: 16 KiB |
Après Largeur: | Hauteur: | Taille: 16 KiB |
Après Largeur: | Hauteur: | Taille: 16 KiB |
Après Largeur: | Hauteur: | Taille: 16 KiB |
Après Largeur: | Hauteur: | Taille: 16 KiB |
Après Largeur: | Hauteur: | Taille: 16 KiB |
Après Largeur: | Hauteur: | Taille: 16 KiB |
Après Largeur: | Hauteur: | Taille: 16 KiB |
Après Largeur: | Hauteur: | Taille: 16 KiB |
Après Largeur: | Hauteur: | Taille: 4.0 KiB |
Après Largeur: | Hauteur: | Taille: 4.0 KiB |
Après Largeur: | Hauteur: | Taille: 4.0 KiB |
Après Largeur: | Hauteur: | Taille: 4.0 KiB |
Après Largeur: | Hauteur: | Taille: 16 KiB |
Après Largeur: | Hauteur: | Taille: 16 KiB |
Après Largeur: | Hauteur: | Taille: 16 KiB |
Après Largeur: | Hauteur: | Taille: 16 KiB |
Après Largeur: | Hauteur: | Taille: 16 KiB |
Après Largeur: | Hauteur: | Taille: 16 KiB |
Après Largeur: | Hauteur: | Taille: 16 KiB |
Après Largeur: | Hauteur: | Taille: 16 KiB |
Après Largeur: | Hauteur: | Taille: 8.0 KiB |
Après Largeur: | Hauteur: | Taille: 8.0 KiB |
Après Largeur: | Hauteur: | Taille: 8.0 KiB |
Après Largeur: | Hauteur: | Taille: 8.0 KiB |
Après Largeur: | Hauteur: | Taille: 4.0 KiB |
Après Largeur: | Hauteur: | Taille: 4.0 KiB |
Après Largeur: | Hauteur: | Taille: 4.0 KiB |
Après Largeur: | Hauteur: | Taille: 4.0 KiB |
Après Largeur: | Hauteur: | Taille: 4.0 KiB |
Après Largeur: | Hauteur: | Taille: 16 KiB |
Après Largeur: | Hauteur: | Taille: 4.0 KiB |
Après Largeur: | Hauteur: | Taille: 4.0 KiB |
Après Largeur: | Hauteur: | Taille: 4.0 KiB |
Après Largeur: | Hauteur: | Taille: 16 KiB |
Après Largeur: | Hauteur: | Taille: 16 KiB |
Après Largeur: | Hauteur: | Taille: 4.0 KiB |
Après Largeur: | Hauteur: | Taille: 4.0 KiB |
Après Largeur: | Hauteur: | Taille: 4.0 KiB |
Après Largeur: | Hauteur: | Taille: 4.0 KiB |
Après Largeur: | Hauteur: | Taille: 4.0 KiB |
Après Largeur: | Hauteur: | Taille: 4.0 KiB |
Après Largeur: | Hauteur: | Taille: 4.0 KiB |
Après Largeur: | Hauteur: | Taille: 4.0 KiB |
Après Largeur: | Hauteur: | Taille: 4.0 KiB |
Après Largeur: | Hauteur: | Taille: 4.0 KiB |
Après Largeur: | Hauteur: | Taille: 4.0 KiB |
Après Largeur: | Hauteur: | Taille: 16 KiB |
Après Largeur: | Hauteur: | Taille: 4.0 KiB |
Après Largeur: | Hauteur: | Taille: 4.0 KiB |
Après Largeur: | Hauteur: | Taille: 4.0 KiB |
Après Largeur: | Hauteur: | Taille: 4.0 KiB |
|
@ -0,0 +1,166 @@
|
|||
--[[
|
||||
Author: Alternator (Massiner of Nathrezim)
|
||||
Copyright 2010
|
||||
|
||||
Notes:
|
||||
]]
|
||||
|
||||
if (BFKeyBinder == nil) then BFKeyBinder = {}; end local KeyBinder = BFKeyBinder;
|
||||
if (BFUILib == nil) then BFUILib = {}; end local UILib = BFUILib;
|
||||
|
||||
KeyBinder.SelectedBar = nil;
|
||||
KeyBinder.SelectedButton = nil;
|
||||
|
||||
|
||||
function KeyBinder.SetButtonSelectorMode(Bar)
|
||||
if (KeyBinder.SelectedBar == Bar) then
|
||||
KeyBinder.CancelButtonSelectorMode();
|
||||
return;
|
||||
elseif (KeyBinder.SelectedBar) then
|
||||
KeyBinder.CancelButtonSelectorMode();
|
||||
end
|
||||
BFBindingMode:Show();
|
||||
KeyBinder.SelectedBar = Bar;
|
||||
end
|
||||
function KeyBinder.CancelButtonSelectorMode()
|
||||
BFBindingMode:Hide();
|
||||
end
|
||||
function KeyBinder.OnHideBindingMode()
|
||||
KeyBinder.HideBindingDialog(); --This will chain through to clear the keybind input state
|
||||
|
||||
if (KeyBinder.SelectedBar) then
|
||||
KeyBinder.SelectedBar:CancelKeyBindMode();
|
||||
end
|
||||
|
||||
KeyBinder.SelectedBar = nil;
|
||||
KeyBinder.SelectedButton = nil;
|
||||
end
|
||||
|
||||
function KeyBinder.ShowBindingDialog(Button)
|
||||
if (KeyBinder.SelectedButton == Button) then
|
||||
KeyBinder.HideBindingDialog();
|
||||
return;
|
||||
elseif (KeyBinder.SelectedButton) then
|
||||
KeyBinder.HideBindingDialog();
|
||||
end
|
||||
|
||||
if (Button) then
|
||||
KeyBinder.SelectedButton = Button
|
||||
if (KeyBinder.SelectedButton.ButtonSave["KeyBinding"]) then
|
||||
BFBindingDialogBinding:SetText(KeyBinder.SelectedButton.ButtonSave["KeyBinding"]);
|
||||
else
|
||||
BFBindingDialogBinding:SetText(NORMAL_FONT_COLOR_CODE..NOT_BOUND..FONT_COLOR_CODE_CLOSE);
|
||||
end
|
||||
BFBindingDialog:Show();
|
||||
BFBindingDialog:ClearAllPoints();
|
||||
BFBindingDialog:SetPoint("RIGHT", KeyBinder.SelectedButton.Widget, "LEFT");
|
||||
UILib.LockMask();
|
||||
--I'm now streamlining this to go straight into Input Binding Mode
|
||||
KeyBinder.InputBindingMode()
|
||||
end
|
||||
end
|
||||
function KeyBinder.HideBindingDialog()
|
||||
BFBindingDialog:Hide();
|
||||
end
|
||||
function KeyBinder.OnHideBindingDialog()
|
||||
KeyBinder.CancelBindingMode();
|
||||
BFBindingDialog:ClearAllPoints();
|
||||
BFBindingDialog.Message.Text:SetText("");
|
||||
BFBindingDialogBinding:SetText(NORMAL_FONT_COLOR_CODE..NOT_BOUND..FONT_COLOR_CODE_CLOSE);
|
||||
UILib.UnlockMask();
|
||||
KeyBinder.SelectedButton = nil;
|
||||
end
|
||||
|
||||
function KeyBinder.InputBindingMode()
|
||||
if (BFBindingOverlay:IsShown()) then
|
||||
KeyBinder.CancelBindingMode();
|
||||
return;
|
||||
end
|
||||
if (InCombatLockdown()) then
|
||||
BFBindingDialog.Message.Text:SetText("Bindings Cannot be Updated While in Combat");
|
||||
return;
|
||||
end
|
||||
BFBindingDialog.Message.Text:SetText("Press Key to Bind to Button");
|
||||
BFBindingDialogBinding:LockHighlight();
|
||||
BFBindingOverlay:Show();
|
||||
end
|
||||
function KeyBinder.CancelBindingMode()
|
||||
BFBindingDialog.Message.Text:SetText("");
|
||||
BFBindingOverlay:Hide();
|
||||
end
|
||||
function KeyBinder.OnHideBindingOverlay()
|
||||
BFBindingDialogBinding:UnlockHighlight();
|
||||
end
|
||||
|
||||
function KeyBinder.UpdateBinding(Binding)
|
||||
if (not KeyBinder.SelectedButton:SetKeyBind(Binding)) then
|
||||
BFBindingDialog.Message.Text:SetText("Bindings Cannot be Updated While in Combat");
|
||||
return;
|
||||
end
|
||||
if (Binding ~= nil and Binding ~= "") then
|
||||
BFBindingDialogBinding:SetText(Binding);
|
||||
BFBindingDialog.Message.Text:SetText("Key Bound Successfully");
|
||||
else
|
||||
BFBindingDialogBinding:SetText(NORMAL_FONT_COLOR_CODE..NOT_BOUND..FONT_COLOR_CODE_CLOSE);
|
||||
BFBindingDialog.Message.Text:SetText("");
|
||||
end
|
||||
|
||||
--I'm streamlining this to auto hide the bind dialog when a binding is set
|
||||
KeyBinder.HideBindingDialog();
|
||||
end
|
||||
|
||||
|
||||
function KeyBinder.OnInputBindingOverlay(Input)
|
||||
if (not BFBindingOverlay:IsShown()) then
|
||||
return;
|
||||
end
|
||||
if (GetBindingFromClick(Input) == "SCREENSHOT") then
|
||||
RunBinding("SCREENSHOT");
|
||||
return;
|
||||
end
|
||||
|
||||
--I have chosen to not bind escape (most users would expect it to cancel binding even though the default ui allows it to be rebound)
|
||||
if (Input == "ESCAPE") then
|
||||
KeyBinder.CancelBindingMode();
|
||||
return;
|
||||
end
|
||||
|
||||
--These are bindings that I won't allow
|
||||
if (Input == "UNKNOWN" or
|
||||
Input == "LeftButton" or
|
||||
Input == "RightButton") then
|
||||
return;
|
||||
end
|
||||
|
||||
--These are modifier keys so don't constitute bindings by themselves
|
||||
if (Input == "LSHIFT" or
|
||||
Input == "RSHIFT" or
|
||||
Input == "LCTRL" or
|
||||
Input == "RCTRL" or
|
||||
Input == "LALT" or
|
||||
Input == "RALT" ) then
|
||||
return;
|
||||
end
|
||||
|
||||
--Translate button clicks
|
||||
if (Input == "MiddleButton") then
|
||||
Input = "BUTTON3";
|
||||
elseif (strfind(Input, "Button", 1, true)) then
|
||||
Input = strupper(Input);
|
||||
end
|
||||
|
||||
--Prepend Modifiers
|
||||
if (IsShiftKeyDown()) then
|
||||
Input = "SHIFT-"..Input;
|
||||
end
|
||||
if (IsControlKeyDown()) then
|
||||
Input = "CTRL-"..Input;
|
||||
end
|
||||
if (IsAltKeyDown()) then
|
||||
Input = "ALT-"..Input;
|
||||
end
|
||||
|
||||
KeyBinder.CancelBindingMode();
|
||||
KeyBinder.UpdateBinding(Input);
|
||||
|
||||
end
|
|
@ -0,0 +1,235 @@
|
|||
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/ ..\FrameXML\UI.xsd">
|
||||
<!--Autogenerated by wowuides, Version=1.0.300.0, Culture=neutral, PublicKeyToken=null-->
|
||||
<Script file="KeyBinder.lua"/>
|
||||
|
||||
<Frame name="BFBindingMode">
|
||||
<Scripts>
|
||||
<OnLoad>
|
||||
tinsert(UISpecialFrames, self:GetName());
|
||||
</OnLoad>
|
||||
<OnHide>
|
||||
BFKeyBinder.OnHideBindingMode();
|
||||
</OnHide>
|
||||
</Scripts>
|
||||
</Frame>
|
||||
|
||||
<!-- Overlay to capture mouse and keyboard commands when setting a key binding -->
|
||||
<Frame name="BFBindingOverlay" parent="BFConfigureLayer" inherits="BFOverlay" enablekeyboard="true">
|
||||
<Scripts>
|
||||
<OnLoad>
|
||||
self:SetBackdropColor(unpack(BFConst.KeyBindOverlayColor));
|
||||
tinsert(UISpecialFrames, self:GetName());
|
||||
</OnLoad>
|
||||
<OnHide>
|
||||
BFKeyBinder.OnHideBindingOverlay();
|
||||
</OnHide>
|
||||
<OnKeyDown>
|
||||
BFKeyBinder.OnInputBindingOverlay(key);
|
||||
</OnKeyDown>
|
||||
<OnMouseUp>
|
||||
BFKeyBinder.OnInputBindingOverlay(button);
|
||||
</OnMouseUp>
|
||||
<OnMouseWheel>
|
||||
if (delta > 0) then
|
||||
BFKeyBinder.OnInputBindingOverlay("MOUSEWHEELUP");
|
||||
else
|
||||
BFKeyBinder.OnInputBindingOverlay("MOUSEWHEELDOWN");
|
||||
end
|
||||
</OnMouseWheel>
|
||||
</Scripts>
|
||||
</Frame>
|
||||
|
||||
<Frame name="BFBindingDialog" parent="UIParent" hidden="true" clampedtoscreen="true" enablemouse="true" movable="true" frameStrata="FULLSCREEN_DIALOG">
|
||||
<!--<FrameSkin skinid="dcb143e1-a4ab-4e7c-b934-1efa40101d21" frameid="2d508883-59c2-4f83-ae10-27aaad48391b" />-->
|
||||
<Size>
|
||||
<AbsDimension x="341" y="137" />
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="CENTER" relativeTo="UIParent">
|
||||
<Offset>
|
||||
<AbsDimension x="0" y="0" />
|
||||
</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 parentKey="TitleBorder" file="Interface\DialogFrame\UI-DialogBox-Header">
|
||||
<Size>
|
||||
<AbsDimension x="160" y="32" />
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="TOP">
|
||||
<Offset>
|
||||
<AbsDimension x="0" y="5" />
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<TexCoords left="0.2" right="0.8" top="0" bottom="0.6" />
|
||||
</Texture>
|
||||
<FontString parentKey="TitleString" font="Fonts\FRIZQT__.TTF" text="Current Binding">
|
||||
<Size>
|
||||
<AbsDimension x="140" y="0" />
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="TOP">
|
||||
<Offset>
|
||||
<AbsDimension x="0" y="-4" />
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<FontHeight>
|
||||
<AbsValue val="12" />
|
||||
</FontHeight>
|
||||
<Color r="1" g="0.8196079" b="0" />
|
||||
<Shadow>
|
||||
<Color r="0" g="0" b="0" />
|
||||
<Offset>
|
||||
<AbsDimension x="1" y="-1" />
|
||||
</Offset>
|
||||
</Shadow>
|
||||
</FontString>
|
||||
<Texture parentKey="ToggleBorder" file="Interface\AddOns\ButtonForge\Images\ToggleBorder.tga">
|
||||
<Size>
|
||||
<AbsDimension x="26" y="26" />
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="TOPRIGHT">
|
||||
<Offset>
|
||||
<AbsDimension x="0" y="0" />
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<TexCoords left="0" right="0.8125" top="0" bottom="0.8125" />
|
||||
</Texture>
|
||||
</Layer>
|
||||
</Layers>
|
||||
<Frames>
|
||||
<Frame parentKey="Message">
|
||||
<!--<FrameSkin skinid="f15d4970-d66d-444e-bb2d-1ad102c87fed" frameid="f15d4978-d66d-444e-bb2d-1ad102c87fed" />-->
|
||||
<Size>
|
||||
<AbsDimension x="297" y="17" />
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="22" y="-63" />
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<Layers>
|
||||
<Layer>
|
||||
<FontString parentKey="Text" setAllPoints="true" font="Fonts\FRIZQT__.TTF" text="">
|
||||
<FontHeight>
|
||||
<AbsValue val="12" />
|
||||
</FontHeight>
|
||||
<Color r="1" g="0.8196079" b="0" />
|
||||
<Shadow>
|
||||
<Color r="0" g="0" b="0" />
|
||||
<Offset>
|
||||
<AbsDimension x="1" y="-1" />
|
||||
</Offset>
|
||||
</Shadow>
|
||||
</FontString>
|
||||
</Layer>
|
||||
</Layers>
|
||||
</Frame>
|
||||
<Button name="$parentBinding" inherits="UIPanelButtonTemplate">
|
||||
<!--<FrameSkin skinid="dcb143e1-a4ab-4e7c-b934-1efa40101d21" frameid="2d508884-59c2-4f83-ae10-27aaad48391b" />-->
|
||||
<Size>
|
||||
<AbsDimension x="180" y="22" />
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="81" y="-35" />
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<NormalFont style="GameFontHighlightSmall"/>
|
||||
<DisabledFont style="GameFontDisable"/>
|
||||
<HighlightFont style="GameFontHighlightSmall"/>
|
||||
<Scripts>
|
||||
<OnClick>
|
||||
BFKeyBinder.InputBindingMode();
|
||||
</OnClick>
|
||||
</Scripts>
|
||||
</Button>
|
||||
<Button name="$parentUnbind" text="Unbind Key" inherits="UIPanelButtonTemplate">
|
||||
<!--<FrameSkin skinid="dcb143e1-a4ab-4e7c-b934-1efa40101d21" frameid="2d508884-59c2-4f83-ae10-27aaad48391b" />-->
|
||||
<Size>
|
||||
<AbsDimension x="110" y="22" />
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="118" y="-86" />
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<Scripts>
|
||||
<OnClick>
|
||||
if (InCombatLockdown()) then
|
||||
BFBindingDialog.Message.Text:SetText("You Cannot Update Bindings While in Combat");
|
||||
return;
|
||||
end
|
||||
BFKeyBinder.UpdateBinding(nil);
|
||||
</OnClick>
|
||||
</Scripts>
|
||||
</Button>
|
||||
<Button parentKey="Toggle">
|
||||
<Size>
|
||||
<AbsDimension x="32" y="32"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="TOPRIGHT">
|
||||
<Offset>
|
||||
<AbsDimension x="5" y="5"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<NormalTexture file="Interface\Buttons\UI-Panel-MinimizeButton-Up"/>
|
||||
<PushedTexture file="Interface\Buttons\UI-Panel-MinimizeButton-Down"/>
|
||||
<HighlightTexture file="Interface\Buttons\UI-Panel-MinimizeButton-Highlight" alphaMode="ADD"/>
|
||||
<Scripts>
|
||||
<OnClick>
|
||||
BFKeyBinder.HideBindingDialog();
|
||||
</OnClick>
|
||||
</Scripts>
|
||||
</Button>
|
||||
</Frames>
|
||||
<Scripts>
|
||||
<OnLoad>
|
||||
tinsert(UISpecialFrames, self:GetName());
|
||||
</OnLoad>
|
||||
<OnHide>
|
||||
BFKeyBinder.OnHideBindingDialog();
|
||||
</OnHide>
|
||||
<OnMouseDown>
|
||||
self:StartMoving();
|
||||
</OnMouseDown>
|
||||
<OnMouseUp>
|
||||
self:StopMovingOrSizing();
|
||||
BFKeyBinder.OnInputBindingOverlay(button);
|
||||
</OnMouseUp>
|
||||
<OnMouseWheel>
|
||||
if (delta > 0) then
|
||||
BFKeyBinder.OnInputBindingOverlay("MOUSEWHEELUP");
|
||||
else
|
||||
BFKeyBinder.OnInputBindingOverlay("MOUSEWHEELDOWN");
|
||||
end
|
||||
</OnMouseWheel>
|
||||
|
||||
</Scripts>
|
||||
</Frame>
|
||||
</Ui>
|
|
@ -0,0 +1,139 @@
|
|||
--[[
|
||||
Author: Alternator (Massiner of Nathrezim)
|
||||
Translator:
|
||||
Copyright 2010
|
||||
|
||||
Notes: Primary locale (will be used if a particular locale is not loaded)
|
||||
|
||||
UPDATED 17-Mar-2011: Needs tidy up, also some of the terminology is becoming inconsistent
|
||||
--]]
|
||||
|
||||
|
||||
--[[ Notes for translating
|
||||
- It is recommended to use a text editor that can syntax highlight lua code (notepad++ is the editor I use)
|
||||
- Almost every piece of text displayed can be found in the enUS locale file
|
||||
- When making a translation simply go through and update the text that is stored into the Locale table
|
||||
e.g. English version
|
||||
Locale["ScaleTooltip"] = "Scale\n|c"..Const.LightBlue.."(Double Click to Default)|r";
|
||||
Russian version
|
||||
Locale["ScaleTooltip"] = "Масштаб\n|c"..Const.LightBlue.."(Двойной щелчок для значения по умолчанию)|r";
|
||||
- Some of the texts have character formatting (such as newlines and colouring), it is recommended to not change this
|
||||
- Not all of the text should be translated, those parts will have a note above them
|
||||
- The file name should be 'Locale-????.lua' where the ???? is the code for your locale
|
||||
- Update the 'enUS' on the next two lines to your code
|
||||
|
||||
- It is optional how many texts are translated; it is recommended to remove from your file any that are not, these will simply
|
||||
default to the enUS text in game
|
||||
|
||||
Note: Some of the text displayed in game is created by taking a locale text
|
||||
such as "Action Buttons Lock" and appending a status such as "Locked"
|
||||
--]]
|
||||
|
||||
BFLocales["deDE"] = {};
|
||||
local Locale = BFLocales["deDE"];
|
||||
|
||||
local Const = BFConst;
|
||||
|
||||
|
||||
|
||||
Locale["ScaleTooltip"] = "Scale\n|c"..Const.LightBlue.."(Double Click to Default)|r";
|
||||
Locale["ColsTooltip"] = "Hinzufügen/Entfernen von Button Spalten";
|
||||
Locale["RowsTooltip"] = "Hinzufügen/Entfernen von Button Zeilen";
|
||||
Locale["GridTooltip"] = "Sichtbarkeit von nicht belegten Buttons\n";
|
||||
Locale["TooltipsTooltip"] = "Tooltip Sichtbarkeit\n";
|
||||
Locale["ButtonLockTooltip"] = "Button gegen Verschieben sperren\n";
|
||||
Locale["HideVehicleTooltip"] = "Actionbar in Fahrzeugen ausblenden\n";
|
||||
Locale["HideSpec1Tooltip"] = "Actionbar für Spec 1 verbergen\n";
|
||||
Locale["HideSpec2Tooltip"] = "Actionbar für Spec 2 verbergen\n";
|
||||
Locale["HideSpec3Tooltip"] = "Actionbar für Spec 3 verbergen\n";
|
||||
Locale["HideSpec4Tooltip"] = "Actionbar für Spec 4 verbergen\n";
|
||||
Locale["HideBonusBarTooltip"] = "Actionbar ausblenden wenn Bonusbar aktiv ist:5 is Active\n";
|
||||
Locale["SendToBackTooltip"] = "Actionbar in den Hintergrund verschieben";
|
||||
Locale["SendToFrontTooltip"] = "Actionbar in den Vordergrund verschieben";
|
||||
Locale["VisibilityTooltip"] = "Macros zeigen\n";
|
||||
Locale["VisibilityEgTooltip"] = "e.g. |c"..Const.LightBlue.."[combat] hide; show|r"; --Do not translate this line of text
|
||||
Locale["KeyBindModeTooltip"] = "Tastaturbelegung";
|
||||
Locale["LabelModeTooltip"] = "Beschriftung der Actionbar hinzufügen/ändern";
|
||||
Locale["AdvancedToolsTooltip"] = "Erweiterte Actionbar Einstellungen";
|
||||
Locale["DestroyBarTooltip"] = "Actionbar löschen";
|
||||
Locale["CreateBarTooltip"] = "Actionbar erstellen";
|
||||
Locale["CreateBonusBarTooltip"] = "Zusätzliche Actionbar erstellen\n|c"..Const.LightBlue.."(Für Begleiter, Fahrzeuge und Spezialfähigkeiten in einigen Kämpfen)|r";
|
||||
Locale["RightClickSelfCastTooltip"] = "Rechtsklick zum Selbstzauber\n"
|
||||
Locale["ConfigureModePrimaryTooltip"] = "Button Forge Actionbar Konfiguration\nTip: |c"..Const.LightBlue.."Kann in eine BF Actionbar gezogen werden|r";
|
||||
Locale["ConfigureModeTooltip"] = "Button Forge Konfiguration";
|
||||
Locale["BonusActionTooltip"] = "Bonus Bac Aktion";
|
||||
Locale["Shown"] = "|c"..Const.DarkOrange.."Versteckt|r";
|
||||
Locale["Hidden"] = "|c"..Const.DarkOrange.."Nicht versteckt|r";
|
||||
Locale["Locked"] = "|c"..Const.DarkOrange.."Gesperrt|r";
|
||||
Locale["Unlocked"] = "|c"..Const.DarkOrange.."Entsperrt|r";
|
||||
Locale["Enabled"] = "|c"..Const.DarkOrange.."Aktiviert|r";
|
||||
Locale["Disabled"] = "|c"..Const.DarkOrange.."Deaktiviert|r";
|
||||
Locale["CancelPossessionTooltip"] = "Cancel Possession";
|
||||
Locale["UpgradedChatMsg"] = "Button Forge Einstellung gespeichert: ";
|
||||
Locale["DisableAutoAlignmentTooltip"] = "Halte 'Shift' und ziehe Bar um Autoausrichtung zu deaktiveren";
|
||||
|
||||
--Warning/error messages
|
||||
Locale["CreateBonusBarError"] = "Kann nur im Button Forge Konfigurationsmodus geändert werden.";
|
||||
|
||||
|
||||
--Translation note, the following locale texts are contained between the [[ ]] brackets
|
||||
|
||||
Locale["SlashBarNameRequired"] =
|
||||
[[ButtonForge Textbefehl Fehler:
|
||||
Du musst eine Actionbar angeben -bar um folgende Befehle zu nutzen: -rows, -cols, -coords, -rename, -info
|
||||
]];
|
||||
|
||||
Locale["SlashCreateBarRule"] =
|
||||
[[ButtonForge Textbefehl Fehler:
|
||||
-createbar kann nicht genutzt werden mit -bar
|
||||
]];
|
||||
|
||||
Locale["SlashCreateBarFailed"] =
|
||||
[[ButtonForge Textbefehl Fehler:
|
||||
-createbar neue Actionbar kann nicht erstellt werden
|
||||
]];
|
||||
|
||||
Locale["SlashDestroyBarRule"] =
|
||||
[[ButtonForge Textbefehl Fehler:
|
||||
-destroybar kann nicht mit anderem Befehl genutzt werden
|
||||
]];
|
||||
|
||||
Locale["SlashGlobalSettingsRule"] =
|
||||
[[ButtonForge Textbefehl Fehler:
|
||||
-globalsettings kann nicht mit anderem Befehl genutzt werden
|
||||
]];
|
||||
|
||||
Locale["SlashCommandNotRecognised"] =
|
||||
[[ButtonForge Textbefehl Fehler:
|
||||
Befehl nicht bekannt: ]];
|
||||
|
||||
Locale["SlashParamsInvalid"] =
|
||||
[[ButtonForge Textbefehl Fehler:
|
||||
Parameter ungültig: ]];
|
||||
|
||||
|
||||
|
||||
|
||||
--Used when displaying info for the Bar via the slash command /bufo -info
|
||||
Locale["InfoLabel"] = "Beschriftung";
|
||||
Locale["InfoRowsCols"] = "Zeilen, Spalte";
|
||||
Locale["InfoScale"] = "Skalierung";
|
||||
Locale["InfoCoords"] = "Koordinaten";
|
||||
Locale["InfoTooltips"] = "Tooltips";
|
||||
Locale["InfoEmptyGrid"] = "Leere Buttons";
|
||||
Locale["InfoLock"] = "Button gesperrt";
|
||||
Locale["InfoHSpec1"] = "Sichtbarkeit für Spec 1";
|
||||
Locale["InfoHSpec2"] = "Sichtbarkeit für Spec 2";
|
||||
Locale["InfoHSpec3"] = "Sichtbarkeit für Spec 3";
|
||||
Locale["InfoHSpec4"] = "Sichtbarkeit für Spec 4";
|
||||
Locale["InfoHVehicle"] = "Sichtbarkeit in Fahrzeugen";
|
||||
Locale["InfoHBonusBar5"] = "Sichtbarkeit wenn Bonusbar 5 aktiv ist";
|
||||
Locale["InfoVisibilityMacro"] = "Sichtbarkeit von Makros";
|
||||
Locale["InfoMacroText"] = "Makro Beschriftung";
|
||||
Locale["InfoKeybindText"] = "Tastaturbelegung beschriften";
|
||||
Locale["InfoEnabled"] = "Bar";
|
||||
Locale["InfoGap"] = "Button Abstand";
|
||||
Locale["InfoMacroCheckDelay"] = "Makro Verzögerung";
|
||||
Locale["InfoRemoveMissingMacros"] = "Fehlende Makros entfernen";
|
||||
Locale["InfoButtonFrameName"] = "Buttonrahmen beschriftet";
|
||||
|
|
@ -0,0 +1,216 @@
|
|||
--[[
|
||||
Author: Alternator (Massiner of Nathrezim)
|
||||
Copyright 2010
|
||||
|
||||
Notes: Primary locale (will be used if a particular locale is not loaded)
|
||||
|
||||
UPDATED 17-Mar-2011: Needs tidy up, also some of the terminology is becoming inconsistent
|
||||
--]]
|
||||
|
||||
|
||||
BFLocales["enUS"] = {};
|
||||
local Locale = BFLocales["enUS"];
|
||||
Locale.__index = Locale; --This line is only needed for the enUS (primary) locale
|
||||
|
||||
local Const = BFConst;
|
||||
|
||||
Locale["ScaleTooltip"] = "Scale\n|c"..Const.LightBlue.."(Double Click to Default)|r";
|
||||
Locale["ColsTooltip"] = "Add/Remove Button Columns";
|
||||
Locale["RowsTooltip"] = "Add/Remove Button Rows";
|
||||
Locale["GridTooltip"] = "Empty Button Visibility\n";
|
||||
Locale["TooltipsTooltip"] = "Tooltip Visibility\n";
|
||||
Locale["ButtonLockTooltip"] = "Action Buttons Lock\n";
|
||||
Locale["HideVehicleTooltip"] = "Hide Bar when in a Vehicle\n";
|
||||
Locale["HideSpec1Tooltip"] = "Hide Bar during Talent Spec 1\n";
|
||||
Locale["HideSpec2Tooltip"] = "Hide Bar during Talent Spec 2\n";
|
||||
Locale["HideSpec3Tooltip"] = "Hide Bar during Talent Spec 3\n";
|
||||
Locale["HideSpec4Tooltip"] = "Hide Bar during Talent Spec 4\n";
|
||||
Locale["HideBonusBarTooltip"] = "Hide Bar when Override Bar is Active\n";
|
||||
Locale["SendToBackTooltip"] = "Send Bar to Back";
|
||||
Locale["SendToFrontTooltip"] = "Send Bar to Front";
|
||||
Locale["VisibilityTooltip"] = "Visibility Macro\n";
|
||||
Locale["VisibilityEgTooltip"] = "e.g. |c"..Const.LightBlue.."[combat] hide; show|r"; --Appended to the Visibility tooltip if no driver is set for that bar
|
||||
Locale["KeyBindModeTooltip"] = "Key Bindings";
|
||||
Locale["LabelModeTooltip"] = "Enter/Edit a Bar Label";
|
||||
Locale["AdvancedToolsTooltip"] = "Advanced Bar Configuration Options";
|
||||
Locale["DestroyBarTooltip"] = "Destroy Bar";
|
||||
Locale["CreateBarTooltip"] = "Create Bar";
|
||||
Locale["CreateBonusBarTooltip"] = "Create a BonusBar\n|c"..Const.LightBlue.."(For possession, vehicles, and special abilities in certain fights)|r";
|
||||
Locale["RightClickSelfCastTooltip"] = "Right Click Self Cast\n"
|
||||
Locale["ConfigureModePrimaryTooltip"] = "Button Forge Bar Configuration\nTip: |c"..Const.LightBlue.."Can be Dragged to a BF Bar|r";
|
||||
Locale["ConfigureModeTooltip"] = "Button Forge Bar Configuration";
|
||||
Locale["BonusActionTooltip"] = "Bonus Bar Action";
|
||||
Locale["Shown"] = "|c"..Const.DarkOrange.."Not Hidden|r";
|
||||
Locale["Hidden"] = "|c"..Const.DarkOrange.."Hidden|r";
|
||||
Locale["Locked"] = "|c"..Const.DarkOrange.."Locked|r";
|
||||
Locale["Unlocked"] = "|c"..Const.DarkOrange.."Unlocked|r";
|
||||
Locale["Enabled"] = "|c"..Const.DarkOrange.."Enabled|r";
|
||||
Locale["Disabled"] = "|c"..Const.DarkOrange.."Disabled|r";
|
||||
Locale["CancelPossessionTooltip"] = "Cancel Possession";
|
||||
Locale["UpgradedChatMsg"] = "Button Forge Saved Data Upgraded to: ";
|
||||
Locale["DisableAutoAlignmentTooltip"] = "Hold 'Shift' while dragging to disable auto-alignment";
|
||||
Locale["GUIHidden"] = Locale["Hidden"].." (keybinds unaffected)";
|
||||
|
||||
--Warning/error messages
|
||||
Locale["CreateBonusBarError"] = "Can only be done In Button Forge Configuration Mode.";
|
||||
Locale["ActionFailedCombatLockdown"] = "Button Forge: Action cannot be performed while in combat"; --Hopefully I don't need to go more specific on this one (it could be possible players missinterpret it as an error, I'll give it a trial run)
|
||||
Locale["ProfileNotFound"] = "Button Forge: Profile was not found";
|
||||
|
||||
|
||||
--The following are used for slash commands (only use lower case for the values!)
|
||||
Locale["SlashButtonForge1"] = "/buttonforge"; --these two identifiers probably shouldn't change for different locales, but if need be they can be
|
||||
Locale["SlashButtonForge2"] = "/bufo";
|
||||
|
||||
|
||||
--This BoolTable is used to allow more than one value for true or false, in this case the keys should be changed to be suitable for the locale (as many or few as desired)
|
||||
--The keys are matched against user input to see if the user specified true or false (or nil)... e.g. if the user typed in 'y' then the below table would map to true. (only use lower case)
|
||||
Locale.BoolTable = {};
|
||||
Locale.BoolTable["yes"] = true;
|
||||
Locale.BoolTable["no"] = false;
|
||||
|
||||
Locale.BoolTable["true"] = true;
|
||||
Locale.BoolTable["false"] = false;
|
||||
|
||||
Locale.BoolTable["y"] = true;
|
||||
Locale.BoolTable["n"] = false;
|
||||
|
||||
Locale.BoolTable["on"] = true;
|
||||
Locale.BoolTable["off"] = false;
|
||||
|
||||
Locale.BoolTable["1"] = true;
|
||||
Locale.BoolTable["0"] = false;
|
||||
|
||||
Locale.BoolTable["toggle"] = "toggle";
|
||||
|
||||
--Instructions for using the slash commands
|
||||
Locale["SlashHelpFormatted"] =
|
||||
"ButtonForge Usage:\n"..
|
||||
"Valid slash commands: |c"..Const.LightBlue.."/buttonforge|r, |c"..Const.LightBlue.."/bufo|r\n"..
|
||||
"Valid switches:\n"..
|
||||
"|c"..Const.LightBlue.."-bar <bar name>|r (the bar to apply changes to, or if not set then all bars)\n"..
|
||||
"|c"..Const.LightBlue.."-rename <new name>|r\n"..
|
||||
"|c"..Const.LightBlue.."-rows <number>|r\n"..
|
||||
"|c"..Const.LightBlue.."-cols <number>|r\n"..
|
||||
"|c"..Const.LightBlue.."-scale <size>|r (1 is normal scale)\n"..
|
||||
"|c"..Const.LightBlue.."-gap <size>|r (6 is normal gap)\n"..
|
||||
"|c"..Const.LightBlue.."-coords <left> <top>|r\n"..
|
||||
"|c"..Const.LightBlue.."-tooltips <on/off>|r\n"..
|
||||
"|c"..Const.LightBlue.."-emptybuttons <on/off>|r\n"..
|
||||
"|c"..Const.LightBlue.."-lockbuttons <on/off>|r\n"..
|
||||
"|c"..Const.LightBlue.."-macrotext <on/off>|r\n"..
|
||||
"|c"..Const.LightBlue.."-keybindtext <on/off>|r\n"..
|
||||
"|c"..Const.LightBlue.."-hidespec1 <on/off>|r\n"..
|
||||
"|c"..Const.LightBlue.."-hidespec2 <on/off>|r\n"..
|
||||
"|c"..Const.LightBlue.."-hidespec3 <on/off>|r\n"..
|
||||
"|c"..Const.LightBlue.."-hidespec4 <on/off>|r\n"..
|
||||
"|c"..Const.LightBlue.."-hidevehicle <on/off>|r\n"..
|
||||
"|c"..Const.LightBlue.."-hideoverridebar <on/off>|r\n"..
|
||||
"|c"..Const.LightBlue.."-hidepetbattle <on/off>|r\n"..
|
||||
"|c"..Const.LightBlue.."-vismacro <visibility macro>|r\n"..
|
||||
"|c"..Const.LightBlue.."-gui <on/off>|r (off = hides bar without disabling keybinds)\n"..
|
||||
"|c"..Const.LightBlue.."-alpha <opacity>|r (0 - 1, 1 is completely opaque)\n"..
|
||||
"|c"..Const.LightBlue.."-enabled <on/off>|r\n"..
|
||||
"|c"..Const.LightBlue.."-info|r\n"..
|
||||
"|c"..Const.LightBlue.."-technicalinfo|r\n"..
|
||||
"|c"..Const.LightBlue.."-createbar <bar name>|r\n"..
|
||||
"|c"..Const.LightBlue.."-destroybar <bar name>|r\n"..
|
||||
"|c"..Const.LightBlue.."-saveprofile <profile name>|r\n"..
|
||||
"|c"..Const.LightBlue.."-loadprofile <profile name>|r\n"..
|
||||
"|c"..Const.LightBlue.."-loadprofiletemplate <profile name>|r\n"..
|
||||
"|c"..Const.LightBlue.."-undoprofile|r\n"..
|
||||
"|c"..Const.LightBlue.."-deleteprofile <profile name>|r\n"..
|
||||
"|c"..Const.LightBlue.."-listprofiles|r\n"..
|
||||
"|c"..Const.LightBlue.."-macrocheckdelay <number>|r (5 seconds is default) \n"..
|
||||
"|c"..Const.LightBlue.."-removemissingmacros <on/off>|r\n"..
|
||||
"|c"..Const.LightBlue.."-forceoffcastonkeydown <on/off>|r (will apply at next login)\n"..
|
||||
"|c"..Const.LightBlue.."-usecollectionsfavoritemountbutton <on/off>|r\n"..
|
||||
"|c"..Const.LightBlue.."-globalsettings|r\n"..
|
||||
"Examples:\n"..
|
||||
"|c"..Const.LightBlue.."/bufo -bar Mounts -tooltips off -emptybuttons off -scale 0.75|r\n"..
|
||||
"|c"..Const.LightBlue.."/bufo -macrotext off|r\n"..
|
||||
"|c"..Const.LightBlue.."/bufo -createbar MyNewBar -coords 800, 200 -rows 10 -cols 1|r\n"..
|
||||
"|c"..Const.LightBlue.."/bufo -bar MyNewBar -info|r";
|
||||
|
||||
|
||||
Locale["SlashCommandRequired"] = "<COMMANDA> requires <COMMANDB> to also be specified";
|
||||
Locale["SlashCommandIncompatible"] = "<COMMANDA> is incompatible with <COMMANDB>";
|
||||
Locale["SlashCommandAlone"] = "<COMMANDA> cannot be used with other commands";
|
||||
|
||||
Locale["SlashBarNameRequired"] =
|
||||
[[ButtonForge slash command failed:
|
||||
You must specify -bar if using any of the following commands: -rows, -cols, -coords, -rename, -info
|
||||
]];
|
||||
|
||||
Locale["SlashCreateBarRule"] =
|
||||
[[ButtonForge slash command failed:
|
||||
-createbar cannot be used with -bar
|
||||
]];
|
||||
|
||||
Locale["SlashCreateBarFailed"] =
|
||||
[[ButtonForge slash command failed:
|
||||
-createbar failed to create a new bar
|
||||
]];
|
||||
|
||||
Locale["SlashDestroyBarRule"] =
|
||||
[[ButtonForge slash command failed:
|
||||
-destroybar cannot be used with other commands
|
||||
]];
|
||||
|
||||
Locale["SlashAlphaRule"] =
|
||||
[[ButtonForge slash command failed:
|
||||
-alpha value must be in the range of 0.0 - 1.0
|
||||
]];
|
||||
|
||||
Locale["SlashGlobalSettingsRule"] =
|
||||
[[ButtonForge slash command failed:
|
||||
-globalsettings cannot be used with other commands
|
||||
]];
|
||||
|
||||
Locale["SlashCommandNotRecognised"] =
|
||||
[[ButtonForge slash command failed:
|
||||
Command not recognised: ]];
|
||||
|
||||
Locale["SlashParamsInvalid"] =
|
||||
[[ButtonForge slash command failed:
|
||||
Invalid params for command: ]];
|
||||
|
||||
|
||||
|
||||
|
||||
--Used when displaying info for the Bar via the slash command /bufo -info
|
||||
Locale["InfoLabel"] = "Label";
|
||||
Locale["InfoRowsCols"] = "Rows, Cols";
|
||||
Locale["InfoScale"] = "Scale";
|
||||
Locale["InfoCoords"] = "Coords";
|
||||
Locale["InfoTooltips"] = "Tooltips";
|
||||
Locale["InfoEmptyGrid"] = "Empty Buttons";
|
||||
Locale["InfoLock"] = "Button Lock";
|
||||
Locale["InfoHSpec1"] = "Visibility for Spec 1";
|
||||
Locale["InfoHSpec2"] = "Visibility for Spec 2";
|
||||
Locale["InfoHSpec3"] = "Visibility for Spec 3";
|
||||
Locale["InfoHSpec4"] = "Visibility for Spec 4";
|
||||
Locale["InfoHVehicle"] = "Visibility in Vehicle";
|
||||
Locale["InfoHBonusBar5"] = "Visibility when Override Bar active";
|
||||
Locale["InfoHPetBattle"] = "Visibility when in a Pet Battle";
|
||||
Locale["InfoVisibilityMacro"] = "Visibility Macro";
|
||||
Locale["InfoGUI"] = "GUI";
|
||||
Locale["InfoAlpha"] = "Alpha";
|
||||
Locale["InfoMacroText"] = "Macro Label";
|
||||
Locale["InfoKeybindText"] = "Keybind Label";
|
||||
Locale["InfoEnabled"] = "Bar";
|
||||
Locale["InfoGap"] = "Button Gap";
|
||||
Locale["InfoMacroCheckDelay"] = "Macro Check Delay";
|
||||
Locale["InfoUseCollectionsFavoriteMountButton"] = "Use the Collections Favorite Mount Button";
|
||||
Locale["InfoRemoveMissingMacros"] = "Remove Missing Macros";
|
||||
Locale["InfoForceOffCastOnKeyDown"] = "Force Off Cast On Key Down";
|
||||
Locale["InfoButtonFrameName"] = "Button Frame Named";
|
||||
|
||||
-- Header for the profiles list
|
||||
Locale["BFProfiles"] = "Button Forge Profiles";
|
||||
|
||||
Locale["SavedProfile"] = "Button Forge saved profile";
|
||||
Locale["LoadedProfile"] = "Button Forge loaded profile";
|
||||
Locale["LoadedProfileTemplate"] = "Button Forge loaded profile template";
|
||||
Locale["UndoneProfile"] = "Button Forge undid profile";
|
||||
Locale["DeletedProfile"] = "Button Forge deleted profile";
|
||||
|
|
@ -0,0 +1,53 @@
|
|||
--[[
|
||||
Author: Alternator (Massiner of Nathrezim)
|
||||
Translator: chkid (주시자의눈 of Elune)
|
||||
Copyright 2010
|
||||
|
||||
Notes: Primary locale (will be used if a particular locale is not loaded)
|
||||
|
||||
--]]
|
||||
|
||||
|
||||
BFLocales["koKR"] = {};
|
||||
local Locale = BFLocales["koKR"];
|
||||
|
||||
local Const = BFConst;
|
||||
|
||||
Locale["ScaleTooltip"] = "크기\n|c"..Const.LightBlue.."(더블클릭으로 초기화)|r";
|
||||
Locale["ColsTooltip"] = "버튼 행 추가/제거";
|
||||
Locale["RowsTooltip"] = "버튼 열 추가/제거";
|
||||
Locale["GridTooltip"] = "빈 버튼 가시성\n";
|
||||
Locale["TooltipsTooltip"] = "툴팁 가시성\n";
|
||||
Locale["ButtonLockTooltip"] = "액션 버튼 잠금\n";
|
||||
Locale["HideVehicleTooltip"] = "탈것 탑승시 바 숨김\n";
|
||||
Locale["HideSpec1Tooltip"] = "1번 특성일 때 바 숨김\n";
|
||||
Locale["HideSpec2Tooltip"] = "2번 특성일 때 바 숨김\n";
|
||||
Locale["HideSpec3Tooltip"] = "3번 특성일 때 바 숨김\n";
|
||||
Locale["HideSpec4Tooltip"] = "4번 특성일 때 바 숨김\n";
|
||||
Locale["HideBonusBarTooltip"] = "보너스바면 바 숨김:5개 활성화\n";
|
||||
Locale["SendToBackTooltip"] = "바 뒤로 보내기";
|
||||
Locale["SendToFrontTooltip"] = "바 앞으로 보내기";
|
||||
Locale["VisibilityTooltip"] = "매크로 가시성\n";
|
||||
Locale["VisibilityEgTooltip"] = "예제. |c"..Const.LightBlue.."[combat] hide; show|r"; --Appended to the Visibility tooltip if no driver is set for that bar
|
||||
Locale["KeyBindModeTooltip"] = "단축키";
|
||||
Locale["LabelModeTooltip"] = "바 제목 엔터/수정";
|
||||
Locale["AdvancedToolsTooltip"] = "고급 바 설정 옵션";
|
||||
Locale["DestroyBarTooltip"] = "바 제거";
|
||||
Locale["CreateBarTooltip"] = "바 생성";
|
||||
Locale["CreateBonusBarTooltip"] = "보너스바 생성\n|c"..Const.LightBlue.."(특정 싸움에서의 특수 기술, 탈것, 귀속에 대한 것)|r";
|
||||
Locale["RightClickSelfCastTooltip"] = "우 클릭 자신 시전\n"
|
||||
Locale["ConfigureModePrimaryTooltip"] = "Button Forge 바 설정\n팁: |c"..Const.LightBlue.."BF 바를 드래그할 수 있음|r";
|
||||
Locale["ConfigureModeTooltip"] = "Button Forge 바 설정";
|
||||
Locale["BonusActionTooltip"] = "보너스 바 액션";
|
||||
Locale["Shown"] = "|c"..Const.DarkOrange.."숨기지 않음|r";
|
||||
Locale["Hidden"] = "|c"..Const.DarkOrange.."숨김|r";
|
||||
Locale["Locked"] = "|c"..Const.DarkOrange.."고정됨|r";
|
||||
Locale["Unlocked"] = "|c"..Const.DarkOrange.."고정안됨|r";
|
||||
Locale["Enabled"] = "|c"..Const.DarkOrange.."사용함|r";
|
||||
Locale["Disabled"] = "|c"..Const.DarkOrange.."사용안함|r";
|
||||
Locale["CancelPossessionTooltip"] = "귀속 취소";
|
||||
Locale["UpgradedChatMsg"] = "Button Forge로 저장된 데이터 업그레이드됨: ";
|
||||
Locale["DisableAutoAlignmentTooltip"] = "'Shift'를 누르고 드래그하는 동안 자동-정렬 비활성화";
|
||||
|
||||
--Warning/error messages
|
||||
Locale["CreateBonusBarError"] = "Button Forge 설정 모드에서만 완료할 수 있습니다.";
|
|
@ -0,0 +1,53 @@
|
|||
--[[
|
||||
Author: Alternator (Massiner of Nathrezim)
|
||||
Translator: Another
|
||||
Copyright 2010
|
||||
|
||||
Notes: russian locale
|
||||
|
||||
--]]
|
||||
|
||||
|
||||
BFLocales["ruRU"] = {};
|
||||
local Locale = BFLocales["ruRU"];
|
||||
|
||||
local Const = BFConst;
|
||||
|
||||
Locale["ScaleTooltip"] = "Масштаб\n|c"..Const.LightBlue.."(Двойной щелчок для значения по умолчанию)|r";
|
||||
Locale["ColsTooltip"] = "Добавить/удалить столбик кнопок";
|
||||
Locale["RowsTooltip"] = "Добавить/удалить линейку кнопок";
|
||||
Locale["GridTooltip"] = "Показ пустых кнопок\n";
|
||||
Locale["TooltipsTooltip"] = "Показ подсказок\n";
|
||||
Locale["ButtonLockTooltip"] = "Запрет изменения кнопок\n";
|
||||
Locale["HideVehicleTooltip"] = "Прятать панель на средстве передвижения\n";
|
||||
Locale["HideSpec1Tooltip"] = "Прятать панель для талантов 1\n";
|
||||
Locale["HideSpec2Tooltip"] = "Прятать панель для талантов 2\n";
|
||||
Locale["HideSpec3Tooltip"] = "Прятать панель для талантов 3\n";
|
||||
Locale["HideSpec4Tooltip"] = "Прятать панель для талантов 4\n";
|
||||
Locale["HideBonusBarTooltip"] = "Прятать панель когда бонус панель:5 активна\n";
|
||||
Locale["SendToBackTooltip"] = "Панель на задний план";
|
||||
Locale["SendToFrontTooltip"] = "Панель на передний план";
|
||||
Locale["VisibilityTooltip"] = "Макро видимости\n";
|
||||
Locale["VisibilityEgTooltip"] = "например |c"..Const.LightBlue.."[combat] hide; show|r"; --Appended to the Visibility tooltip if no driver is set for that bar
|
||||
Locale["KeyBindModeTooltip"] = "Привязки кнопок";
|
||||
Locale["LabelModeTooltip"] = "Ввести/редактировать название панели";
|
||||
Locale["AdvancedToolsTooltip"] = "Дополнительные опции конфигурации панели";
|
||||
Locale["DestroyBarTooltip"] = "Удалить панель";
|
||||
Locale["CreateBarTooltip"] = "Создать панель";
|
||||
Locale["CreateBonusBarTooltip"] = "Создать бонус панель\n|c"..Const.LightBlue.."(Для владения, средств передвижения и специальных возможностей во время боя)|r";
|
||||
Locale["RightClickSelfCastTooltip"] = "Правый щелчок мыши для заклинания на себя\n"
|
||||
Locale["ConfigureModePrimaryTooltip"] = "Button Forge конфигурация панели\nTip: |c"..Const.LightBlue.."Можно перетащить на BF панель|r";
|
||||
Locale["ConfigureModeTooltip"] = "Button Forge конфигурация панели";
|
||||
Locale["BonusActionTooltip"] = "Действие бонус панели";
|
||||
Locale["Shown"] = "|c"..Const.DarkOrange.."Не прятать|r";
|
||||
Locale["Hidden"] = "|c"..Const.DarkOrange.."Прятать|r";
|
||||
Locale["Locked"] = "|c"..Const.DarkOrange.."Запрет изменений|r";
|
||||
Locale["Unlocked"] = "|c"..Const.DarkOrange.."Нет запрета изменений|r";
|
||||
Locale["Enabled"] = "|c"..Const.DarkOrange.."Включено|r";
|
||||
Locale["Disabled"] = "|c"..Const.DarkOrange.."Выключено|r";
|
||||
Locale["CancelPossessionTooltip"] = "Прервать владение";
|
||||
Locale["UpgradedChatMsg"] = "Button Forge сохраненные данные обновлены до: ";
|
||||
Locale["DisableAutoAlignmentTooltip"] = "Удерживайте 'Shift' при перетаскивании для выключения автовыравнивания";
|
||||
|
||||
--Warning/error messages
|
||||
Locale["CreateBonusBarError"] = "Можно делать только в режиме конфигурации.";
|
|
@ -0,0 +1,177 @@
|
|||
--[[
|
||||
Author: Alternator (Massiner of Nathrezim)
|
||||
Translator: s.F
|
||||
Copyright 2010
|
||||
|
||||
Notes: Primary locale (will be used if a particular locale is not loaded)
|
||||
|
||||
--]]
|
||||
|
||||
|
||||
BFLocales["zhCN"] = {};
|
||||
local Locale = BFLocales["zhCN"];
|
||||
|
||||
local Const = BFConst;
|
||||
|
||||
Locale["ScaleTooltip"] = "缩放\n|c"..Const.LightBlue.."(双击还原默认大小)|r";
|
||||
Locale["ColsTooltip"] = "添加/移除列";
|
||||
Locale["RowsTooltip"] = "添加/移除行";
|
||||
Locale["GridTooltip"] = "隐藏空按钮\n";
|
||||
Locale["TooltipsTooltip"] = "显示鼠标提示\n";
|
||||
Locale["ButtonLockTooltip"] = "锁定按钮\n";
|
||||
Locale["HideVehicleTooltip"] = "进入载具时隐藏按钮\n";
|
||||
Locale["HideSpec1Tooltip"] = "使用天赋1时隐藏按钮\n";
|
||||
Locale["HideSpec2Tooltip"] = "使用天赋2时隐藏按钮\n";
|
||||
Locale["HideBonusBarTooltip"] = "额外动作条5激活时隐藏本动作条\n";
|
||||
Locale["SendToBackTooltip"] = "动作条层级靠后";
|
||||
Locale["SendToFrontTooltip"] = "动作条层级靠前";
|
||||
Locale["VisibilityTooltip"] = "宏控制动作条显示\n";
|
||||
Locale["VisibilityEgTooltip"] = "例如 |c"..Const.LightBlue.."[combat] hide; show|r"; --Appended to the Visibility tooltip if no driver is set for that bar
|
||||
Locale["KeyBindModeTooltip"] = "设定快捷键";
|
||||
Locale["LabelModeTooltip"] = "编辑动作条标签";
|
||||
Locale["AdvancedToolsTooltip"] = "高级选项设置";
|
||||
Locale["DestroyBarTooltip"] = "移除动作条";
|
||||
Locale["CreateBarTooltip"] = "新建动作条";
|
||||
Locale["CreateBonusBarTooltip"] = "新建额外动作条\n|c"..Const.LightBlue.."(用于控制载具与特殊宠物)|r";
|
||||
Locale["RightClickSelfCastTooltip"] = "右键点击为自我施法\n"
|
||||
Locale["ConfigureModePrimaryTooltip"] = "Button Forge动作条设置模式\n提示: |c"..Const.LightBlue.."可以将此按钮拖到BF动作条上|r";
|
||||
Locale["ConfigureModeTooltip"] = "Button Forge动作条设置模式";
|
||||
Locale["BonusActionTooltip"] = "额外动作条";
|
||||
Locale["Shown"] = "|c"..Const.DarkOrange.."显示|r";
|
||||
Locale["Hidden"] = "|c"..Const.DarkOrange.."隐藏|r";
|
||||
Locale["Locked"] = "|c"..Const.DarkOrange.."锁定|r";
|
||||
Locale["Unlocked"] = "|c"..Const.DarkOrange.."解锁|r";
|
||||
Locale["Enabled"] = "|c"..Const.DarkOrange.."启用|r";
|
||||
Locale["Disabled"] = "|c"..Const.DarkOrange.."禁用|r";
|
||||
Locale["CancelPossessionTooltip"] = "取消控制";
|
||||
Locale["UpgradedChatMsg"] = "Button Forge Saved Data Upgraded to: ";
|
||||
Locale["DisableAutoAlignmentTooltip"] = "按住'Shift'拖动以禁用自动停靠";
|
||||
|
||||
--Warning/error messages
|
||||
Locale["CreateBonusBarError"] = "只能在动作条设置模式下生效.";
|
||||
|
||||
|
||||
|
||||
--The following are used for slash commands (only use lower case for the values!)
|
||||
Locale["SlashButtonForge1"] = "/buttonforge"; --these two identifiers probably shouldn't change for different locales, but if need be they can be
|
||||
Locale["SlashButtonForge2"] = "/bufo";
|
||||
|
||||
|
||||
--This BoolTable is used to allow more than one value for true or false, in this case the keys should be changed to be suitable for the locale (as many or few as desired)
|
||||
--The keys are matched against user input to see if the user specified true or false (or nil)... e.g. if the user typed in 'y' then the below table would map to true. (only use lower case)
|
||||
Locale.BoolTable = {};
|
||||
Locale.BoolTable["yes"] = true;
|
||||
Locale.BoolTable["no"] = false;
|
||||
|
||||
Locale.BoolTable["true"] = true;
|
||||
Locale.BoolTable["false"] = false;
|
||||
|
||||
Locale.BoolTable["y"] = true;
|
||||
Locale.BoolTable["n"] = false;
|
||||
|
||||
Locale.BoolTable["on"] = true;
|
||||
Locale.BoolTable["off"] = false;
|
||||
|
||||
Locale.BoolTable["1"] = true;
|
||||
Locale.BoolTable["0"] = false;
|
||||
|
||||
--Instructions for using the slash commands
|
||||
Locale["SlashHelpFormatted"] =
|
||||
"ButtonForge 命令行指定:\n"..
|
||||
"调出命令行: |c"..Const.LightBlue.."/buttonforge|r, |c"..Const.LightBlue.."/bufo|r\n"..
|
||||
"扩展指令:\n"..
|
||||
"|c"..Const.LightBlue.."-bar <bar name>|r (the bar to apply changes to, or if not set then all bars)\n"..
|
||||
"|c"..Const.LightBlue.."-rename <new name>|r\n"..
|
||||
"|c"..Const.LightBlue.."-rows <number>|r\n"..
|
||||
"|c"..Const.LightBlue.."-cols <number>|r\n"..
|
||||
"|c"..Const.LightBlue.."-scale <size>|r (1 is normal scale)\n"..
|
||||
"|c"..Const.LightBlue.."-gap <size>|r (6 is normal gap)\n"..
|
||||
"|c"..Const.LightBlue.."-coords <left> <top>|r\n"..
|
||||
"|c"..Const.LightBlue.."-tooltips <on/off>|r\n"..
|
||||
"|c"..Const.LightBlue.."-emptybuttons <on/off>|r\n"..
|
||||
"|c"..Const.LightBlue.."-lockbuttons <on/off>|r\n"..
|
||||
"|c"..Const.LightBlue.."-macrotext <on/off>|r\n"..
|
||||
"|c"..Const.LightBlue.."-keybindtext <on/off>|r\n"..
|
||||
"|c"..Const.LightBlue.."-hidespec1 <on/off>|r\n"..
|
||||
"|c"..Const.LightBlue.."-hidespec2 <on/off>|r\n"..
|
||||
"|c"..Const.LightBlue.."-hidespec3 <on/off>|r\n"..
|
||||
"|c"..Const.LightBlue.."-hidespec4 <on/off>|r\n"..
|
||||
"|c"..Const.LightBlue.."-hidevehicle <on/off>|r\n"..
|
||||
"|c"..Const.LightBlue.."-hideoverridebar <on/off>|r\n"..
|
||||
"|c"..Const.LightBlue.."-hidepetbattle <on/off>|r\n"..
|
||||
"|c"..Const.LightBlue.."-vismacro <visibility macro>|r\n"..
|
||||
"|c"..Const.LightBlue.."-gui <on/off>|r (off = hides bar without disabling keybinds)\n"..
|
||||
"|c"..Const.LightBlue.."-alpha <opacity>|r (0 - 1, 1 is completely opaque)\n"..
|
||||
"|c"..Const.LightBlue.."-enabled <on/off>|r\n"..
|
||||
"|c"..Const.LightBlue.."-info|r\n"..
|
||||
"|c"..Const.LightBlue.."-technicalinfo|r\n"..
|
||||
"|c"..Const.LightBlue.."-createbar <bar name>|r\n"..
|
||||
"|c"..Const.LightBlue.."-destroybar <bar name>|r\n"..
|
||||
"|c"..Const.LightBlue.."-saveprofile <profile name>|r\n"..
|
||||
"|c"..Const.LightBlue.."-loadprofile <profile name>|r\n"..
|
||||
"|c"..Const.LightBlue.."-loadprofiletemplate <profile name>|r\n"..
|
||||
"|c"..Const.LightBlue.."-undoprofile|r\n"..
|
||||
"|c"..Const.LightBlue.."-deleteprofile <profile name>|r\n"..
|
||||
"|c"..Const.LightBlue.."-listprofiles|r\n"..
|
||||
"|c"..Const.LightBlue.."-macrocheckdelay <number>|r (5 seconds is default) \n"..
|
||||
"|c"..Const.LightBlue.."-removemissingmacros <on/off>|r\n"..
|
||||
"|c"..Const.LightBlue.."-forceoffcastonkeydown <on/off>|r (will apply at next login)\n"..
|
||||
"|c"..Const.LightBlue.."-usecollectionsfavoritemountbutton <on/off>|r\n"..
|
||||
"|c"..Const.LightBlue.."-globalsettings|r\n"..
|
||||
"例子:\n"..
|
||||
"|c"..Const.LightBlue.."/bufo -bar Mounts -tooltips off -emptybuttons off -scale 0.75|r\n"..
|
||||
"|c"..Const.LightBlue.."/bufo -macrotext off|r\n"..
|
||||
"|c"..Const.LightBlue.."/bufo -createbar MyNewBar -coords 800, 200 -rows 10 -cols 1|r\n"..
|
||||
"|c"..Const.LightBlue.."/bufo -bar MyNewBar -info|r";
|
||||
|
||||
|
||||
Locale["SlashBarNameRequired"] =
|
||||
[[ButtonForge slash command failed:
|
||||
You must specify -bar if using any of the following commands: -rows, -cols, -coords, -rename, -info
|
||||
]];
|
||||
|
||||
Locale["SlashCreateBarRule"] =
|
||||
[[ButtonForge slash command failed:
|
||||
-createbar cannot be used with -bar
|
||||
]];
|
||||
|
||||
Locale["SlashCreateBarFailed"] =
|
||||
[[ButtonForge slash command failed:
|
||||
-createbar failed to create a new bar
|
||||
]];
|
||||
|
||||
Locale["SlashDestroyBarRule"] =
|
||||
[[ButtonForge slash command failed:
|
||||
-destroybar cannot be used with other commands
|
||||
]];
|
||||
|
||||
Locale["SlashCommandNotRecognised"] =
|
||||
[[ButtonForge slash command failed:
|
||||
Command not recognised: ]];
|
||||
|
||||
Locale["SlashParamsInvalid"] =
|
||||
[[ButtonForge slash command failed:
|
||||
Invalid params for command: ]];
|
||||
|
||||
|
||||
|
||||
|
||||
--Used when displaying info for the Bar via the slash command /bufo -info
|
||||
Locale["InfoLabel"] = "标签";
|
||||
Locale["InfoRowsCols"] = "行, 列";
|
||||
Locale["InfoScale"] = "缩放";
|
||||
Locale["InfoCoords"] = "坐标";
|
||||
Locale["InfoTooltips"] = "鼠标提示";
|
||||
Locale["InfoEmptyGrid"] = "空按钮";
|
||||
Locale["InfoLock"] = "按钮锁定";
|
||||
Locale["InfoHSpec1"] = "天赋1时可见";
|
||||
Locale["InfoHSpec2"] = "天赋2时可见";
|
||||
Locale["InfoHSpec3"] = "天赋3时可见";
|
||||
Locale["InfoHSpec4"] = "天赋4时可见";
|
||||
Locale["InfoHVehicle"] = "进入载具时看见";
|
||||
Locale["InfoHBonusBar5"] = "额外动作条5激活时可见";
|
||||
Locale["InfoVisibilityMacro"] = "宏可见";
|
||||
Locale["InfoMacroText"] = "宏标签";
|
||||
Locale["InfoKeybindText"] = "快捷键标签";
|
||||
Locale["InfoEnabled"] = "动作条";
|
||||
Locale["InfoGap"] = "按钮间隔";
|
|
@ -0,0 +1,179 @@
|
|||
--[[
|
||||
Author: Alternator (Massiner of Nathrezim)
|
||||
Translator: moripi
|
||||
Copyright 2010
|
||||
|
||||
Notes: Primary locale (will be used if a particular locale is not loaded)
|
||||
|
||||
--]]
|
||||
|
||||
|
||||
BFLocales["zhTW"] = {};
|
||||
local Locale = BFLocales["zhTW"];
|
||||
|
||||
local Const = BFConst;
|
||||
|
||||
Locale["ScaleTooltip"] = "縮放\n|c"..Const.LightBlue.."(雙擊還原預設大小)|r";
|
||||
Locale["ColsTooltip"] = "新增/移除列";
|
||||
Locale["RowsTooltip"] = "新增/移除行";
|
||||
Locale["GridTooltip"] = "隱藏空按鈕\n";
|
||||
Locale["TooltipsTooltip"] = "顯示提示\n";
|
||||
Locale["ButtonLockTooltip"] = "鎖定按鈕\n";
|
||||
Locale["HideVehicleTooltip"] = "進入載具時隱藏按鈕\n";
|
||||
Locale["HideSpec1Tooltip"] = "使用主天賦時隱藏按鈕\n";
|
||||
Locale["HideSpec2Tooltip"] = "使用副天賦時隱藏按鈕\n";
|
||||
Locale["HideSpec3Tooltip"] = "使用副天賦時隱藏按鈕\n";
|
||||
Locale["HideSpec4Tooltip"] = "使用副天賦時隱藏按鈕\n";
|
||||
Locale["HideBonusBarTooltip"] = "額外動作條5啟用時隱藏本動作條\n";
|
||||
Locale["SendToBackTooltip"] = "動作條層級靠後";
|
||||
Locale["SendToFrontTooltip"] = "動作條層級靠前";
|
||||
Locale["VisibilityTooltip"] = "宏控制動作條顯示\n";
|
||||
Locale["VisibilityEgTooltip"] = "例如 |c"..Const.LightBlue.."[combat] hide; show|r"; --Appended to the Visibility tooltip if no driver is set for that bar
|
||||
Locale["KeyBindModeTooltip"] = "設定快捷鍵";
|
||||
Locale["LabelModeTooltip"] = "編輯動作條標籤";
|
||||
Locale["AdvancedToolsTooltip"] = "進階選項設置";
|
||||
Locale["DestroyBarTooltip"] = "移除動作條";
|
||||
Locale["CreateBarTooltip"] = "新建動作條";
|
||||
Locale["CreateBonusBarTooltip"] = "新建額外動作條\n|c"..Const.LightBlue.."(用於控制載具與特殊寵物)|r";
|
||||
Locale["RightClickSelfCastTooltip"] = "右鍵點擊為自我施法\n"
|
||||
Locale["ConfigureModePrimaryTooltip"] = "Button Forge動作條設置模式\n提示: |c"..Const.LightBlue.."可以將此按鈕拖到BF動作條上|r";
|
||||
Locale["ConfigureModeTooltip"] = "Button Forge動作條設置模式";
|
||||
Locale["BonusActionTooltip"] = "額外動作條";
|
||||
Locale["Shown"] = "|c"..Const.DarkOrange.."顯示|r";
|
||||
Locale["Hidden"] = "|c"..Const.DarkOrange.."隱藏|r";
|
||||
Locale["Locked"] = "|c"..Const.DarkOrange.."鎖定|r";
|
||||
Locale["Unlocked"] = "|c"..Const.DarkOrange.."解鎖|r";
|
||||
Locale["Enabled"] = "|c"..Const.DarkOrange.."啟用|r";
|
||||
Locale["Disabled"] = "|c"..Const.DarkOrange.."禁用|r";
|
||||
Locale["CancelPossessionTooltip"] = "取消控制";
|
||||
Locale["UpgradedChatMsg"] = "Button Forge Saved Data Upgraded to: ";
|
||||
Locale["DisableAutoAlignmentTooltip"] = "按住'Shift'拖動以禁用自動停靠";
|
||||
|
||||
--Warning/error messages
|
||||
Locale["CreateBonusBarError"] = "只能在動作條設置模式下生效.";
|
||||
|
||||
|
||||
|
||||
--The following are used for slash commands (only use lower case for the values!)
|
||||
Locale["SlashButtonForge1"] = "/buttonforge"; --these two identifiers probably shouldn't change for different locales, but if need be they can be
|
||||
Locale["SlashButtonForge2"] = "/bufo";
|
||||
|
||||
|
||||
--This BoolTable is used to allow more than one value for true or false, in this case the keys should be changed to be suitable for the locale (as many or few as desired)
|
||||
--The keys are matched against user input to see if the user specified true or false (or nil)... e.g. if the user typed in 'y' then the below table would map to true. (only use lower case)
|
||||
Locale.BoolTable = {};
|
||||
Locale.BoolTable["yes"] = true;
|
||||
Locale.BoolTable["no"] = false;
|
||||
|
||||
Locale.BoolTable["true"] = true;
|
||||
Locale.BoolTable["false"] = false;
|
||||
|
||||
Locale.BoolTable["y"] = true;
|
||||
Locale.BoolTable["n"] = false;
|
||||
|
||||
Locale.BoolTable["on"] = true;
|
||||
Locale.BoolTable["off"] = false;
|
||||
|
||||
Locale.BoolTable["1"] = true;
|
||||
Locale.BoolTable["0"] = false;
|
||||
|
||||
--Instructions for using the slash commands
|
||||
Locale["SlashHelpFormatted"] =
|
||||
"ButtonForge 命令行指定:\n"..
|
||||
"調出命令行: |c"..Const.LightBlue.."/buttonforge|r, |c"..Const.LightBlue.."/bufo|r\n"..
|
||||
"擴展指令:\n"..
|
||||
"|c"..Const.LightBlue.."-bar <bar name>|r (the bar to apply changes to, or if not set then all bars)\n"..
|
||||
"|c"..Const.LightBlue.."-rename <new name>|r\n"..
|
||||
"|c"..Const.LightBlue.."-rows <number>|r\n"..
|
||||
"|c"..Const.LightBlue.."-cols <number>|r\n"..
|
||||
"|c"..Const.LightBlue.."-scale <size>|r (1 is normal scale)\n"..
|
||||
"|c"..Const.LightBlue.."-gap <size>|r (6 is normal gap)\n"..
|
||||
"|c"..Const.LightBlue.."-coords <left> <top>|r\n"..
|
||||
"|c"..Const.LightBlue.."-tooltips <on/off>|r\n"..
|
||||
"|c"..Const.LightBlue.."-emptybuttons <on/off>|r\n"..
|
||||
"|c"..Const.LightBlue.."-lockbuttons <on/off>|r\n"..
|
||||
"|c"..Const.LightBlue.."-macrotext <on/off>|r\n"..
|
||||
"|c"..Const.LightBlue.."-keybindtext <on/off>|r\n"..
|
||||
"|c"..Const.LightBlue.."-hidespec1 <on/off>|r\n"..
|
||||
"|c"..Const.LightBlue.."-hidespec2 <on/off>|r\n"..
|
||||
"|c"..Const.LightBlue.."-hidespec3 <on/off>|r\n"..
|
||||
"|c"..Const.LightBlue.."-hidespec4 <on/off>|r\n"..
|
||||
"|c"..Const.LightBlue.."-hidevehicle <on/off>|r\n"..
|
||||
"|c"..Const.LightBlue.."-hideoverridebar <on/off>|r\n"..
|
||||
"|c"..Const.LightBlue.."-hidepetbattle <on/off>|r\n"..
|
||||
"|c"..Const.LightBlue.."-vismacro <visibility macro>|r\n"..
|
||||
"|c"..Const.LightBlue.."-gui <on/off>|r (off = hides bar without disabling keybinds)\n"..
|
||||
"|c"..Const.LightBlue.."-alpha <opacity>|r (0 - 1, 1 is completely opaque)\n"..
|
||||
"|c"..Const.LightBlue.."-enabled <on/off>|r\n"..
|
||||
"|c"..Const.LightBlue.."-info|r\n"..
|
||||
"|c"..Const.LightBlue.."-technicalinfo|r\n"..
|
||||
"|c"..Const.LightBlue.."-createbar <bar name>|r\n"..
|
||||
"|c"..Const.LightBlue.."-destroybar <bar name>|r\n"..
|
||||
"|c"..Const.LightBlue.."-saveprofile <profile name>|r\n"..
|
||||
"|c"..Const.LightBlue.."-loadprofile <profile name>|r\n"..
|
||||
"|c"..Const.LightBlue.."-loadprofiletemplate <profile name>|r\n"..
|
||||
"|c"..Const.LightBlue.."-undoprofile|r\n"..
|
||||
"|c"..Const.LightBlue.."-deleteprofile <profile name>|r\n"..
|
||||
"|c"..Const.LightBlue.."-listprofiles|r\n"..
|
||||
"|c"..Const.LightBlue.."-macrocheckdelay <number>|r (5 seconds is default) \n"..
|
||||
"|c"..Const.LightBlue.."-removemissingmacros <on/off>|r\n"..
|
||||
"|c"..Const.LightBlue.."-forceoffcastonkeydown <on/off>|r (will apply at next login)\n"..
|
||||
"|c"..Const.LightBlue.."-usecollectionsfavoritemountbutton <on/off>|r\n"..
|
||||
"|c"..Const.LightBlue.."-globalsettings|r\n"..
|
||||
"例子:\n"..
|
||||
"|c"..Const.LightBlue.."/bufo -bar Mounts -tooltips off -emptybuttons off -scale 0.75|r\n"..
|
||||
"|c"..Const.LightBlue.."/bufo -macrotext off|r\n"..
|
||||
"|c"..Const.LightBlue.."/bufo -createbar MyNewBar -coords 800, 200 -rows 10 -cols 1|r\n"..
|
||||
"|c"..Const.LightBlue.."/bufo -bar MyNewBar -info|r";
|
||||
|
||||
|
||||
Locale["SlashBarNameRequired"] =
|
||||
[[ButtonForge slash command failed:
|
||||
You must specify -bar if using any of the following commands: -rows, -cols, -coords, -rename, -info
|
||||
]];
|
||||
|
||||
Locale["SlashCreateBarRule"] =
|
||||
[[ButtonForge slash command failed:
|
||||
-createbar cannot be used with -bar
|
||||
]];
|
||||
|
||||
Locale["SlashCreateBarFailed"] =
|
||||
[[ButtonForge slash command failed:
|
||||
-createbar failed to create a new bar
|
||||
]];
|
||||
|
||||
Locale["SlashDestroyBarRule"] =
|
||||
[[ButtonForge slash command failed:
|
||||
-destroybar cannot be used with other commands
|
||||
]];
|
||||
|
||||
Locale["SlashCommandNotRecognised"] =
|
||||
[[ButtonForge slash command failed:
|
||||
Command not recognised: ]];
|
||||
|
||||
Locale["SlashParamsInvalid"] =
|
||||
[[ButtonForge slash command failed:
|
||||
Invalid params for command: ]];
|
||||
|
||||
|
||||
|
||||
|
||||
--Used when displaying info for the Bar via the slash command /bufo -info
|
||||
Locale["InfoLabel"] = "標籤";
|
||||
Locale["InfoRowsCols"] = "行, 列";
|
||||
Locale["InfoScale"] = "縮放";
|
||||
Locale["InfoCoords"] = "坐標";
|
||||
Locale["InfoTooltips"] = "提示";
|
||||
Locale["InfoEmptyGrid"] = "空按鈕";
|
||||
Locale["InfoLock"] = "按鈕鎖定";
|
||||
Locale["InfoHSpec1"] = "可見人才";
|
||||
Locale["InfoHSpec2"] = "可見人才";
|
||||
Locale["InfoHSpec3"] = "可見人才";
|
||||
Locale["InfoHSpec4"] = "可見人才";
|
||||
Locale["InfoHVehicle"] = "進入載具時看見";
|
||||
Locale["InfoHBonusBar5"] = "額外動作條5啟用時可見";
|
||||
Locale["InfoVisibilityMacro"] = "巨集可見";
|
||||
Locale["InfoMacroText"] = "巨集標籤";
|
||||
Locale["InfoKeybindText"] = "快捷鍵標籤";
|
||||
Locale["InfoEnabled"] = "動作條";
|
||||
Locale["InfoGap"] = "按鈕間隔";
|
|
@ -0,0 +1,256 @@
|
|||
Button Forge
|
||||
Mod for World of Warcraft
|
||||
|
||||
Author: Massiner of Nathrezim
|
||||
Version: 0.9.47
|
||||
|
||||
Description: Graphically create as many Action Bars and Buttons in the game as you choose
|
||||
|
||||
Usage:
|
||||
- From the Button Forge Toolbar click the various buttons to enter into create/destroy bar mode
|
||||
- Advanced options will display additional advanced options for each Bar created (such as key bindings)
|
||||
- Drag the bars where you wish them to be placed
|
||||
- When you are happy with your layout close the Button Forge Toolbar to hide the configuration gui either via the Key Binding, the Addon Configuration page, or the Red X on the Toolbar
|
||||
- It is also possible to drag commands from the Button Forge Toolbar onto Button Forge bars, this is advisable for the Button Forge Configuration button
|
||||
- Pretty much all of the gui configuration options are available via /bufo or /buttonforge commands (type them without any parameters for a listing of options). In addition there are several advanced
|
||||
options only available via the / commands.
|
||||
|
||||
Restrictions:
|
||||
- Most (but not all) configuration options will not function during combat
|
||||
|
||||
|
||||
History:
|
||||
28-November-2016 v0.9.47 - Updated for WoW v7.1
|
||||
04-October-2016 v0.9.46 - Fixed Icon display for Equipment Sets... Again! (also some corrections for talents etc which were actually added in .45 I believe?!, my book keeping on this one has been a bit iffy :S)
|
||||
09-August-2016 v0.9.45 - Fixed Icon display for Equipment Sets on Button Forge
|
||||
01-August-2016 v0.9.44 - Fixed problem causing talent abilities to show up as '?'
|
||||
- Fixed BF load error affecting some players that utilise the profiles functionality
|
||||
- Effectively eliminated the few cases that Button Forge uses the /Run command removing the need to enable scripts to run (see notes below)
|
||||
- Summon Mounts, switched back to using a spell cast
|
||||
- Summon battlepets, now uses the /summonpet macro command
|
||||
- Exit vehicle, now uses /leavevehicle macro command
|
||||
- Cancel Possession, this button has been removed (the BF bonus bar typically does not appear for possession anyway, unless specifically setup to by the player)
|
||||
- Summon Favorite mount, this is coded to force load the Blizzard Collections addon, and /click the Favorite Mount button
|
||||
- Added a new global setting for Button Forge "-usecollectionsfavoritemountbutton" with the following behaviour
|
||||
- set False: Uses a /run command and will need scripts enabled by the player (advantage is it doesn't rely on the Blizzard Collections module so wont force load it)
|
||||
- set True: Uses a /click of the Favorite Button in the Collections Module, and forces it to load
|
||||
- On introduction of the setting
|
||||
- Defaults to False if allow dangerous scripts is already enabled by the player
|
||||
- Defaults to True if allow dangerous scripts is not enabled by the player
|
||||
- NOTE: Basically don't worry about this setting unless there is a very specific reason to alter it
|
||||
|
||||
25-July-2016 v0.9.43 - Added safety check for the mount to clear it if it's not properly detected
|
||||
- Fixed macrocheckdelay so that it doesn't cause an error (note this setting is not recommended to alter)
|
||||
|
||||
24-July-2016 v0.9.42 - Added support for toggling all specialisations on and off
|
||||
|
||||
24-July-2016 v0.9.41 - Updated for WoW v7.0
|
||||
- Updated how Mounts are handled (Bliz keep tinkering with the API in this area)
|
||||
|
||||
01-July-2015 v0.9.40 - Updated for WoW v6.2
|
||||
- Fixed issue with mounts - as the previous hack is no longer needed, and due to a slight change
|
||||
with GetCursorInfo became incompatible
|
||||
- Toys should now show up more correctly on BF bars
|
||||
- Battlepets should now have Tooltips
|
||||
- Added zhTW locale that was supplied by Moripi
|
||||
28-February-2015 v0.9.39 - Updated for WoW v6.1
|
||||
- Bars will not be clamped to screen in this version; due to clamp offsets becoming broken
|
||||
this will be reveresed at a later date when the clamp offsets work again
|
||||
22-October-2014 v0.9.38 - Character settings are backed up to the Global Save for Button Forge
|
||||
this is to get around a WoW Mac issue preventing some char settings from loading
|
||||
This change is temporary and will likely be removed once Blizzard correct the issue
|
||||
- Paladin Mounts can now be triggered from BF Buttons
|
||||
- The Edge Cooldown effect will now also hide if visibility for BF Bars is off
|
||||
- A problem was causing Button Forge to often lose Character specific macros from its Buttons
|
||||
when new macros were created or deleted - this should behave a lot better now
|
||||
18-October-2014 v0.9.37 - Corrected Cooldown Swipe/Bling when Buttons are partially or fully hidden
|
||||
- Corrected Priest Holy Word not being addable to Button Forge
|
||||
- For some people, Button Forge was erroring on login, this should be resolved
|
||||
16-October-2014 v0.9.36 - Corrected issue preventing ButtonForge loading when Battlepets were present (Battlepets use a new ID system and needed to be cleared)
|
||||
- Added migration code to also update data stored in ButtonForge profiles
|
||||
15-October-2014 v0.9.35 - Corrected issue with Macros that would prevent Button Forge working properly
|
||||
15-October-2014 v0.9.34 - Another Quick Update to get Button Forge working against v6.0.2 which just went live.
|
||||
- Mounts will now work
|
||||
25-August-2014 v0.9.33 - Quick and ROUGH update to get Button Forge functioning against Warlords of Draenor BETA
|
||||
- Adjusted SetChecked code
|
||||
- Adjusted Initialization of mount info (note that mounts and probably pets will not work correctly on BF at the moment)
|
||||
|
||||
|
||||
20-November-2013 v0.9.32 - Fixed unrecognised Flyout actions causing an error on when on BF bars (either from loading a profile, or from inherited settings from a prior same named character)
|
||||
- Also corrected issue that caused flyout actions to not correctly be put on the cursor when removed from BF bars
|
||||
20-September-2013 v0.9.31 - Added Profile support to Button Forge, only available via Slash commands
|
||||
* -saveprofile (saves the current setup as a profile for later use)
|
||||
* -loadprofile (loads a profile, along with all actions on the buttons - this can even be done for diff classes, the actions simply wont be recognised in some cases)
|
||||
* -loadprofiletemplate (loads a profile but all buttons are blanked, treating the profile as a template for other chars)
|
||||
* -undoprofile (reverts back to the setup prior to the last loadprofile, even if that was a previous session... note this itself can not be undone, so beware)
|
||||
* -deleteprofile (simply deletes a previously saved profile)
|
||||
* -listprofiles
|
||||
- Also updated to be WoW v5.4 compatible
|
||||
04-June-2013 v0.9.30 - Button Forge will now cast keybindings on the key down phase in the same manner the standard action buttons do, this behaviour is also toggled using the standard Interface-Combat option "Cast action keybinds on key down"*
|
||||
- * Added a new global setting for Button Forge "ForceOffCastOnKeyDown" that will override the above feature so that it is always off if desired, you must log back in for this setting to take effect
|
||||
(When ForceOffCastOnKeyDown is set, it will actually cause the original ButtonForge click handling pre v0.9.30 to apply)
|
||||
24-May-2013 v0.9.29 - Fixed issue in previous version preventing non-masque users from running Button Forge
|
||||
23-May-2013 v0.9.28 - Update to work against wow v5.3
|
||||
- Improved support of Masque skinning
|
||||
- Slightly update look of Buttons to match with the current style of the standard buttons in wow
|
||||
06-March-2013 v0.9.27 - Updated to work against wow v5.2 (no code changes)
|
||||
12-December-2012 v0.9.26 - More support for spell charges (particularly for the warlock demonology spells)
|
||||
- slash options that accept a yes/no will now also accept toggle
|
||||
09-December-2012 v0.9.25 - Button Forge will now display spell charges on its buttons when appropriate (this also applies if the spell is from a macro)
|
||||
- a new slash command -hidepetbattle allows making it so that Button Forge bars can stay visible during a pet battle (by turning that option for the bar off, by default it's on)
|
||||
|
||||
02-December-2012 v0.9.24 - Buttonf Forge has been updated for WoW v5.1
|
||||
- BattlePets have been updated to work with WoW v5.1
|
||||
|
||||
17-October-2012 v0.9.23 - BattlePets can now be added to Button Forge bars (tooltips are not yet available for them)
|
||||
- All Button Forge bars will hide during Pet Battles
|
||||
|
||||
09-September-2012 v0.9.22 - Fixed the bonus bar (now the override/vehicle bar) to function again
|
||||
- Dragging Button Forge custom icons will now no longer show a black box over the icon.
|
||||
|
||||
03-September-2012 v0.9.21 - Fixed bars to hide by default when the Override Bar becomes enabled (this used to be BonusBar:5)
|
||||
|
||||
28-August-2012 v0.9.20 - Updated for WoW v5.0.4
|
||||
Issues that were resolved for the updated WoW API:
|
||||
- Lua errors prevening Button Forge even working
|
||||
- Cooldown error for mounts and companion pets
|
||||
- Picking up spells wasn't working
|
||||
- Handling of dynamic spells was largely unusable
|
||||
|
||||
Still outstanding:
|
||||
- Now that pets are battle pets they can't be set or activated from Button Forge (your existing pets still show up and can be picked up and moved, but that's it)
|
||||
- Flyout spells (the one with the little arrow) is dropped rather than put on the cursor when removing from Button Forge
|
||||
- Also a minor graphic glitch that the little arrow sometimes doesn't show for the flyouts
|
||||
- dragging Button Forge specific actions (e.g. the open Button Forge config button) has a black square
|
||||
- Some code tidy up to remove redundant code (there are now better options to achieving some functionality)
|
||||
- Others???
|
||||
|
||||
|
||||
06-February-2012 v0.9.17 - Localisation Support for
|
||||
deDE Translation provided by Rumorix/PUNK2018
|
||||
|
||||
Fixed: Button Forge will now only show the action tooltip for a macro if the macro has the #showtooltip tag in it
|
||||
|
||||
Features:
|
||||
* New bar option 'GUI' available via /bufo commands, defaults to 'on'. Turning the gui off for a bar will cause it to be hidden and to no longer interact with the mouse
|
||||
but its keybindings will be unaffected (think of it as Key Bind only mode)
|
||||
The GUI will be temporarily forced 'on' provided you're not in combat, and are in Button Forge config mode, or are holding the Shift key while also have an item on the cursor (this is to ease setting the bar up how you want it)
|
||||
|
||||
* New bar option 'Alpha' available via /bufo commands, defaults to 1. This will simply change the opacity of the bar, the mouse will still interact with the bar, even if
|
||||
it's fully transparent (unlike the new 'GUI' option, the alpha will not be forced up when in config mode etc...)
|
||||
|
||||
11-December-2011 v0.9.16 - Updated toc to make Buttonf Forge Compatible with v4.3 of WoW
|
||||
Fixed:
|
||||
* Bars would bounce out a little when pushing right up against the left or bottom of the screen if the buttongap had been adjusted; this should no longer happen
|
||||
* Macros are still causing trouble for some users (hopefully only a small few), this occurs because the WoW API sometimes lags at loging with making the macro info available and simply reports the player has none (with seemingly no way to know if this has occurred; I had thought in the last update I found a reliable event to use). The following two changes have been added in an attempt to provide a lasting solution
|
||||
a) A 3second delay has now been introduced before ButtonForge prunes missing macros, the setting can be adjusted using /bufo -macrocheckdelay # (where # is the number of seconds), this will delay all macro checks so do not set this value extremely high or it will have unintended consequences (next version I will probably put an upper limit on it!)
|
||||
b) If a reliable delay time cant be found, use /bufo -removemissingmacros no. That will disable automatic pruning of missing macros, if you delete a macro, you will need to manually remove it from the bar in this scenerio - but it will be preferable to having them possibly dissappear at login
|
||||
|
||||
The following change has been made to allow some users familiar with how widgets in the WoW gui work to perform some external specialised customisations
|
||||
* The frame that controls visibility (not position) of the buttonforge bars buttons will now be given a frame name (relevant for some highly technical players). It works as follows:
|
||||
- Each bar will have a frame named something like ButtonForgeBar_<BarLabel>_ButtonFrame; where <BarLabel> is the label applied to the bar
|
||||
- If the full frame name is non unique, a number will be applied after the <BarLabel> to make it unique
|
||||
- The frame will almost definitely have a visibility macro (Button Forge utilises them quite a bit to avoid possible taint issues), Button Forge (currently) does not parent the ButtonFrame, so it will probably be ok to set this in order to have an external api/addon hide Button Forge bars with its own rules.
|
||||
- IMPORTANT; You will need to log out and back into the game world for the name of the Frame to be updated (the frame names cant be changed while playing the game)
|
||||
- For best results, give the bar a unique label if you wish to use the frame
|
||||
- to get the frame names use /bufo -technicalinfo (the ButtonFrame currently isn't given a size, so you wont have much luck with identifying it spatially)
|
||||
- Any given usage of the frame is unsupported
|
||||
|
||||
19-September-2011 v0.9.15 - Fixed: Macros were sometimes disappearing from Button Forge bars
|
||||
Feature: Localisation support for zhCN has been added - Translation provided by s.F
|
||||
|
||||
23-July-2011 v0.9.14 - Updated toc to make Button Forge compatible with v4.2 of WoW
|
||||
|
||||
28-April-2011 v0.9.13 - Features:
|
||||
* Many more of the configuration options are now available via slash commands
|
||||
* Added slash command to change the gap between buttons
|
||||
* Added slash command to disable and enable bars
|
||||
* Improved the feedback when slash commands are not correctly supplied
|
||||
* Added a basic API to allow other addons to query information from Button Forge
|
||||
Fixed:
|
||||
* Buttons weren't being properly deallocated when a bar was destroyed
|
||||
* In rare situations item caching in Button Forge was causing an error
|
||||
|
||||
16-January-2011 v0.9.12 - Features:
|
||||
* Slash commands are now available (/buttonforge or /bufo)
|
||||
* Slash commands include abiltity to turn off keybind and macro name plates
|
||||
* Holding shift will override button locks (same as the default UI)
|
||||
* Holding shift will bring Button Forge bars to the top if holding an item with the cursor
|
||||
Fixed:
|
||||
* Macros can now have the same name (although this is still not advised!)
|
||||
* Macro tracking will be a little more resilient (this affects when macros are changed). NB, this can never be perfect with the way the game currently works
|
||||
* Auto-alignement could sometimes have a lua error if other mods changed the default bars, this should not happen now
|
||||
* Spells with the same name would sometimes display as though they were the other spell, this should now be resolved
|
||||
|
||||
03-January-2011 v0.9.11 - Features:
|
||||
* Button Forge Buttons will come to the foreground when the mouse
|
||||
has a placeable action (except items) to make placing spells easier
|
||||
* Key-binding has been tweaked to be more streamlined
|
||||
* While dragging bars, auto-alignment will now work off all sides of the bar
|
||||
and also provide guide lines
|
||||
- Fixed:
|
||||
* Better detection of shapeshift has been added (this allows icons for
|
||||
macros with forms rules to visually update a bit more quickly in some cases)
|
||||
* Archaeology Buttons will now check and uncheck correctly
|
||||
|
||||
22-Decembet-2010 v0.9.10 - Feature:
|
||||
Localisation support for
|
||||
koKR Translation provided by chkid (주시자의눈 of Elune)
|
||||
ruRU Translation provided by Another
|
||||
- Fixed:
|
||||
ButtonFacade keybindings will not dissappear now
|
||||
Improved how wisp spell detection works (made it independant of localisation)
|
||||
|
||||
13-December-2010 v0.9.9 - Fixed: Corrected issue preventing binding of mouse buttons (note that the left and right button cannot be bound ever).
|
||||
- Feature: Button Facade support
|
||||
|
||||
18-October-2010 v0.9.8 - Fixed:
|
||||
Putting Companions and Mounts on the Bar was bugged, this has been fixed (any companions or mounts that are permanently highlighted should be removed and readded)
|
||||
|
||||
17-October-2010 v0.9.7 - Fixed:
|
||||
Work around the issue of some spells causing an issue when dragged onto the bar (issue was observed with hunter traps)
|
||||
- Feature:
|
||||
Support for Flyouts
|
||||
Support for Glow effect on certain spells
|
||||
|
||||
13-October-2010 v0.9.6 - Fixed:
|
||||
Macros that use items are having a problem with the cooldown display, this has been fixed.
|
||||
Picking up most items wasn't causing hidden button grids to show (while out of combat), this has also been fixed
|
||||
|
||||
12-October-2010 v0.9.5 - Fixed:
|
||||
Item counts will now show counts for items that use a consumable reagent
|
||||
Spells will no longer inadvertently change rank (a non issue now that v4 is available anyway)
|
||||
- Features:
|
||||
Updated to be compatible with v4.0.1
|
||||
|
||||
02-September-2010 v0.9.4 - Fixed:
|
||||
Creating a macro with an empty body or deleting a macro could sometimes cause visual errors in Button Forge, this has been resolved
|
||||
Tooltips for companions were dissappearing very quickly after displaying, this has been resolved
|
||||
|
||||
26-August-2010 v0.9.3 - Fixed:
|
||||
Tooltips now refresh while being displayed
|
||||
In some cases (particularly macros) item display was not updating, this has been resolved
|
||||
- Features:
|
||||
Bonus Bars are now supported
|
||||
A Right Click Self Casting option is now available
|
||||
|
||||
10-August-2010 v0.9.2 - Fixed:
|
||||
Scale - The Double Click default sometimes wouldn't detect the settings of a bar if one was in the same position, this has been resolved
|
||||
Dragging Custom Actions (Button Forge Configuration options) - These would sometimes drop straight off the cursor, this has been resolved
|
||||
Key Bind dialog has been shifted to appear above other UI elements (it is also possible to drag this dialog)
|
||||
- Features:
|
||||
Updated the GUI appearance
|
||||
Bar labels will now organise themselves for so they can be clicked to allow tabbing between bars if bars are in the same position
|
||||
Bar controls will now rearrange themselves to better use the space around the Action buttons
|
||||
|
||||
05-August-2010 v0.9.1 - Fixed:
|
||||
Equipment Sets will now be placed on the cursor when picked up off a Button Forge Bar
|
||||
Resolved stack overflow when creating excessively large bars (e.g. over 1000 buttons)
|
||||
Resolved issues causing some newly allocated buttons to be hidden and the bar to sometimes dissappear when allocating buttons
|
||||
- Features:
|
||||
Set a limit of 1500 buttons per bar and 5000 buttons total
|
||||
Added button for configuration mode
|
||||
Added ability to drag Button Forge Toolbar buttons to Button Forge bars
|
||||
Updated tooltip information
|
||||
|
||||
31-July-2010 v0.9.0 - Beta version of Button Forge
|
|
@ -0,0 +1,110 @@
|
|||
--[[
|
||||
Author: Alternator (Massiner of Nathrezim)
|
||||
Copyright 2010
|
||||
|
||||
Notes:
|
||||
]]
|
||||
|
||||
local UILib = BFUILib;
|
||||
|
||||
|
||||
|
||||
--[[
|
||||
This is a little (hack) utility to allow clicking a button/bar without actually triggering the buttons secure action, it is expected that whenever the mouse moves over a button
|
||||
that we need to click without triggering, this function will be called to position itself over the button to intercept the click
|
||||
--]]
|
||||
local ClickButtonMask = CreateFrame("BUTTON", nil, BFConfigureLayer);
|
||||
ClickButtonMask:Hide();
|
||||
ClickButtonMask:RegisterForClicks("LeftButtonUp", "RightButtonUp");
|
||||
ClickButtonMask.HLTexture = ClickButtonMask:CreateTexture();
|
||||
ClickButtonMask.HLTexture:SetPoint("TOPLEFT", ClickButtonMask, "TOPLEFT");
|
||||
ClickButtonMask.HLTexture:SetPoint("BOTTOMRIGHT", ClickButtonMask, "BOTTOMRIGHT");
|
||||
ClickButtonMask.Locked = false;
|
||||
ClickButtonMask.Inside = false;
|
||||
|
||||
|
||||
--Note that If a Right click function is not set, the primary callbackfunc will be called if right is clicked
|
||||
function UILib.SetMask(Ref, CallBackFunc, CallBackFuncRight, Widget, Cursor, HighlightTexture, TexCoords)
|
||||
if (Ref) then
|
||||
if (ClickButtonMask.Locked) then
|
||||
return;
|
||||
end
|
||||
ClickButtonMask.Ref = Ref;
|
||||
ClickButtonMask.CallBackFunc = CallBackFunc;
|
||||
ClickButtonMask.CallBackFuncRight = CallBackFuncRight;
|
||||
ClickButtonMask.Cursor = Cursor;
|
||||
|
||||
ClickButtonMask:SetParent(Widget); --I believe by setting the parent the strata and level are auto set
|
||||
ClickButtonMask:ClearAllPoints();
|
||||
ClickButtonMask:SetPoint("TOPLEFT", Widget, "TOPLEFT");
|
||||
ClickButtonMask:SetPoint("BOTTOMRIGHT", Widget, "BOTTOMRIGHT");
|
||||
ClickButtonMask:SetFrameLevel(Widget:GetFrameLevel() + 1);
|
||||
ClickButtonMask.HLTexture:SetTexture(HighlightTexture, true);
|
||||
ClickButtonMask.HLTexture:SetTexCoord(unpack(TexCoords));
|
||||
ClickButtonMask:Show();
|
||||
|
||||
else
|
||||
if (ClickButtonMask.Locked) then
|
||||
UILib.UnlockMask();
|
||||
end
|
||||
ClickButtonMask.Ref = nil;
|
||||
ClickButtonMask.CallBackFunc = nil;
|
||||
ClickButtonMask.CallBackFuncRight = nil;
|
||||
ClickButtonMask.Cursor = nil;
|
||||
|
||||
ClickButtonMask:SetParent(BFConfigureLayer);
|
||||
ClickButtonMask:ClearAllPoints();
|
||||
ClickButtonMask:Hide();
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
function UILib.LockMask()
|
||||
ClickButtonMask.Locked = true;
|
||||
end
|
||||
|
||||
|
||||
function UILib.UnlockMask()
|
||||
if (not ClickButtonMask.Inside) then
|
||||
ClickButtonMask.HLTexture:Hide();
|
||||
end
|
||||
ClickButtonMask.Locked = false;
|
||||
end
|
||||
|
||||
|
||||
function ClickButtonMask:OnClick(Button)
|
||||
if (Button == "RightButton") then
|
||||
if (self.CallBackFuncRight) then
|
||||
self.CallBackFuncRight(self.Ref);
|
||||
return;
|
||||
end
|
||||
end
|
||||
|
||||
if (self.CallBackFunc) then
|
||||
self.CallBackFunc(self.Ref);
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
function ClickButtonMask:OnEnter()
|
||||
self.HLTexture:Show();
|
||||
self.Inside = true;
|
||||
if (self.Cursor) then
|
||||
SetCursor(self.Cursor);
|
||||
else
|
||||
SetCursor(nil);
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
function ClickButtonMask:OnLeave()
|
||||
self.Inside = false;
|
||||
if (not self.Locked) then
|
||||
self.HLTexture:Hide();
|
||||
end
|
||||
SetCursor(nil);
|
||||
end
|
||||
ClickButtonMask:SetScript("OnEnter", ClickButtonMask.OnEnter);
|
||||
ClickButtonMask:SetScript("OnLeave", ClickButtonMask.OnLeave);
|
||||
ClickButtonMask:SetScript("OnClick", ClickButtonMask.OnClick);
|
|
@ -0,0 +1,7 @@
|
|||
--[[
|
||||
Author: Alternator (Massiner of Nathrezim)
|
||||
Copyright 2010
|
||||
|
||||
Notes:
|
||||
]]
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/ ..\FrameXML\UI.xsd">
|
||||
<Script file="UILibConfigPage.lua"/>
|
||||
|
||||
<Frame name="BFConfigPage" parent="UIParent">
|
||||
<Layers>
|
||||
<Layer level="ARTWORK">
|
||||
<FontString name="$parentTitle" inherits="GameFontNormalLarge" text="Button Forge">
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="16" y="-16" />
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</FontString>
|
||||
<FontString name="$parentVersion" inherits="GameFontDisableSmall" text="Button Forge">
|
||||
<Anchors>
|
||||
<Anchor point="BOTTOMLEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="16" y="16" />
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</FontString>
|
||||
</Layer>
|
||||
</Layers>
|
||||
<Scripts>
|
||||
<OnLoad>
|
||||
self.name = "Button Forge";
|
||||
InterfaceOptions_AddCategory(self);
|
||||
BFConfigPageVersion:SetText("Version "..BFConst.Version.."."..BFConst.VersionMinor);
|
||||
</OnLoad>
|
||||
</Scripts>
|
||||
<Frames>
|
||||
<Button name="$parentToolbarToggle" text="Show/Hide Button Forge Toolbar" inherits="UIPanelButtonTemplate, SecureHandlerBaseTemplate, SecureHandlerClickTemplate">
|
||||
<Size>
|
||||
<AbsDimension x="220" y="22" />
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="20" y="-48" />
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<Scripts>
|
||||
<OnLoad>
|
||||
SecureHandler_OnLoad(self);
|
||||
self:SetFrameRef("ConfigureLayer", BFConfigureLayer);
|
||||
self:SetAttribute("_onclick", [[local Configure = owner:GetFrameRef("ConfigureLayer");
|
||||
if (Configure:IsShown()) then
|
||||
Configure:Hide();
|
||||
else
|
||||
Configure:Show();
|
||||
end]]);
|
||||
</OnLoad>
|
||||
</Scripts>
|
||||
</Button>
|
||||
</Frames>
|
||||
</Frame>
|
||||
</Ui>
|
|
@ -0,0 +1,50 @@
|
|||
--[[
|
||||
Author: Alternator (Massiner of Nathrezim)
|
||||
Copyright 2010
|
||||
|
||||
Notes:
|
||||
]]
|
||||
|
||||
BFUILib = BFUILib or {}; local UILib = BFUILib;
|
||||
|
||||
|
||||
|
||||
function UILib.CreateButton(Parent, Width, Height, Point, NormalTexture, PushedTexture, CheckedTexture, HighlightTexture, Tooltip, OnClickScript, OMDScript, OMUScript, AnchorPoint)
|
||||
local Widget = CreateFrame("CHECKBUTTON", nil, Parent);
|
||||
Widget:SetSize(Width, Height);
|
||||
Widget:SetPoint(unpack(Point));
|
||||
Widget:SetNormalTexture(NormalTexture);
|
||||
Widget:SetPushedTexture(PushedTexture);
|
||||
Widget:SetCheckedTexture(CheckedTexture);
|
||||
Widget:SetHighlightTexture(HighlightTexture);
|
||||
Widget.Tooltip = Tooltip;
|
||||
Widget:SetScript("OnClick", OnClickScript);
|
||||
Widget:SetScript("OnMouseDown", OMDScript);
|
||||
Widget:SetScript("OnMouseUp", OMUScript);
|
||||
Widget:SetScript("OnEnter", UILib.OnEnter);
|
||||
Widget:SetScript("OnLeave", UILib.OnLeave);
|
||||
Widget.AnchorPoint = AnchorPoint;
|
||||
return Widget;
|
||||
end
|
||||
|
||||
|
||||
function UILib.OnEnter(Widget)
|
||||
if (Widget.AnchorPoint) then
|
||||
GameTooltip:SetOwner(Widget, Widget.AnchorPoint);
|
||||
else
|
||||
GameTooltip:SetOwner(Widget, "ANCHOR_TOPRIGHT");
|
||||
end
|
||||
GameTooltip:SetText(Widget.Tooltip, nil, nil, nil, nil, 1);
|
||||
end
|
||||
|
||||
|
||||
function UILib.OnLeave(Widget)
|
||||
GameTooltip_Hide();
|
||||
end
|
||||
|
||||
|
||||
function UILib.RefreshTooltip(Widget)
|
||||
if (GameTooltip:GetOwner() == Widget) then
|
||||
GameTooltip:SetText(Widget.Tooltip, nil, nil, nil, nil, 1);
|
||||
end
|
||||
end
|
|
@ -0,0 +1,92 @@
|
|||
--[[
|
||||
Author: Alternator (Massiner of Nathrezim)
|
||||
Copyright 2010
|
||||
|
||||
Notes:
|
||||
]]
|
||||
|
||||
local UILib = BFUILib;
|
||||
local Util = BFUtil;
|
||||
local Const = BFConst;
|
||||
local MiscFrame = BFEventFrames["Misc"];
|
||||
|
||||
local DragIcon = CreateFrame("FRAME", "ssasm", BFIconDragOverlay);
|
||||
DragIcon:SetPoint("TOPLEFT", UIParent, "TOPLEFT");
|
||||
DragIcon:SetFrameStrata("FULLSCREEN_DIALOG");
|
||||
DragIcon.CornerTexture = DragIcon:CreateTexture();
|
||||
DragIcon.CornerTexture:SetPoint("TOPLEFT", DragIcon, "TOPLEFT");
|
||||
DragIcon.CornerTexture:SetPoint("BOTTOMRIGHT", DragIcon, "BOTTOMRIGHT");
|
||||
DragIcon.CornerTexture:SetTexture(Const.ImagesDir.."Pickup.tga");
|
||||
DragIcon.CornerTexture:SetDrawLayer("OVERLAY");
|
||||
DragIcon.Texture = DragIcon:CreateTexture();
|
||||
DragIcon.Texture:SetPoint("TOPLEFT", DragIcon, "TOPLEFT");
|
||||
DragIcon.Texture:SetPoint("BOTTOMRIGHT", DragIcon, "BOTTOMRIGHT");
|
||||
|
||||
function UILib.StartDraggingIcon(Icon, Width, Height, Command, Data, Subvalue, TexCoords)
|
||||
SetCursor("ITEM_CURSOR");
|
||||
BFIconDragOverlay:Show();
|
||||
DragIcon.Texture:SetTexture(Icon);
|
||||
DragIcon:SetSize(Width, Height);
|
||||
if (TexCoords) then
|
||||
DragIcon.Texture:SetTexCoord(unpack(TexCoords));
|
||||
else
|
||||
DragIcon.Texture:SetTexCoord(0, 1, 0, 1);
|
||||
end
|
||||
DragIcon.CustomCommand = Command;
|
||||
DragIcon.CustomData = Data;
|
||||
DragIcon.CustomSubvalue = Subvalue;
|
||||
PlaySoundFile("Sound\\Interface\\Uspelliconpickup.Wav");
|
||||
Util.CursorAction = true;
|
||||
MiscFrame:OnEvent("ACTIONBAR_SHOWGRID"); --to cause the updates we want to happen
|
||||
|
||||
DragIcon:RegisterEvent("CURSOR_UPDATE"); -- I can't remember why we don't do it here - but this event was a real pain to get working as desired here!
|
||||
DragIcon.Started = true;
|
||||
|
||||
end
|
||||
|
||||
function UILib.StopDraggingIcon()
|
||||
if (DragIcon.CustomCommand) then
|
||||
DragIcon:UnregisterEvent("CURSOR_UPDATE");
|
||||
DragIcon:UnregisterEvent("CURSOR_UPDATE");
|
||||
DragIcon.CustomCommand = nil;
|
||||
DragIcon.CustomData = nil;
|
||||
DragIcon.CustomSubvalue = nil;
|
||||
PlaySoundFile("Sound\\Interface\\Uspellicondrop.Wav");
|
||||
SetCursor(nil);
|
||||
DragIcon:UnregisterEvent("CURSOR_UPDATE");
|
||||
Util.CursorAction = false;
|
||||
MiscFrame:OnEvent("ACTIONBAR_HIDEGRID"); --to cause the updates we want to happen
|
||||
|
||||
BFIconDragOverlay:Hide()
|
||||
end
|
||||
end
|
||||
|
||||
function UILib.GetDragInfo()
|
||||
return DragIcon.CustomCommand, DragIcon.CustomData, DragIcon.CustomSubvalue;
|
||||
end
|
||||
|
||||
function DragIcon:OnEvent(Event)
|
||||
UILib.StopDraggingIcon();
|
||||
end
|
||||
|
||||
function DragIcon:OnUpdate()
|
||||
GetCursorPosition();
|
||||
local Left, Top = GetCursorPosition();
|
||||
local Scale = UIParent:GetEffectiveScale();
|
||||
|
||||
if (DragIcon.Started) then
|
||||
SetCursor("ITEM_CURSOR");
|
||||
DragIcon.Started = false;
|
||||
DragIcon:RegisterEvent("CURSOR_UPDATE");
|
||||
end
|
||||
if (self.Left ~= Left or self.Top ~= Top) then
|
||||
self.Left = Left;
|
||||
self.Top = Top;
|
||||
self:ClearAllPoints();
|
||||
self:SetPoint("TOPLEFT", UIParent, "BOTTOMLEFT", Left / Scale, Top / Scale);
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
DragIcon:SetScript("OnEvent", DragIcon.OnEvent);
|
||||
DragIcon:SetScript("OnUpdate", DragIcon.OnUpdate);
|
|
@ -0,0 +1,68 @@
|
|||
--[[
|
||||
Author: Alternator (Massiner of Nathrezim)
|
||||
Copyright 2010
|
||||
|
||||
Notes:
|
||||
]]
|
||||
|
||||
BFUILib = BFUILib or nil; local UILib = BFUILib;
|
||||
|
||||
|
||||
|
||||
--[[
|
||||
Input Box element to allow getting user input
|
||||
--]]
|
||||
local InputBox = CreateFrame("EDITBOX", "BFInputLine", BFConfigureLayer, "InputBoxTemplate");
|
||||
InputBox:SetFrameStrata("FULLSCREEN_DIALOG");
|
||||
InputBox:Hide();
|
||||
|
||||
function UILib.InputBox(Ref, AcceptFunc, CancelFunc, Text, Width, Point)
|
||||
|
||||
if (Ref == nil or (InputBox.AcceptFunc == AcceptFunc and InputBox.CancelFunc == CancelFunc and InputBox.Ref == Ref)) then
|
||||
--It would appear that the same caller is requesting an inputbox, treat this as a cancel toggle
|
||||
InputBox:Cancel();
|
||||
return;
|
||||
end
|
||||
|
||||
InputBox:Cancel(); --Trigger a cancel in the case that we are already editing something else
|
||||
|
||||
InputBox.Ref = Ref;
|
||||
InputBox.AcceptFunc = AcceptFunc;
|
||||
InputBox.CancelFunc = CancelFunc;
|
||||
InputBox:SetSize(Width, 20); --Height can't be set, although we need to set height to init it
|
||||
InputBox:ClearAllPoints();
|
||||
InputBox:SetPoint(unpack(Point));
|
||||
InputBox:SetText(Text or "");
|
||||
|
||||
InputBox:Show();
|
||||
end
|
||||
|
||||
|
||||
function InputBox:Accept()
|
||||
if (self.AcceptFunc) then
|
||||
self.AcceptFunc(self.Ref, self:GetText());
|
||||
end
|
||||
|
||||
self.Ref = nil;
|
||||
self.AcceptFunc = nil;
|
||||
self.CancelFunc = nil;
|
||||
self:SetText("");
|
||||
|
||||
self:Hide();
|
||||
end
|
||||
|
||||
|
||||
function InputBox:Cancel()
|
||||
if (self.CancelFunc) then
|
||||
self.CancelFunc(self.Ref, self:GetText());
|
||||
end
|
||||
|
||||
self.Ref = nil;
|
||||
self.AcceptFunc = nil;
|
||||
self.CancelFunc = nil;
|
||||
self:SetText("");
|
||||
|
||||
self:Hide();
|
||||
end
|
||||
InputBox:SetScript("OnEscapePressed", InputBox.Cancel);
|
||||
InputBox:SetScript("OnEnterPressed", InputBox.Accept);
|
|
@ -0,0 +1,57 @@
|
|||
--[[
|
||||
Author: Alternator (Massiner of Nathrezim)
|
||||
Copyright 2010
|
||||
|
||||
Notes:
|
||||
]]
|
||||
|
||||
local UILib = BFUILib;
|
||||
local Util = BFUtil;
|
||||
local EventFull = BFEventFrames["Full"];
|
||||
|
||||
|
||||
--[[
|
||||
Setup the configure env (this is called when the configurelayer is made visible)
|
||||
--]]
|
||||
function UILib.ConfigureModeEnabled()
|
||||
ButtonForgeSave["ConfigureMode"] = true;
|
||||
Util.RefreshGridStatus();
|
||||
Util.RefreshBarStrata();
|
||||
Util.RefreshBarGUIStatus();
|
||||
Util.VDriverOverride();
|
||||
EventFull.RefreshButtons = true;
|
||||
EventFull.RefChecked = true;
|
||||
EventFull.RefUsable = true;
|
||||
PlaySound("igCharacterInfoOpen");
|
||||
end
|
||||
|
||||
|
||||
--[[
|
||||
Close the configure mode cleanly (this is called when the configurelayer is hidden)
|
||||
--]]
|
||||
function UILib.ConfigureModeDisabled()
|
||||
ButtonForgeSave["ConfigureMode"] = false;
|
||||
UILib.ClearModes();
|
||||
Util.RefreshGridStatus();
|
||||
Util.RefreshBarStrata();
|
||||
Util.RefreshBarGUIStatus();
|
||||
Util.VDriverOverride();
|
||||
EventFull.RefreshButtons = true;
|
||||
EventFull.RefChecked = true;
|
||||
EventFull.RefUsable = true;
|
||||
PlaySound("igCharacterInfoClose");
|
||||
end
|
||||
|
||||
|
||||
--[[
|
||||
Call this to clear any current input processes (does not exit configure mode)
|
||||
--]]
|
||||
function UILib.ClearModes()
|
||||
|
||||
UILib.ToggleCreateBarMode(true);
|
||||
UILib.ToggleDestroyBarMode(true);
|
||||
BFKeyBinder.CancelButtonSelectorMode();
|
||||
UILib.SetMask(nil);
|
||||
UILib.InputBox(nil);
|
||||
|
||||
end
|
|
@ -0,0 +1,130 @@
|
|||
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/ ..\FrameXML\UI.xsd">
|
||||
|
||||
<Script file="UILibLayers.lua"/>
|
||||
|
||||
<Frame name="BFOverlay" enablemouse="true" hidden="true" virtual="true">
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT" relativeTo="UIParent" relativePoint="TOPLEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="0" y="0" />
|
||||
</Offset>
|
||||
</Anchor>
|
||||
<Anchor point="BOTTOMRIGHT" relativeTo="UIParent" relativePoint="BOTTOMRIGHT">
|
||||
<Offset>
|
||||
<AbsDimension x="0" y="0" />
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<Backdrop bgFile="Interface/Tooltips/UI-Tooltip-Background" edgeFile="" tile="true">
|
||||
<TileSize>
|
||||
<AbsValue val="16" />
|
||||
</TileSize>
|
||||
<EdgeSize>
|
||||
<AbsValue val="16" />
|
||||
</EdgeSize>
|
||||
</Backdrop>
|
||||
</Frame>
|
||||
|
||||
|
||||
|
||||
<!-- The primary configure layer, all configuration UI descends from this -->
|
||||
<Frame name="BFConfigureLayer" parent="UIParent" frameStrata="LOW" hidden="true">
|
||||
<Scripts>
|
||||
<OnShow>
|
||||
BFUILib.ConfigureModeEnabled();
|
||||
|
||||
</OnShow>
|
||||
<OnHide>
|
||||
BFUILib.ConfigureModeDisabled();
|
||||
|
||||
</OnHide>
|
||||
</Scripts>
|
||||
</Frame>
|
||||
|
||||
<!-- Layer to house the advanced ui controls -->
|
||||
<Frame name="BFAdvancedToolsLayer" parent="BFConfigureLayer" frameStrata="LOW" hidden="true"/>
|
||||
|
||||
<!-- Overlay for bar creation -->
|
||||
<Frame name="BFCreateBarOverlay" parent="UIParent" inherits="BFOverlay" frameStrata="FULLSCREEN_DIALOG">
|
||||
<Scripts>
|
||||
<OnLoad>
|
||||
self:SetBackdropColor(unpack(BFConst.CreateBarOverlayColor));
|
||||
tinsert(UISpecialFrames, self:GetName());
|
||||
</OnLoad>
|
||||
<OnMouseUp>
|
||||
if (button == "LeftButton") then
|
||||
local Left, Top = GetCursorPosition();
|
||||
local Scale = UIParent:GetEffectiveScale();
|
||||
if (BFUILib.CreateBarMode) then
|
||||
BFUtil.NewBar(Left / Scale, Top / Scale);
|
||||
elseif (BFUILib.CreateBonusBarMode) then
|
||||
BFUtil.NewBonusBar(Left / Scale, Top / Scale);
|
||||
end
|
||||
end
|
||||
BFUILib.ToggleCreateBarMode(true);
|
||||
</OnMouseUp>
|
||||
<OnEnter>
|
||||
SetCursor("REPAIRNPC_CURSOR");
|
||||
</OnEnter>
|
||||
<OnHide>
|
||||
BFUILib.ToggleCreateBarMode(true);
|
||||
</OnHide>
|
||||
</Scripts>
|
||||
</Frame>
|
||||
|
||||
<!-- Overlay for bar destruction (this overlay contains destroy frames unique to each bar) -->
|
||||
<Frame name="BFDestroyBarOverlay" parent="UIParent" inherits="BFOverlay">
|
||||
<Scripts>
|
||||
<OnLoad>
|
||||
self:SetBackdropColor(unpack(BFConst.DestroyBarOverlayColor));
|
||||
tinsert(UISpecialFrames, self:GetName());
|
||||
</OnLoad>
|
||||
<OnMouseUp>
|
||||
BFUILib.ToggleDestroyBarMode(true);
|
||||
</OnMouseUp>
|
||||
<OnEnter>
|
||||
SetCursor("CAST_ERROR_CURSOR");
|
||||
</OnEnter>
|
||||
<OnHide>
|
||||
BFUILib.ToggleDestroyBarMode(true);
|
||||
</OnHide>
|
||||
</Scripts>
|
||||
</Frame>
|
||||
|
||||
<!-- Frame to drag a Toggle button against -->
|
||||
<Frame name="BFIconDragOverlay" parent="UIParent" inherits="BFOverlay" frameStrata="LOW" frameLevel="1">
|
||||
<Scripts>
|
||||
<OnLoad>
|
||||
self:SetBackdropColor(unpack(BFConst.IconDragOverlayColor));
|
||||
tinsert(UISpecialFrames, self:GetName());
|
||||
</OnLoad>
|
||||
<OnEnter>
|
||||
SetCursor("ITEM_CURSOR");
|
||||
</OnEnter>
|
||||
<OnMouseDown>
|
||||
BFUILib:StopDraggingIcon();
|
||||
</OnMouseDown>
|
||||
<OnHide>
|
||||
BFUILib:StopDraggingIcon();
|
||||
</OnHide>
|
||||
</Scripts>
|
||||
</Frame>
|
||||
|
||||
<!-- Frame to handle protected processing that may be needed when entering combat -->
|
||||
<Frame name="BFSecureForCombatFrame" hidden="true" inherits="SecureHandlerStateTemplate">
|
||||
<Scripts>
|
||||
<OnLoad>
|
||||
RegisterStateDriver(self, "combat", "[combat] true; false");
|
||||
</OnLoad>
|
||||
</Scripts>
|
||||
</Frame>
|
||||
|
||||
<!-- Frame to handle protected processing when the override or vehicle bar becomes active -->
|
||||
<Frame name="BFSecureSpecialBarFrame" hidden="true" inherits="SecureHandlerStateTemplate">
|
||||
<Scripts>
|
||||
<OnLoad>
|
||||
RegisterStateDriver(self, "bar", "[overridebar] overridebar; [vehicleui] vehicleui; normal");
|
||||
</OnLoad>
|
||||
</Scripts>
|
||||
</Frame>
|
||||
</Ui>
|
|
@ -0,0 +1,50 @@
|
|||
--[[
|
||||
Author: Alternator (Massiner of Nathrezim)
|
||||
Copyright 2011
|
||||
|
||||
Notes:
|
||||
]]
|
||||
|
||||
|
||||
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}});
|
||||
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}});
|
||||
HorizLine:SetHeight(Const.HLineThickness / UIParent:GetScale());
|
||||
|
||||
|
||||
|
||||
function UILib.ShowVerticalLine(X, YTop, YBottom)
|
||||
VertLine:Show();
|
||||
VertLine:ClearAllPoints();
|
||||
VertLine:SetPoint("TOPLEFT", UIParent, "BOTTOMLEFT", X, YTop);
|
||||
VertLine:SetHeight(YTop - YBottom);
|
||||
end
|
||||
|
||||
function UILib.HideVerticalLine()
|
||||
VertLine:Hide();
|
||||
end
|
||||
|
||||
function UILib.ShowHorizontalLine(Y, XLeft, XRight)
|
||||
HorizLine:Show();
|
||||
HorizLine:ClearAllPoints();
|
||||
HorizLine:SetPoint("TOPLEFT", UIParent, "BOTTOMLEFT", XLeft, Y);
|
||||
HorizLine:SetWidth(XRight - XLeft);
|
||||
end
|
||||
|
||||
function UILib.HideHorizontalLine()
|
||||
HorizLine:Hide();
|
||||
end
|
||||
|
||||
|
||||
|
||||
function UILib.RescaleLines()
|
||||
VertLine:SetWidth(Const.VLineThickness / UIParent:GetScale());
|
||||
HorizLine:SetHeight(Const.HLineThickness / UIParent:GetScale());
|
||||
end
|
||||
|
|
@ -0,0 +1,127 @@
|
|||
--[[
|
||||
Author: Alternator (Massiner of Nathrezim)
|
||||
Copyright 2010
|
||||
|
||||
Notes:
|
||||
]]
|
||||
|
||||
local UILib = BFUILib;
|
||||
local Util = BFUtil;
|
||||
local Const = BFConst;
|
||||
local EventFull = BFEventFrames["Full"];
|
||||
|
||||
--This overloading of togglecreatebarmode is yuck, it will do the job for now, but will need
|
||||
--cleaning up when the ui functions get unified a bit better
|
||||
function UILib.ToggleCreateBarMode(ForceOff)
|
||||
if (BFCreateBarOverlay:IsShown() or ForceOff) then
|
||||
BFCreateBarOverlay:Hide();
|
||||
BFToolbarCreateBar:SetChecked(false);
|
||||
BFToolbarCreateBonusBar:SetChecked(false);
|
||||
UILib.CreateBarMode = false;
|
||||
UILib.CreateBonusBarMode = false;
|
||||
SetCursor(nil);
|
||||
elseif (not InCombatLockdown()) then
|
||||
UILib.CreateBarMode = true;
|
||||
BFCreateBarOverlay:Show();
|
||||
BFToolbarCreateBar:SetChecked(true);
|
||||
SetCursor("REPAIRNPC_CURSOR");
|
||||
end
|
||||
EventFull.RefreshButtons = true;
|
||||
EventFull.RefChecked = true;
|
||||
end
|
||||
|
||||
|
||||
|
||||
function UILib.ToggleCreateBonusBarMode(ForceOff)
|
||||
if (not BFConfigureLayer:IsShown()) then
|
||||
UIErrorsFrame:AddMessage(Util.GetLocaleString("CreateBonusBarError"), 1, 0, 0);
|
||||
return;
|
||||
end
|
||||
if (BFCreateBarOverlay:IsShown() or ForceOff) then
|
||||
BFCreateBarOverlay:Hide();
|
||||
BFToolbarCreateBar:SetChecked(false);
|
||||
BFToolbarCreateBonusBar:SetChecked(false);
|
||||
UILib.CreateBarMode = false;
|
||||
UILib.CreateBonusBarMode = false;
|
||||
SetCursor(nil);
|
||||
elseif (not InCombatLockdown()) then
|
||||
UILib.CreateBonusBarMode = true;
|
||||
BFCreateBarOverlay:Show();
|
||||
BFToolbarCreateBonusBar:SetChecked(true);
|
||||
SetCursor("REPAIRNPC_CURSOR");
|
||||
end
|
||||
EventFull.RefreshButtons = true;
|
||||
EventFull.RefChecked = true;
|
||||
end
|
||||
|
||||
|
||||
|
||||
function UILib.ToggleDestroyBarMode(ForceOff)
|
||||
if (BFDestroyBarOverlay:IsShown() or ForceOff) then
|
||||
BFDestroyBarOverlay:Hide();
|
||||
BFToolbarDestroyBar:SetChecked(false);
|
||||
SetCursor(nil);
|
||||
UILib.SetMask(nil);
|
||||
elseif (not InCombatLockdown()) then
|
||||
BFDestroyBarOverlay:Show();
|
||||
BFToolbarDestroyBar:SetChecked(true);
|
||||
SetCursor("CAST_ERROR_CURSOR");
|
||||
end
|
||||
EventFull.RefreshButtons = true;
|
||||
EventFull.RefChecked = true;
|
||||
Util.VDriverOverride();
|
||||
Util.RefreshGridStatus();
|
||||
Util.RefreshBarStrata();
|
||||
Util.RefreshBarGUIStatus();
|
||||
end
|
||||
|
||||
|
||||
|
||||
function UILib.ToggleAdvancedTools()
|
||||
if (BFAdvancedToolsLayer:IsShown()) then
|
||||
BFAdvancedToolsLayer:Hide();
|
||||
BFToolbarAdvanced:SetChecked(false);
|
||||
ButtonForgeSave.AdvancedMode = false;
|
||||
BFToolbar:SetSize(216, 88);
|
||||
BFToolbarCreateBonusBar:Hide();
|
||||
BFToolbarRightClickSelfCast:Hide();
|
||||
else
|
||||
BFAdvancedToolsLayer:Show();
|
||||
BFToolbarAdvanced:SetChecked(true);
|
||||
ButtonForgeSave.AdvancedMode = true;
|
||||
BFToolbar:SetSize(216, 116);
|
||||
BFToolbarCreateBonusBar:Show();
|
||||
BFToolbarRightClickSelfCast:Show();
|
||||
end
|
||||
EventFull.RefreshButtons = true;
|
||||
EventFull.RefChecked = true;
|
||||
end
|
||||
|
||||
|
||||
|
||||
function UILib.ToggleRightClickSelfCast(Value)
|
||||
if (Value ~= nil) then
|
||||
Util.RightClickSelfCast(Value);
|
||||
elseif (ButtonForgeSave["RightClickSelfCast"]) then
|
||||
Util.RightClickSelfCast(false);
|
||||
else
|
||||
Util.RightClickSelfCast(true);
|
||||
end
|
||||
|
||||
if (ButtonForgeSave["RightClickSelfCast"]) then
|
||||
BFToolbarRightClickSelfCast.Tooltip = Util.GetLocaleString("RightClickSelfCastTooltip")..Util.GetLocaleString("Enabled");
|
||||
BFToolbarRightClickSelfCast:SetChecked(true);
|
||||
else
|
||||
BFToolbarRightClickSelfCast.Tooltip = Util.GetLocaleString("RightClickSelfCastTooltip")..Util.GetLocaleString("Disabled");
|
||||
BFToolbarRightClickSelfCast:SetChecked(false);
|
||||
end
|
||||
|
||||
if (GetMouseFocus() == BFToolbarRightClickSelfCast) then
|
||||
GameTooltip:SetText(BFToolbarRightClickSelfCast.Tooltip, nil, nil, nil, nil, 1);
|
||||
end
|
||||
|
||||
EventFull.RefreshButtons = true;
|
||||
EventFull.RefChecked = true;
|
||||
end
|
||||
|
||||
|
|
@ -0,0 +1,317 @@
|
|||
<Ui xmlns="http://www.blizzard.com/wow/ui" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<!--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">
|
||||
<!--<FrameSkin skinid="dcb143e1-a4ab-4e7c-b934-1efa40101d21" frameid="2d508883-59c2-4f83-ae10-27aaad48391b" />-->
|
||||
<Scripts>
|
||||
<OnMouseDown>
|
||||
self:StartMoving();
|
||||
</OnMouseDown>
|
||||
<OnMouseUp>
|
||||
self:StopMovingOrSizing();
|
||||
</OnMouseUp>
|
||||
</Scripts>
|
||||
<Size>
|
||||
<AbsDimension x="216" y="88" />
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="CENTER" relativeTo="UIParent">
|
||||
<Offset>
|
||||
<AbsDimension x="0" y="0" />
|
||||
</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">
|
||||
<Size>
|
||||
<AbsDimension x="160" y="32" />
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="TOP">
|
||||
<Offset>
|
||||
<AbsDimension x="0" y="5" />
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<TexCoords left="0.2" right="0.8" top="0" bottom="0.6" />
|
||||
</Texture>
|
||||
<Texture name="$parentToggleBorder" file="Interface\AddOns\ButtonForge\Images\ToggleBorder.tga">
|
||||
<Size>
|
||||
<AbsDimension x="26" y="26" />
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="TOPRIGHT">
|
||||
<Offset>
|
||||
<AbsDimension x="0" y="0" />
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<TexCoords left="0" right="0.8125" top="0" bottom="0.8125" />
|
||||
</Texture>
|
||||
<FontString name="$parentTitleString" font="Fonts\FRIZQT__.TTF" text="Button Forge">
|
||||
<Size>
|
||||
<AbsDimension x="140" y="0" />
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="TOP">
|
||||
<Offset>
|
||||
<AbsDimension x="0" y="-4" />
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<FontHeight>
|
||||
<AbsValue val="12" />
|
||||
</FontHeight>
|
||||
<Color r="1" g="0.8196079" b="0" />
|
||||
<Shadow>
|
||||
<Color r="0" g="0" b="0" />
|
||||
<Offset>
|
||||
<AbsDimension x="1" y="-1" />
|
||||
</Offset>
|
||||
</Shadow>
|
||||
</FontString>
|
||||
</Layer>
|
||||
</Layers>
|
||||
<Frames>
|
||||
|
||||
<!-- Create Bar, This button toggles create bar mode -->
|
||||
<CheckButton name="$parentCreateBar" inherits="ActionButtonTemplate">
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="20" y="-32" />
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<Scripts>
|
||||
<OnLoad>
|
||||
_G[self:GetName().."Icon"]:SetTexture(BFConst.ImagesDir.."CreateBar.tga");
|
||||
self:RegisterForDrag("LeftButton", "RightButton");
|
||||
self.Tooltip = BFUtil.GetLocaleString("CreateBarTooltip");
|
||||
</OnLoad>
|
||||
<OnClick>
|
||||
-- Toggle CreateBar Mode
|
||||
BFUILib.ToggleCreateBarMode();
|
||||
</OnClick>
|
||||
<OnDragStart>
|
||||
BFCustomAction.SetCursor("createbarmode");
|
||||
</OnDragStart>
|
||||
<OnEnter>
|
||||
GameTooltip:SetOwner(self:GetParent(), "ANCHOR_TOPLEFT");
|
||||
GameTooltip:SetText(self.Tooltip, nil, nil, nil, nil, 1);
|
||||
</OnEnter>
|
||||
<OnLeave>
|
||||
GameTooltip_Hide();
|
||||
</OnLeave>
|
||||
</Scripts>
|
||||
</CheckButton>
|
||||
|
||||
<!-- Create Bonus Bar, This button toggles create bonus bar mode -->
|
||||
<CheckButton name="$parentCreateBonusBar" inherits="ActionButtonTemplate" hidden="true">
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="20" y="-74" />
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<Scripts>
|
||||
<OnLoad>
|
||||
_G[self:GetName().."Icon"]:SetTexture(BFConst.ImagesDir.."CreateBonusBar.tga");
|
||||
self:RegisterForDrag("LeftButton", "RightButton");
|
||||
self.Tooltip = BFUtil.GetLocaleString("CreateBonusBarTooltip");
|
||||
self:SetScale(0.66);
|
||||
self:ClearAllPoints();
|
||||
self:SetPoint("TOPLEFT", self:GetParent(), "TOPLEFT", 20 / 0.66, -74 / 0.66);
|
||||
</OnLoad>
|
||||
<OnClick>
|
||||
-- Toggle CreateBar Mode
|
||||
BFUILib.ToggleCreateBonusBarMode();
|
||||
</OnClick>
|
||||
<OnDragStart>
|
||||
BFCustomAction.SetCursor("createbonusbarmode");
|
||||
</OnDragStart>
|
||||
<OnEnter>
|
||||
GameTooltip:SetOwner(self:GetParent(), "ANCHOR_TOPLEFT");
|
||||
GameTooltip:SetText(self.Tooltip, nil, nil, nil, nil, 1);
|
||||
</OnEnter>
|
||||
<OnLeave>
|
||||
GameTooltip_Hide();
|
||||
</OnLeave>
|
||||
</Scripts>
|
||||
</CheckButton>
|
||||
|
||||
<!-- Destroy Bar, this button toggles destroy bar mode -->
|
||||
<CheckButton name="$parentDestroyBar" inherits="ActionButtonTemplate">
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="60" y="-32" />
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<Scripts>
|
||||
<OnLoad>
|
||||
_G[self:GetName().."Icon"]:SetTexture(BFConst.ImagesDir.."DestroyBar.tga");
|
||||
self:RegisterForDrag("LeftButton", "RightButton");
|
||||
self.Tooltip = BFUtil.GetLocaleString("DestroyBarTooltip");
|
||||
</OnLoad>
|
||||
<OnClick>
|
||||
-- Toggle DestroyBar Mode
|
||||
BFUILib.ToggleDestroyBarMode();
|
||||
</OnClick>
|
||||
<OnDragStart>
|
||||
BFCustomAction.SetCursor("destroybarmode");
|
||||
</OnDragStart>
|
||||
<OnEnter>
|
||||
GameTooltip:SetOwner(self:GetParent(), "ANCHOR_TOPLEFT");
|
||||
GameTooltip:SetText(self.Tooltip, nil, nil, nil, nil, 1);
|
||||
</OnEnter>
|
||||
<OnLeave>
|
||||
GameTooltip_Hide();
|
||||
</OnLeave>
|
||||
</Scripts>
|
||||
</CheckButton>
|
||||
|
||||
<!-- Advanced, this button controls display of the advanced configure UI -->
|
||||
<CheckButton name="$parentAdvanced" inherits="ActionButtonTemplate">
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="120" y="-32" />
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<Scripts>
|
||||
<OnLoad>
|
||||
_G[self:GetName().."Icon"]:SetTexture(BFConst.ImagesDir.."AdvancedTools.tga");
|
||||
self:RegisterForDrag("LeftButton", "RightButton");
|
||||
self.Tooltip = BFUtil.GetLocaleString("AdvancedToolsTooltip");
|
||||
</OnLoad>
|
||||
<OnClick>
|
||||
-- Toggle Advanced Tools Mode
|
||||
BFUILib.ToggleAdvancedTools();
|
||||
</OnClick>
|
||||
<OnDragStart>
|
||||
BFCustomAction.SetCursor("advancedtoolsmode");
|
||||
</OnDragStart>
|
||||
<OnEnter>
|
||||
GameTooltip:SetOwner(self:GetParent(), "ANCHOR_TOPRIGHT");
|
||||
GameTooltip:SetText(self.Tooltip, nil, nil, nil, nil, 1);
|
||||
</OnEnter>
|
||||
<OnLeave>
|
||||
GameTooltip_Hide();
|
||||
</OnLeave>
|
||||
</Scripts>
|
||||
</CheckButton>
|
||||
|
||||
<!-- Toggle Macro, this is a draggable button -->
|
||||
<CheckButton name="$parentConfigureAction" inherits="ActionButtonTemplate, SecureActionButtonTemplate">
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="160" y="-32" />
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<Scripts>
|
||||
<OnLoad>
|
||||
_G[self:GetName().."Icon"]:SetTexture(BFConst.ImagesDir.."Configure.tga");
|
||||
self.Tooltip = BFUtil.GetLocaleString("ConfigureModePrimaryTooltip");
|
||||
self:RegisterForDrag("LeftButton", "RightButton");
|
||||
self:SetChecked(true);
|
||||
self:SetAttribute("type", "macro");
|
||||
self:SetAttribute("macrotext", "/click BFToolbarToggle");
|
||||
</OnLoad>
|
||||
<PostClick>
|
||||
self:SetChecked(true);
|
||||
</PostClick>
|
||||
<OnDragStart>
|
||||
BFCustomAction.SetCursor("configuremode");
|
||||
</OnDragStart>
|
||||
<OnEnter>
|
||||
GameTooltip:SetOwner(self:GetParent(), "ANCHOR_TOPRIGHT");
|
||||
GameTooltip:SetText(self.Tooltip, nil, nil, nil, nil, 1);
|
||||
</OnEnter>
|
||||
<OnLeave>
|
||||
GameTooltip_Hide();
|
||||
</OnLeave>
|
||||
</Scripts>
|
||||
</CheckButton>
|
||||
|
||||
<!-- Toggle Right Click Self Cast -->
|
||||
<CheckButton name="$parentRightClickSelfCast" inherits="ActionButtonTemplate" hidden="true">
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="60" y="-74" />
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<Scripts>
|
||||
<OnLoad>
|
||||
_G[self:GetName().."Icon"]:SetTexture(BFConst.ImagesDir.."RightClickSelfCast.tga");
|
||||
self:RegisterForDrag("LeftButton", "RightButton");
|
||||
self.Tooltip = BFUtil.GetLocaleString("RightClickSelfCastTooltip");
|
||||
self:SetScale(0.66);
|
||||
self:ClearAllPoints();
|
||||
self:SetPoint("TOPLEFT", self:GetParent(), "TOPLEFT", 20 / 0.66 + 40, -74 / 0.66);
|
||||
</OnLoad>
|
||||
<OnClick>
|
||||
-- Toggle Right Click Self Cast Mode
|
||||
BFUILib.ToggleRightClickSelfCast();
|
||||
</OnClick>
|
||||
<OnDragStart>
|
||||
BFCustomAction.SetCursor("rightclickselfcast");
|
||||
</OnDragStart>
|
||||
<OnEnter>
|
||||
GameTooltip:SetOwner(self:GetParent(), "ANCHOR_TOPLEFT");
|
||||
GameTooltip:SetText(self.Tooltip, nil, nil, nil, nil, 1);
|
||||
</OnEnter>
|
||||
<OnLeave>
|
||||
GameTooltip_Hide();
|
||||
</OnLeave>
|
||||
</Scripts>
|
||||
</CheckButton>
|
||||
|
||||
<!-- Toggle - AKA Red X, this button gets set up to include secure snippets to handle both entering and exiting Button Forge Configure Mode -->
|
||||
<Button name="$parentToggle" inherits="SecureHandlerBaseTemplate, SecureHandlerClickTemplate">
|
||||
<Size>
|
||||
<AbsDimension x="32" y="32"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="TOPRIGHT">
|
||||
<Offset>
|
||||
<AbsDimension x="5" y="5"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<NormalTexture file="Interface\Buttons\UI-Panel-MinimizeButton-Up"/>
|
||||
<PushedTexture file="Interface\Buttons\UI-Panel-MinimizeButton-Down"/>
|
||||
<HighlightTexture file="Interface\Buttons\UI-Panel-MinimizeButton-Highlight" alphaMode="ADD"/>
|
||||
<Scripts>
|
||||
<OnLoad>
|
||||
self:SetAttribute("_onclick", [[if (owner:GetParent():GetParent():IsShown()) then
|
||||
owner:GetParent():GetParent():Hide();
|
||||
else
|
||||
owner:GetParent():GetParent():Show();
|
||||
end]]);
|
||||
</OnLoad>
|
||||
</Scripts>
|
||||
</Button>
|
||||
</Frames>
|
||||
</Frame>
|
||||
</Ui>
|
|
@ -0,0 +1,3 @@
|
|||
|
||||
BINDING_HEADER_ButtonForge = "Button Forge";
|
||||
_G["BINDING_NAME_CLICK BFToolbarToggle:LeftButton"] = "Button Forge";
|
|
@ -0,0 +1,3 @@
|
|||
<Bindings>
|
||||
<Binding name="CLICK BFToolbarToggle:LeftButton" header="ButtonForge" />
|
||||
</Bindings>
|