release 1.0.2
Cette révision appartient à :
Parent
58a8ef7de9
révision
fabebbfe11
3
Bar.lua
3
Bar.lua
|
@ -534,8 +534,7 @@ function Bar:Configure(BarSave)
|
|||
self:SetAlpha(BarSave["Alpha"]);
|
||||
self:SetGUI(BarSave["GUI"]);
|
||||
|
||||
-- Uncomment this once Clamp insets are working again
|
||||
--self.ControlFrame:SetClampedToScreen(true);
|
||||
self.ControlFrame:SetClampedToScreen(true);
|
||||
end
|
||||
|
||||
--[[
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
## Interface: 90002
|
||||
## Title: Button Forge
|
||||
## Notes: Add as many or few extra Action Bars and Buttons to your user interface to complement the standard (or other) Action Bars
|
||||
## Version: 1.0.1
|
||||
## Version: 1.0.2
|
||||
## Author: Massiner of Nathrezim
|
||||
## SavedVariables: ButtonForgeGlobalSettings, ButtonForgeGlobalProfiles, ButtonForgeGlobalBackup
|
||||
## SavedVariablesPerCharacter: ButtonForgeSave, BFSave
|
||||
|
|
|
@ -12,7 +12,7 @@ Const.SUMMON_RANDOM_FAVORITE_MOUNT_ID = 268435455;
|
|||
Const.SUMMON_RANDOM_FAVORITE_BATTLE_PET_ID = "BattlePet-0-FFFFFFFFFFFFFF";
|
||||
Const.SUMMON_RANDOM_FAVORITE_BATTLE_PET_TEXTURE = "Interface/Icons/INV_Pet_Achievement_CaptureAPetFromEachFamily_Battle";
|
||||
Const.Version = 1.0;
|
||||
Const.VersionMinor = 0.1;
|
||||
Const.VersionMinor = 0.2;
|
||||
Const.MAX_ACCOUNT_MACROS = 120;
|
||||
Const.ButtonNaming = "ButtonForge"
|
||||
Const.ButtonSeq = 1; --This value will increment (so not technically a const...)
|
||||
|
@ -92,6 +92,7 @@ Const.DarkOrange = "ffEE5500";
|
|||
|
||||
Const.SlashCommands = {};
|
||||
Const.SlashCommands["-bar"] = {params = "^%s*(..-)%s*$", group = "bar"};
|
||||
Const.SlashCommands["-list"] = {params = "^()$", incompat = {"ALL"}};
|
||||
Const.SlashCommands["-macrotext"] = {params = "bool", group = "bar"};
|
||||
Const.SlashCommands["-keybindtext"] = {params = "bool", group = "bar"};
|
||||
Const.SlashCommands["-tooltips"] = {params = "bool", group = "bar"};
|
||||
|
|
|
@ -96,6 +96,9 @@ Misc:RegisterEvent("SPELL_FLYOUT_UPDATE"); --Refresh the spell_flyouts (mainly
|
|||
Misc:RegisterEvent("UI_SCALE_CHANGED");
|
||||
Misc:RegisterEvent("MODIFIER_STATE_CHANGED");
|
||||
|
||||
Misc:RegisterEvent("ZONE_CHANGED");
|
||||
Misc:RegisterEvent("ZONE_CHANGED_INDOORS");
|
||||
Misc:RegisterEvent("ZONE_CHANGED_NEW_AREA");
|
||||
|
||||
|
||||
|
||||
|
@ -488,6 +491,10 @@ function Misc:OnEvent(Event, ...)
|
|||
elseif (Event == "EDITBOX_MESSAGE") then
|
||||
self.EditBoxMessage, self.EditBox = ...;
|
||||
self:SetScript("OnUpdate", self.OnUpdate);
|
||||
|
||||
elseif (Event == "ZONE_CHANGED" or Event == "ZONE_CHANGED_INDOORS" or Event == "ZONE_CHANGED_NEW_AREA") then
|
||||
Util.RefreshZoneAbility();
|
||||
|
||||
end
|
||||
end
|
||||
function Misc:OnUpdate(Elapsed)
|
||||
|
|
|
@ -36,6 +36,9 @@
|
|||
BFKeyBinder.OnInputBindingOverlay("MOUSEWHEELDOWN");
|
||||
end
|
||||
</OnMouseWheel>
|
||||
<OnGamePadButtonDown>
|
||||
BFKeyBinder.OnInputBindingOverlay(button);
|
||||
</OnGamePadButtonDown>
|
||||
</Scripts>
|
||||
</Frame>
|
||||
|
||||
|
|
|
@ -88,6 +88,7 @@ Locale["SlashHelpFormatted"] =
|
|||
"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.."-list|r\n"..
|
||||
"|c"..Const.LightBlue.."-rename <new name>|r\n"..
|
||||
"|c"..Const.LightBlue.."-rows <number>|r\n"..
|
||||
"|c"..Const.LightBlue.."-cols <number>|r\n"..
|
||||
|
@ -135,6 +136,8 @@ Locale["SlashHelpFormatted"] =
|
|||
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["SlashListBarWithLabel"] = "- <LABEL> |c"..Const.LightBlue.." Examples: /bufo -bar <LABEL> -info";
|
||||
Locale["SlashListBarWithIndex"] = "- <LABEL> (No label set, use Index) |c"..Const.LightBlue.." Examples: /bufo -bar <LABEL> -info";
|
||||
|
||||
Locale["SlashBarNameRequired"] =
|
||||
[[ButtonForge slash command failed:
|
||||
|
|
|
@ -5,7 +5,7 @@ Author: Massiner of Nathrezim
|
|||
Contributor: xfsbill
|
||||
Past Contributors: DT85, DandierSphinx
|
||||
|
||||
Version: 1.0.1
|
||||
Version: 1.0.2
|
||||
|
||||
Description: Graphically create as many Action Bars and Buttons in the game as you choose
|
||||
|
||||
|
@ -23,6 +23,11 @@ Restrictions:
|
|||
|
||||
|
||||
History:
|
||||
25-Nov-2020 v1.0.2 - Removed Zone Ability frame when placed into a bar
|
||||
- Added slash commands to list bars and allow to interact with bars without a label
|
||||
- Reintroduced clamping bars to the screen (a feature that was disabled all the way back in 2015)
|
||||
- Added keybind support for gamepads
|
||||
|
||||
23-Nov-2020 v1.0.1 - Fixed an issue opening/closing some tradeskills window
|
||||
|
||||
19-Nov-2020 v1 - Updated for Wow v9.0 - This update is provided by xfsbill , jee_dae (possibly others ?) - thanks for keeping a version of the addon working all this time!
|
||||
|
|
50
Util.lua
50
Util.lua
|
@ -448,8 +448,6 @@ function Util.Load()
|
|||
Util.StartMacroCheckDelay();
|
||||
Util.RefreshOnUpdateFunction();
|
||||
|
||||
SLASH_BUTTONFORGE1 = Util.GetLocaleString("SlashButtonForge1"); -- = "/buttonforge"; --these two identifiers probably shouldn't change, but if need be they can be?!
|
||||
SLASH_BUTTONFORGE2 = Util.GetLocaleString("SlashButtonForge2"); -- = "/bufo";
|
||||
collectgarbage("collect");
|
||||
Util.CallbackEvent("INITIALISED");
|
||||
end
|
||||
|
@ -1207,7 +1205,9 @@ function Util.SlashShowMessageByLine(Message)
|
|||
end
|
||||
end
|
||||
|
||||
function SlashCmdList.BUTTONFORGE(msg, editbox)
|
||||
SLASH_BUTTONFORGE1 = Util.GetLocaleString("SlashButtonForge1"); -- = "/buttonforge"; --these two identifiers probably shouldn't change, but if need be they can be?!
|
||||
SLASH_BUTTONFORGE2 = Util.GetLocaleString("SlashButtonForge2"); -- = "/bufo";
|
||||
SlashCmdList["BUTTONFORGE"] = function(msg, editbox)
|
||||
local FirstCommand;
|
||||
local PreparedCommands = {};
|
||||
local Command, Params;
|
||||
|
@ -1316,10 +1316,21 @@ function SlashCmdList.BUTTONFORGE(msg, editbox)
|
|||
BarName = Commands["-bar"][1];
|
||||
elseif (Commands["-destroybar"]) then
|
||||
BarName = Commands["-destroybar"][1];
|
||||
end
|
||||
end
|
||||
local barFound = false;
|
||||
for i = 1, #Bars do
|
||||
if ((not BarName) or strlower(BarName) == strlower(Bars[i].BarSave["Label"])) then
|
||||
Util.ApplySlashCommands(Commands, Bars[i]);
|
||||
barFound = true;
|
||||
end
|
||||
end
|
||||
-- bar name not found, check with Index
|
||||
if ( barFound == false ) then
|
||||
for i = 1, #Bars do
|
||||
if ( tonumber(BarName) == i ) then
|
||||
Util.ApplySlashCommands(Commands, Bars[i]);
|
||||
barFound = true;
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -1343,6 +1354,17 @@ function Util.ApplySlashCommands(Commands, Bar)
|
|||
end
|
||||
Commands["-rename"] = Commands["-createbar"]; --this could arguably work by having an empty param to createbar but I think it will feel more natural to require a name with this command
|
||||
end
|
||||
|
||||
if (Commands["-list"]) then
|
||||
local Bars = Util.ActiveBars;
|
||||
for i = 1, #Bars do
|
||||
local label = string.gsub(Util.GetLocaleString("SlashListBarWithLabel"), "<LABEL>", Bars[i].BarSave["Label"]);
|
||||
if (Bars[i].BarSave["Label"] == "") then
|
||||
label = string.gsub(Util.GetLocaleString("SlashListBarWithIndex"), "<LABEL>", i);
|
||||
end
|
||||
DEFAULT_CHAT_FRAME:AddMessage(label, .5, 1, 0, 1);
|
||||
end
|
||||
end
|
||||
|
||||
if (Commands["-destroybar"]) then
|
||||
Util.DeallocateBar(Bar);
|
||||
|
@ -1857,9 +1879,28 @@ function Util.RefreshBattlePets()
|
|||
end
|
||||
end
|
||||
|
||||
function Util.RefreshZoneAbility()
|
||||
local zoneAbilities = C_ZoneAbility.GetActiveAbilities();
|
||||
local found = 0;
|
||||
for i, zoneAbility in ipairs(zoneAbilities) do
|
||||
for j, spell in ipairs(Util.ActiveSpells) do
|
||||
if ( zoneAbility.spellID == spell.SpellId ) then
|
||||
found = found + 1;
|
||||
break;
|
||||
end
|
||||
end
|
||||
end
|
||||
if (found == table.getn(zoneAbilities)) then
|
||||
ZoneAbilityFrame:SetShown(false);
|
||||
else
|
||||
ZoneAbilityFrame:SetShown(true);
|
||||
end
|
||||
end
|
||||
|
||||
function Util.AddSpell(Value)
|
||||
if (not Util.FindInTable(Util.ActiveSpells, Value)) then
|
||||
table.insert(Util.ActiveSpells, Value);
|
||||
Util.RefreshZoneAbility();
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -1867,6 +1908,7 @@ function Util.RemoveSpell(Value)
|
|||
local Index = Util.FindInTable(Util.ActiveSpells, Value);
|
||||
if (Index) then
|
||||
table.remove(Util.ActiveSpells, Index);
|
||||
Util.RefreshZoneAbility();
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Chargement…
Référencer dans un nouveau ticket