-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop-0.5.0' of https://github.com/DanSheps/bestride …
…into develop
- Loading branch information
Showing
57 changed files
with
16,275 additions
and
0 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
## Interface: 80000 | ||
## Title: BeStride | ||
## Notes: Manages your Mounts | ||
## Author: Anaximander - Burning Legion US | ||
## Version: 0.5.0 | ||
## X-Category: Interface Enhancements | ||
## X-Embeds: Ace3 | ||
## OptionalDeps: Ace3 | ||
## SavedVariables: BeStrideDB, BestrideDB | ||
|
||
BeStride_Debug.lua | ||
## BeStride.xml | ||
|
||
libs\LibStub\LibStub.lua | ||
libs\CallbackHandler-1.0\CallbackHandler-1.0.xml | ||
libs\AceAddon-3.0\AceAddon-3.0.xml | ||
libs\AceEvent-3.0\AceEvent-3.0.xml | ||
libs\AceConsole-3.0\AceConsole-3.0.xml | ||
libs\AceDB-3.0\AceDB-3.0.xml | ||
libs\AceGUI-3.0\AceGUI-3.0.xml | ||
|
||
|
||
localization\en-US.lua | ||
|
||
BeStride.lua | ||
BeStride_Constants.lua | ||
BeStride_ActionButton.lua | ||
BeStride_Events.lua | ||
BeStride_GUI.lua | ||
BeStride_Logic.lua | ||
BeStride_Mount.lua |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<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"> | ||
|
||
<Button name="BeStride_ABRegularMount" inherits="SecureActionButtonTemplate" parent="UIParent"> | ||
<Attributes> | ||
<Attribute name="type" type="string" value="macro"/> | ||
</Attributes> | ||
<Scripts> | ||
<PreClick> | ||
BeStride_ActionButtonRegularMount:PreClick() | ||
</PreClick> | ||
</Scripts> | ||
</Button> | ||
|
||
<Button name="BeStride_ABGroundMount" inherits="SecureActionButtonTemplate" parent="UIParent"> | ||
<Attributes> | ||
<Attribute name="type" type="string" value="macro"/> | ||
</Attributes> | ||
<Scripts> | ||
<PreClick> | ||
BeStride_ActionButtonGroundMount:PreClick() | ||
</PreClick> | ||
</Scripts> | ||
</Button> | ||
|
||
<Button name="BeStride_ABPassengerMount" inherits="SecureActionButtonTemplate" parent="UIParent"> | ||
<Attributes> | ||
<Attribute name="type" type="string" value="macro"/> | ||
</Attributes> | ||
<Scripts> | ||
<PreClick> | ||
BeStride_ActionButtonPassengerMount:PreClick() | ||
</PreClick> | ||
</Scripts> | ||
</Button> | ||
|
||
<Button name="BeStride_ABRepairMount" inherits="SecureActionButtonTemplate" parent="UIParent"> | ||
<Attributes> | ||
<Attribute name="type" type="string" value="macro"/> | ||
</Attributes> | ||
<Scripts> | ||
<PreClick> | ||
BeStride_ActionButtonRepairMount:PreClick() | ||
</PreClick> | ||
</Scripts> | ||
</Button> | ||
</Ui> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,137 @@ | ||
BeStride_ActionButtonRegularMount = {} | ||
BeStride_ActionButtonGroundMount = {} | ||
BeStride_ActionButtonPassengerMount = {} | ||
BeStride_ActionButtonRepairMount = {} | ||
|
||
-- Creates Action Buttons | ||
function BeStride:CreateActionButton(buttontype) | ||
local name = "BeStride_AB" .. buttontype .. "Mount" | ||
|
||
local br = CreateFrame("Button", name, UIParent, "SecureActionButtonTemplate,ActionButtonTemplate") | ||
br:SetAttribute("type","macro") | ||
br:SetAttribute("macrotext",nil) | ||
|
||
if buttontype == "Regular" then | ||
Mixin(br, BeStride_ActionButtonRegularMount) | ||
elseif buttontype == "Ground" then | ||
Mixin(br, BeStride_ActionButtonGroundMount) | ||
elseif buttontype == "Repair" then | ||
Mixin(br, BeStride_ActionButtonRepairMount) | ||
elseif buttontype == "Passenger" then | ||
Mixin(br, BeStride_ActionButtonPassengerMount) | ||
end | ||
|
||
br.id = buttontype | ||
br:SetScript("PreClick",function (self) self:PreClick() end ) | ||
br:SetScript("PostClick",self.PostClick) | ||
--SaveBindings(GetCurrentBindingSet()) | ||
if br then | ||
--print("Returning: " .. br:GetName()) | ||
return br | ||
else | ||
BeStride_Debug:Critical("Critical: " .. buttontype) | ||
end | ||
end | ||
|
||
-- +-------+ -- | ||
-- Any Mount -- | ||
-- +-------+ -- | ||
|
||
-- Action Button Wrapper | ||
function BeStride_ActionButtonRegularMount:PreClick() | ||
if BeStride_Logic:IsCombat() then | ||
return | ||
end | ||
|
||
local mount = BeStride_Logic:Regular() | ||
if mount ~= nil then | ||
self:SetAttribute("macrotext",mount) | ||
--BeStride_Debug:Verbose(self:GetAttribute("macrotext")) | ||
end | ||
end | ||
|
||
-- Action Button Cleanup | ||
function BeStride_ActionButtonRegularMount:PostClick() | ||
if BeStride_Logic:IsCombat() then | ||
return | ||
end | ||
|
||
BeStride_ABRegularMount:SetAttribute("macrotext", nil) | ||
end | ||
|
||
|
||
-- +----------+ -- | ||
-- Ground Mount -- | ||
-- +----------+ -- | ||
|
||
-- Action Button Wrapper | ||
function BeStride_ActionButtonGroundMount:PreClick() | ||
if BeStride_Logic:IsCombat() then | ||
return | ||
end | ||
local mount = BeStride_Logic:GroundMountButton() | ||
if mount ~= nil then | ||
self:SetAttribute("macrotext",mount) | ||
end | ||
end | ||
|
||
-- Action Button Cleanup | ||
function BeStride_ActionButtonGroundMount:PostClick() | ||
if BeStride_Logic:IsCombat() then | ||
return | ||
end | ||
|
||
BeStride_ABRegularMount:SetAttribute("macrotext", nil) | ||
end | ||
|
||
|
||
-- +-------------+ -- | ||
-- Passenger Mount -- | ||
-- +-------------+ -- | ||
|
||
-- Action Button Wrapper | ||
function BeStride_ActionButtonPassengerMount:PreClick() | ||
if BeStride_Logic:IsCombat() then | ||
return | ||
end | ||
|
||
local mount = BeStride_Logic:PassengerMountButton() | ||
if mount ~= nil then | ||
self:SetAttribute("macrotext",mount) | ||
end | ||
end | ||
|
||
-- Action Button Cleanup | ||
function BeStride_ActionButtonPassengerMount:PostClick() | ||
if BeStride_Logic:IsCombat() then | ||
return | ||
end | ||
|
||
BeStride_ABRegularMount:SetAttribute("macrotext", nil) | ||
end | ||
|
||
|
||
-- +----------+ -- | ||
-- Repair Mount -- | ||
-- +----------+ -- | ||
|
||
-- Action Button Wrapper | ||
function BeStride_ActionButtonRepairMount:PreClick() | ||
if BeStride_Logic:IsCombat() then | ||
return | ||
end | ||
|
||
local mount = BeStride_Logic:RepairMountButton() | ||
if mount ~= nil then | ||
self:SetAttribute("macrotext",mount) | ||
end | ||
end | ||
|
||
-- Action Button Cleanup | ||
function BeStride_ActionButtonRepairMount:PostClick() | ||
if BeStride_Logic:IsCombat() then | ||
return | ||
end | ||
|
||
BeStride_ABRegularMount:SetAttribute("macrotext", nil) | ||
end |
Oops, something went wrong.