1.9.0_9.0.1
This commit is contained in:
parent
55d2c154b5
commit
dbb50ecc96
|
@ -1,6 +1,6 @@
|
|||
-- MxW (MxW Addon)
|
||||
-- By mikx
|
||||
-- https://git.mikx.xyz/wow/MxW_Addon
|
||||
-- https://git.mikx.xyz/mikx/MxW_Addon
|
||||
-- Licensed under the GNU General Public License 3.0
|
||||
-- See included License file for more informations.
|
||||
|
||||
|
@ -29,7 +29,10 @@ LOOT_OPENED_Frame:SetScript("OnEvent",
|
|||
-- get the iteminfo using the slot itemlink
|
||||
name, link, quality, iLevel, reqLevel, class, subclass, maxStack, equipSlot, texture, vendorPrice = GetItemInfo(iLink)
|
||||
-- get the item value using the link, return nil if the item has no value
|
||||
value = MX.TSM:GetItemValue(link, "DBMarket");
|
||||
local itemId = MX:ToItemID(link);
|
||||
if (itemId ~= nil) then
|
||||
value = MX.TSM:GetItemValue(itemId, "DBMarket");
|
||||
end
|
||||
|
||||
-- MINIMUM QUALITY SETTINGS ------
|
||||
local eq = 2 -- equipable quality
|
||||
|
@ -72,8 +75,12 @@ LOOT_OPENED_Frame:SetScript("OnEvent",
|
|||
MX:ChatGuildLootMessage(link,value);
|
||||
end
|
||||
end
|
||||
value = nil
|
||||
iLink = nil
|
||||
end
|
||||
if (value ~= nil) then
|
||||
Farmer_Money_LootSession = Farmer_Money_LootSession + value;
|
||||
MX:UpdateMainUI()
|
||||
value = nil
|
||||
iLink = nil
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
-- MxW (MxW Addon)
|
||||
-- By mikx
|
||||
-- https://git.mikx.xyz/wow/MxW_Addon
|
||||
-- https://git.mikx.xyz/mikx/MxW_Addon
|
||||
-- Licensed under the GNU General Public License 3.0
|
||||
-- See included License file for more informations.
|
||||
|
||||
|
@ -17,7 +17,7 @@ PLAYER_MONEY_Frame:SetScript("OnEvent", function(self, event, ...)
|
|||
|
||||
if (DiffGold > 0) then -- Gold gain
|
||||
|
||||
local date = C_Calendar.GetDate();
|
||||
local date = C_DateAndTime.GetCurrentCalendarTime();
|
||||
local weekday, month, day, year = date.weekday, date.month, date.monthDay, date.year;
|
||||
|
||||
-- Write to SavedVariables
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
-- MxW (MxW Addon)
|
||||
-- By mikx
|
||||
-- https://git.mikx.xyz/wow/MxW_Addon
|
||||
-- https://git.mikx.xyz/mikx/MxW_Addon
|
||||
-- Licensed under the GNU General Public License 3.0
|
||||
-- See included License file for more informations.
|
||||
|
||||
|
@ -12,7 +12,7 @@ local GUI_LOOTCOLLECTED, GUI_SCROLLCONTAINER
|
|||
local lootCollectedLastEntry = nil
|
||||
local mxwVersion = GetAddOnMetadata("MxW", "Version")
|
||||
|
||||
local date = C_Calendar.GetDate();
|
||||
local date = C_DateAndTime.GetCurrentCalendarTime();
|
||||
local weekday, month, day, year = date.weekday, date.month, date.monthDay, date.year;
|
||||
|
||||
local backdrop = {
|
||||
|
@ -25,27 +25,30 @@ local backdrop = {
|
|||
local labTodayGold = AceGUI:Create("Label")
|
||||
local labMonthGold = AceGUI:Create("Label")
|
||||
local labDailyRecord = AceGUI:Create("Label")
|
||||
local labLootSession = AceGUI:Create("Label")
|
||||
local labDayCounter = AceGUI:Create("Label")
|
||||
|
||||
local EditBoxMinAlert = AceGUI:Create("EditBox")
|
||||
|
||||
function MX:ShowMainUI()
|
||||
local MAIN_UI = AceGUI:Create("Window")
|
||||
MAIN_UI:SetHeight(30)
|
||||
MAIN_UI:SetHeight(100)
|
||||
MAIN_UI:SetTitle("MxW " .. self.db.profile.version)
|
||||
MAIN_UI:SetStatusTable(self.db.profile.mainUI)
|
||||
MAIN_UI:SetLayout("List")
|
||||
MAIN_UI:SetWidth(200)
|
||||
MAIN_UI:EnableResize(false)
|
||||
|
||||
labTodayGold:SetFont("Interface\\Addons\\MxW\\Media\\Font\\Homespun.ttf", 10)
|
||||
labTodayGold:SetFont("Interface\\Addons\\MxW\\Media\\Font\\Consola.ttf", 12)
|
||||
labTodayGold:SetColor(1, 1, 1)
|
||||
labTodayGold:SetFullWidth(true)
|
||||
labTodayGold:SetPoint("LEFT", 30, 15)
|
||||
MAIN_UI:AddChild(labTodayGold)
|
||||
|
||||
labMonthGold:SetFont("Interface\\Addons\\MxW\\Media\\Font\\Homespun.ttf", 10)
|
||||
labMonthGold:SetFont("Interface\\Addons\\MxW\\Media\\Font\\Consola.ttf", 12)
|
||||
labMonthGold:SetColor(1, 1, 1)
|
||||
labMonthGold:SetFullWidth(true)
|
||||
labMonthGold:SetPoint("LEFT", 30, 15)
|
||||
MAIN_UI:AddChild(labMonthGold)
|
||||
|
||||
local labSpaceB = AceGUI:Create("Label")
|
||||
|
@ -55,15 +58,27 @@ function MX:ShowMainUI()
|
|||
labSpaceB:SetText(" ")
|
||||
MAIN_UI:AddChild(labSpaceB)
|
||||
|
||||
labDailyRecord:SetFont("Interface\\Addons\\MxW\\Media\\Font\\Homespun.ttf", 10)
|
||||
labDailyRecord:SetFont("Interface\\Addons\\MxW\\Media\\Font\\Consola.ttf", 12)
|
||||
labDailyRecord:SetColor(1, 1, 1)
|
||||
labDailyRecord:SetFullWidth(true)
|
||||
MAIN_UI:AddChild(labDailyRecord)
|
||||
|
||||
local BUTTON_SETTINGS = AceGUI:Create("Button")
|
||||
labLootSession:SetFont("Interface\\Addons\\MxW\\Media\\Font\\Consola.ttf", 12)
|
||||
labLootSession:SetColor(1, 1, 1)
|
||||
labLootSession:SetFullWidth(true)
|
||||
MAIN_UI:AddChild(labLootSession)
|
||||
|
||||
local labSpaceB = AceGUI:Create("Label")
|
||||
labSpaceB:SetFont("Fonts\\FRIZQT__.TTF", 10)
|
||||
labSpaceB:SetColor(1, 1, 1)
|
||||
labSpaceB:SetFullWidth(true)
|
||||
labSpaceB:SetText(" ")
|
||||
MAIN_UI:AddChild(labSpaceB)
|
||||
|
||||
local BUTTON_SETTINGS = AceGUI:Create("Button")
|
||||
BUTTON_SETTINGS:SetAutoWidth(true)
|
||||
BUTTON_SETTINGS:SetText(L["MainForm_Button_Settings"])
|
||||
BUTTON_SETTINGS:SetPoint("RIGHT", 5, 15)
|
||||
BUTTON_SETTINGS:SetText("C")
|
||||
BUTTON_SETTINGS:SetPoint("LEFT", 5, 15)
|
||||
BUTTON_SETTINGS:SetCallback("OnClick",
|
||||
function()
|
||||
MX:ShowSettingsUI()
|
||||
|
@ -192,6 +207,7 @@ function MX:UpdateMainUI()
|
|||
labTodayGold:SetText(format("%s (%s)", MX:FormatMoney(Farmer_Money_DayGlobal),L["MainForm_Label_Money_Lab_Today"]))
|
||||
labMonthGold:SetText(format("%s (%s)", MX:FormatMoney(Farmer_Money_MonthGlobal),L["MainForm_Label_Money_Lab_Month"]))
|
||||
labDailyRecord:SetText(format("%s %s", MX:FormatMoneyGoldOnly(DailyRecord), L["Chat_ChatGuildDailyRecordUI"]))
|
||||
labLootSession:SetText(format("%s (Loot)", MX:FormatMoneyGoldOnly(Farmer_Money_LootSession)))
|
||||
end
|
||||
|
||||
function MX:ShowMain()
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
-- MxW (MxW Addon)
|
||||
-- By mikx
|
||||
-- https://git.mikx.xyz/wow/MxW_Addon
|
||||
-- https://git.mikx.xyz/mikx/MxW_Addon
|
||||
-- Licensed under the GNU General Public License 3.0
|
||||
-- See included License file for more informations.
|
||||
|
||||
|
@ -42,9 +42,18 @@ function CookAlert(frame, item, fvalue)
|
|||
background:SetTexCoord(0, 0.605, 0, 0.703);
|
||||
background:SetPoint("TOPLEFT", 0, 0);
|
||||
background:SetPoint("BOTTOMRIGHT", 0, 0);
|
||||
frame:SetBackdrop(backdrop)
|
||||
frame:SetBackdropColor(0, 0, 0)
|
||||
frame:SetBackdropBorderColor(0.4, 0.4, 0.4)
|
||||
frame.Backdrop = CreateFrame("Frame", name.."Backdrop", f, "BackdropTemplate");
|
||||
frame.Backdrop:SetAllPoints();
|
||||
frame.Backdrop.backdropInfo = {
|
||||
bgFile = "Interface\Tooltips\UI-Tooltip-Background",
|
||||
edgeFile = "Interface\Tooltips\UI-Tooltip-Border",
|
||||
edgeSize = 2,
|
||||
insets = { left = 11, right = 12, top = 12, bottom = 9, },
|
||||
};
|
||||
frame.Backdrop:SetBackdrop(frame.Backdrop.backdropInfo);
|
||||
--frame:SetBackdrop(backdrop)
|
||||
frame.Backdrop:SetBackdropColor(51, 51, 51);
|
||||
frame.Backdrop:SetBackdropBorderColor(0, 0, 0);
|
||||
--local iconBorder = frame.Icon.Overlay;
|
||||
--iconBorder:SetTexture("Interface\\AchievementFrame\\UI-Achievement-IconFrame");
|
||||
--iconBorder:SetTexCoord(0, 0.5625, 0, 0.5625);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
-- MxW (MxW Addon)
|
||||
-- By mikx
|
||||
-- https://git.mikx.xyz/wow/MxW_Addon
|
||||
-- https://git.mikx.xyz/mikx/MxW_Addon
|
||||
-- Licensed under the GNU General Public License 3.0
|
||||
-- See included License file for more informations.
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
-- MxW (MxW Addon)
|
||||
-- By mikx
|
||||
-- https://git.mikx.xyz/wow/MxW_Addon
|
||||
-- https://git.mikx.xyz/mikx/MxW_Addon
|
||||
-- Licensed under the GNU General Public License 3.0
|
||||
-- See included License file for more informations.
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
-- MxW (MxW Addon)
|
||||
-- By mikx
|
||||
-- https://git.mikx.xyz/mikx/MxW_Addon
|
||||
-- Licensed under the GNU General Public License 3.0
|
||||
-- See included License file for more informations.
|
||||
|
||||
local MX = LibStub("AceAddon-3.0"):GetAddon("MxW");
|
||||
local L = LibStub("AceLocale-3.0"):GetLocale("MxW");
|
||||
|
||||
function MX:ToItemID(itemString)
|
||||
if not itemString then
|
||||
return
|
||||
end
|
||||
|
||||
local _, _, Color, Ltype, Id, Enchant, Gem1, Gem2, Gem3, Gem4, Suffix, Unique, LinkLvl, reforging, Name = string.find(itemString, "|?c?f?f?(%x*)|?H?([^:]*):?(%d+):?(%d*):?(%d*):?(%d*):?(%d*):?(%d*):?(%-?%d*):?(%-?%d*):?(%d*):?(%d*)|?h?%[?([^%[%]]*)%]?|?h?|?r?")
|
||||
|
||||
return tonumber(Id)
|
||||
end
|
|
@ -2,6 +2,7 @@
|
|||
<Script file="Alert.lua"/>
|
||||
<Script file="DB.lua"/>
|
||||
<Script file="Chat.lua"/>
|
||||
<Script file="Item.lua"/>
|
||||
<Script file="Math.lua"/>
|
||||
<Script file="Money.lua"/>
|
||||
<Script file="TSM.lua"/>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
-- MxW (MxW Addon)
|
||||
-- By mikx
|
||||
-- https://git.mikx.xyz/wow/MxW_Addon
|
||||
-- https://git.mikx.xyz/mikx/MxW_Addon
|
||||
-- Licensed under the GNU General Public License 3.0
|
||||
-- See included License file for more informations.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
-- MxW (MxW Addon)
|
||||
-- By mikx
|
||||
-- https://git.mikx.xyz/wow/MxW_Addon
|
||||
-- https://git.mikx.xyz/mikx/MxW_Addon
|
||||
-- Licensed under the GNU General Public License 3.0
|
||||
-- See included License file for more informations.
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
-- MxW (MxW Addon)
|
||||
-- By mikx
|
||||
-- https://git.mikx.xyz/wow/MxW_Addon
|
||||
-- https://git.mikx.xyz/mikx/MxW_Addon
|
||||
-- Licensed under the GNU General Public License 3.0
|
||||
-- See included License file for more informations.
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
-- MxW (MxW Addon)
|
||||
-- By mikx
|
||||
-- https://git.mikx.xyz/wow/MxW_Addon
|
||||
-- https://git.mikx.xyz/mikx/MxW_Addon
|
||||
-- Licensed under the GNU General Public License 3.0
|
||||
-- See included License file for more informations.
|
||||
|
||||
|
@ -16,5 +16,6 @@ MX.TSM = MX.TSM or {}
|
|||
-- GetItemValue(itemID, priceSource)
|
||||
-- Return itemID value as a int using priceSource
|
||||
function MX.TSM:GetItemValue(itemID, priceSource)
|
||||
return TSMAPI_FOUR.CustomPrice.GetValue(priceSource, itemID)
|
||||
local itemLink = "i:" .. tostring(itemID);
|
||||
return TSM_API.GetCustomPriceValue(priceSource, itemLink)
|
||||
end
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
<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">
|
||||
|
||||
<Include file="UIDropDownMenuTemplates.xml"/>
|
||||
<script file="UIDropDownMenu.lua"/>
|
||||
<script file="EasyMenu.lua"/>
|
||||
|
||||
</Ui>
|
|
@ -1,34 +0,0 @@
|
|||
|
||||
-- Simplified Menu Display System
|
||||
-- This is a basic system for displaying a menu from a structure table.
|
||||
--
|
||||
-- See UIDropDownMenu.lua for the menuList details.
|
||||
--
|
||||
-- Args:
|
||||
-- menuList - menu table
|
||||
-- menuFrame - the UI frame to populate
|
||||
-- anchor - where to anchor the frame (e.g. CURSOR)
|
||||
-- x - x offset
|
||||
-- y - y offset
|
||||
-- displayMode - border type
|
||||
-- autoHideDelay - how long until the menu disappears
|
||||
--
|
||||
--
|
||||
function Lib_EasyMenu(menuList, menuFrame, anchor, x, y, displayMode, autoHideDelay )
|
||||
if ( displayMode == "MENU" ) then
|
||||
menuFrame.displayMode = displayMode;
|
||||
end
|
||||
Lib_UIDropDownMenu_Initialize(menuFrame, Lib_EasyMenu_Initialize, displayMode, nil, menuList);
|
||||
Lib_ToggleDropDownMenu(1, nil, menuFrame, anchor, x, y, menuList, nil, autoHideDelay);
|
||||
end
|
||||
|
||||
function Lib_EasyMenu_Initialize( frame, level, menuList )
|
||||
for index = 1, #menuList do
|
||||
local value = menuList[index]
|
||||
if (value.text) then
|
||||
value.index = index;
|
||||
Lib_UIDropDownMenu_AddButton( value, level );
|
||||
end
|
||||
end
|
||||
end
|
||||
|
File diff suppressed because it is too large
Load Diff
|
@ -1,413 +0,0 @@
|
|||
<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="Lib_UIDropDownMenuButtonTemplate" virtual="true">
|
||||
<Size x="100" y="16"/>
|
||||
<Layers>
|
||||
<Layer level="BACKGROUND">
|
||||
<Texture name="$parentHighlight" file="Interface\QuestFrame\UI-QuestTitleHighlight" alphaMode="ADD" setAllPoints="true" hidden="true"/>
|
||||
</Layer>
|
||||
<Layer level="ARTWORK">
|
||||
<Texture name="$parentCheck" file="Interface\Common\UI-DropDownRadioChecks">
|
||||
<Size x="16" y="16"/>
|
||||
<Anchors>
|
||||
<Anchor point="LEFT">
|
||||
<Offset x="0" y="0"/>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<TexCoords left="0" right="0.5" top="0.5" bottom="1.0"/>
|
||||
</Texture>
|
||||
<Texture name="$parentUnCheck" file="Interface\Common\UI-DropDownRadioChecks">
|
||||
<Size x="16" y="16"/>
|
||||
<Anchors>
|
||||
<Anchor point="LEFT">
|
||||
<Offset x="0" y="0"/>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<TexCoords left="0.5" right="1.0" top="0.5" bottom="1.0"/>
|
||||
</Texture>
|
||||
<Texture name="$parentIcon" hidden="true">
|
||||
<Size>
|
||||
<AbsDimension x="16" y="16"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="RIGHT">
|
||||
<Offset x="0" y="0"/>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</Texture>
|
||||
</Layer>
|
||||
</Layers>
|
||||
<Frames>
|
||||
<Button name="$parentColorSwatch" hidden="true">
|
||||
<Size>
|
||||
<AbsDimension x="16" y="16"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="RIGHT">
|
||||
<Offset>
|
||||
<AbsDimension x="-6" y="0"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<Layers>
|
||||
<Layer level="BACKGROUND">
|
||||
<Texture name="$parentSwatchBg">
|
||||
<Size>
|
||||
<AbsDimension x="14" y="14"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="CENTER">
|
||||
<Offset>
|
||||
<AbsDimension x="0" y="0"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<Color r="1.0" g="1.0" b="1.0"/>
|
||||
</Texture>
|
||||
</Layer>
|
||||
</Layers>
|
||||
<Scripts>
|
||||
<OnClick>
|
||||
CloseMenus();
|
||||
Lib_UIDropDownMenuButton_OpenColorPicker(self:GetParent());
|
||||
</OnClick>
|
||||
<OnEnter>
|
||||
Lib_CloseDropDownMenus(self:GetParent():GetParent():GetID() + 1);
|
||||
_G[self:GetName().."SwatchBg"]:SetVertexColor(NORMAL_FONT_COLOR.r, NORMAL_FONT_COLOR.g, NORMAL_FONT_COLOR.b);
|
||||
Lib_UIDropDownMenu_StopCounting(self:GetParent():GetParent());
|
||||
</OnEnter>
|
||||
<OnLeave>
|
||||
_G[self:GetName().."SwatchBg"]:SetVertexColor(HIGHLIGHT_FONT_COLOR.r, HIGHLIGHT_FONT_COLOR.g, HIGHLIGHT_FONT_COLOR.b);
|
||||
Lib_UIDropDownMenu_StartCounting(self:GetParent():GetParent());
|
||||
</OnLeave>
|
||||
</Scripts>
|
||||
<NormalTexture name="$parentNormalTexture" file="Interface\ChatFrame\ChatFrameColorSwatch"/>
|
||||
</Button>
|
||||
<Button name="$parentExpandArrow" hidden="true">
|
||||
<Size>
|
||||
<AbsDimension x="16" y="16"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="RIGHT">
|
||||
<Offset>
|
||||
<AbsDimension x="0" y="0"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<Scripts>
|
||||
<OnClick>
|
||||
Lib_ToggleDropDownMenu(self:GetParent():GetParent():GetID() + 1, self:GetParent().value, nil, nil, nil, nil, self:GetParent().menuList, self);
|
||||
</OnClick>
|
||||
<OnEnter>
|
||||
local level = self:GetParent():GetParent():GetID() + 1;
|
||||
local listFrame = _G["Lib_DropDownList"..level];
|
||||
if ( not listFrame or not listFrame:IsShown() or select(2, listFrame:GetPoint()) ~= self ) then
|
||||
Lib_ToggleDropDownMenu(level, self:GetParent().value, nil, nil, nil, nil, self:GetParent().menuList, self);
|
||||
end
|
||||
Lib_UIDropDownMenu_StopCounting(self:GetParent():GetParent());
|
||||
</OnEnter>
|
||||
<OnLeave>
|
||||
Lib_UIDropDownMenu_StartCounting(self:GetParent():GetParent());
|
||||
</OnLeave>
|
||||
</Scripts>
|
||||
<NormalTexture file="Interface\ChatFrame\ChatFrameExpandArrow"/>
|
||||
</Button>
|
||||
<Button name="$parentInvisibleButton" hidden="true" parentKey="invisibleButton">
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT"/>
|
||||
<Anchor point="BOTTOMLEFT"/>
|
||||
<Anchor point="RIGHT" relativeTo="$parentColorSwatch" relativePoint="LEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="0" y="0"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<Scripts>
|
||||
<OnEnter>
|
||||
Lib_UIDropDownMenu_StopCounting(self:GetParent():GetParent());
|
||||
Lib_CloseDropDownMenus(self:GetParent():GetParent():GetID() + 1);
|
||||
local parent = self:GetParent();
|
||||
if ( parent.tooltipTitle and parent.tooltipWhileDisabled) then
|
||||
if ( parent.tooltipOnButton ) then
|
||||
GameTooltip:SetOwner(parent, "ANCHOR_RIGHT");
|
||||
GameTooltip:AddLine(parent.tooltipTitle, 1.0, 1.0, 1.0);
|
||||
GameTooltip:AddLine(parent.tooltipText, nil, nil, nil, true);
|
||||
GameTooltip:Show();
|
||||
else
|
||||
GameTooltip_AddNewbieTip(parent, parent.tooltipTitle, 1.0, 1.0, 1.0, parent.tooltipText, 1);
|
||||
end
|
||||
end
|
||||
</OnEnter>
|
||||
<OnLeave>
|
||||
Lib_UIDropDownMenu_StartCounting(self:GetParent():GetParent());
|
||||
GameTooltip:Hide();
|
||||
</OnLeave>
|
||||
</Scripts>
|
||||
</Button>
|
||||
</Frames>
|
||||
<Scripts>
|
||||
<OnLoad>
|
||||
self:SetFrameLevel(self:GetParent():GetFrameLevel()+2);
|
||||
</OnLoad>
|
||||
<OnClick>
|
||||
Lib_UIDropDownMenuButton_OnClick(self, button, down);
|
||||
</OnClick>
|
||||
<OnEnter>
|
||||
if ( self.hasArrow ) then
|
||||
local level = self:GetParent():GetID() + 1;
|
||||
local listFrame = _G["Lib_DropDownList"..level];
|
||||
if ( not listFrame or not listFrame:IsShown() or select(2, listFrame:GetPoint()) ~= self ) then
|
||||
Lib_ToggleDropDownMenu(self:GetParent():GetID() + 1, self.value, nil, nil, nil, nil, self.menuList, self);
|
||||
end
|
||||
else
|
||||
Lib_CloseDropDownMenus(self:GetParent():GetID() + 1);
|
||||
end
|
||||
_G[self:GetName().."Highlight"]:Show();
|
||||
Lib_UIDropDownMenu_StopCounting(self:GetParent());
|
||||
if ( self.tooltipTitle ) then
|
||||
if ( self.tooltipOnButton ) then
|
||||
GameTooltip:SetOwner(self, "ANCHOR_RIGHT");
|
||||
GameTooltip:AddLine(self.tooltipTitle, 1.0, 1.0, 1.0);
|
||||
GameTooltip:AddLine(self.tooltipText, nil, nil, nil, true);
|
||||
GameTooltip:Show();
|
||||
else
|
||||
GameTooltip_AddNewbieTip(self, self.tooltipTitle, 1.0, 1.0, 1.0, self.tooltipText, 1);
|
||||
end
|
||||
end
|
||||
</OnEnter>
|
||||
<OnLeave>
|
||||
_G[self:GetName().."Highlight"]:Hide();
|
||||
Lib_UIDropDownMenu_StartCounting(self:GetParent());
|
||||
GameTooltip:Hide();
|
||||
</OnLeave>
|
||||
<OnEnable>
|
||||
self.invisibleButton:Hide();
|
||||
</OnEnable>
|
||||
<OnDisable>
|
||||
self.invisibleButton:Show();
|
||||
</OnDisable>
|
||||
</Scripts>
|
||||
<ButtonText name="$parentNormalText">
|
||||
<Anchors>
|
||||
<Anchor point="LEFT">
|
||||
<Offset x="-5" y="0"/>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</ButtonText>
|
||||
<NormalFont style="GameFontHighlightSmallLeft"/>
|
||||
<HighlightFont style="GameFontHighlightSmallLeft"/>
|
||||
<DisabledFont style="GameFontDisableSmallLeft"/>
|
||||
</Button>
|
||||
|
||||
<Button name="Lib_UIDropDownListTemplate" hidden="true" frameStrata="DIALOG" enableMouse="true" virtual="true">
|
||||
<Frames>
|
||||
<Frame name="$parentBackdrop" setAllPoints="true">
|
||||
<Backdrop bgFile="Interface\DialogFrame\UI-DialogBox-Background-Dark" edgeFile="Interface\DialogFrame\UI-DialogBox-Border" tile="true">
|
||||
<BackgroundInsets>
|
||||
<AbsInset left="11" right="12" top="12" bottom="9"/>
|
||||
</BackgroundInsets>
|
||||
<TileSize>
|
||||
<AbsValue val="32"/>
|
||||
</TileSize>
|
||||
<EdgeSize>
|
||||
<AbsValue val="32"/>
|
||||
</EdgeSize>
|
||||
</Backdrop>
|
||||
</Frame>
|
||||
<Frame name="$parentMenuBackdrop" setAllPoints="true">
|
||||
<Backdrop bgFile="Interface\Tooltips\UI-Tooltip-Background" edgeFile="Interface\Tooltips\UI-Tooltip-Border" tile="true">
|
||||
<EdgeSize>
|
||||
<AbsValue val="16"/>
|
||||
</EdgeSize>
|
||||
<TileSize>
|
||||
<AbsValue val="16"/>
|
||||
</TileSize>
|
||||
<BackgroundInsets>
|
||||
<AbsInset left="5" right="5" top="5" bottom="4"/>
|
||||
</BackgroundInsets>
|
||||
</Backdrop>
|
||||
<Scripts>
|
||||
<OnLoad>
|
||||
self:SetBackdropBorderColor(TOOLTIP_DEFAULT_COLOR.r, TOOLTIP_DEFAULT_COLOR.g, TOOLTIP_DEFAULT_COLOR.b);
|
||||
self:SetBackdropColor(TOOLTIP_DEFAULT_BACKGROUND_COLOR.r, TOOLTIP_DEFAULT_BACKGROUND_COLOR.g, TOOLTIP_DEFAULT_BACKGROUND_COLOR.b);
|
||||
</OnLoad>
|
||||
</Scripts>
|
||||
</Frame>
|
||||
<Button name="$parentButton1" inherits="Lib_UIDropDownMenuButtonTemplate" id="1"/>
|
||||
<Button name="$parentButton2" inherits="Lib_UIDropDownMenuButtonTemplate" id="2"/>
|
||||
<Button name="$parentButton3" inherits="Lib_UIDropDownMenuButtonTemplate" id="3"/>
|
||||
<Button name="$parentButton4" inherits="Lib_UIDropDownMenuButtonTemplate" id="4"/>
|
||||
<Button name="$parentButton5" inherits="Lib_UIDropDownMenuButtonTemplate" id="5"/>
|
||||
<Button name="$parentButton6" inherits="Lib_UIDropDownMenuButtonTemplate" id="6"/>
|
||||
<Button name="$parentButton7" inherits="Lib_UIDropDownMenuButtonTemplate" id="7"/>
|
||||
<Button name="$parentButton8" inherits="Lib_UIDropDownMenuButtonTemplate" id="8"/>
|
||||
</Frames>
|
||||
<Scripts>
|
||||
<OnClick>
|
||||
self:Hide();
|
||||
</OnClick>
|
||||
<OnEnter>
|
||||
Lib_UIDropDownMenu_StopCounting(self, motion);
|
||||
</OnEnter>
|
||||
<OnLeave>
|
||||
Lib_UIDropDownMenu_StartCounting(self, motion);
|
||||
</OnLeave>
|
||||
<OnUpdate>
|
||||
Lib_UIDropDownMenu_OnUpdate(self, elapsed);
|
||||
</OnUpdate>
|
||||
<OnShow>
|
||||
for i=1, LIB_UIDROPDOWNMENU_MAXBUTTONS do
|
||||
if (not self.noResize) then
|
||||
_G[self:GetName().."Button"..i]:SetWidth(self.maxWidth);
|
||||
end
|
||||
end
|
||||
if (not self.noResize) then
|
||||
self:SetWidth(self.maxWidth+25);
|
||||
end
|
||||
self.showTimer = nil;
|
||||
if ( self:GetID() > 1 ) then
|
||||
self.parent = _G["Lib_DropDownList"..(self:GetID() - 1)];
|
||||
end
|
||||
</OnShow>
|
||||
<OnHide>
|
||||
Lib_UIDropDownMenu_OnHide(self);
|
||||
</OnHide>
|
||||
</Scripts>
|
||||
</Button>
|
||||
|
||||
<Frame name="Lib_UIDropDownMenuTemplate" virtual="true">
|
||||
<Size>
|
||||
<AbsDimension x="40" y="32"/>
|
||||
</Size>
|
||||
<Layers>
|
||||
<Layer level="ARTWORK">
|
||||
<Texture name="$parentLeft" file="Interface\Glues\CharacterCreate\CharacterCreate-LabelFrame">
|
||||
<Size>
|
||||
<AbsDimension x="25" y="64"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="0" y="17"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<TexCoords left="0" right="0.1953125" top="0" bottom="1"/>
|
||||
</Texture>
|
||||
<Texture name="$parentMiddle" file="Interface\Glues\CharacterCreate\CharacterCreate-LabelFrame">
|
||||
<Size>
|
||||
<AbsDimension x="115" y="64"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="LEFT" relativeTo="$parentLeft" relativePoint="RIGHT"/>
|
||||
</Anchors>
|
||||
<TexCoords left="0.1953125" right="0.8046875" top="0" bottom="1"/>
|
||||
</Texture>
|
||||
<Texture name="$parentRight" file="Interface\Glues\CharacterCreate\CharacterCreate-LabelFrame">
|
||||
<Size>
|
||||
<AbsDimension x="25" y="64"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="LEFT" relativeTo="$parentMiddle" relativePoint="RIGHT"/>
|
||||
</Anchors>
|
||||
<TexCoords left="0.8046875" right="1" top="0" bottom="1"/>
|
||||
</Texture>
|
||||
<FontString parentKey="Text" name="$parentText" inherits="GameFontHighlightSmall" wordwrap="false" justifyH="RIGHT">
|
||||
<Size>
|
||||
<AbsDimension x="0" y="10"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="RIGHT" relativeTo="$parentRight">
|
||||
<Offset>
|
||||
<AbsDimension x="-43" y="2"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</FontString>
|
||||
</Layer>
|
||||
<Layer level="OVERLAY">
|
||||
<Texture parentKey="Icon" name="$parentIcon" hidden="true">
|
||||
<Size>
|
||||
<AbsDimension x="16" y="16"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="LEFT">
|
||||
<Offset x="30" y="2"/>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</Texture>
|
||||
</Layer>
|
||||
</Layers>
|
||||
<Frames>
|
||||
<Button parentKey="Button" name="$parentButton" motionScriptsWhileDisabled="true" >
|
||||
<Size>
|
||||
<AbsDimension x="24" y="24"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="TOPRIGHT" relativeTo="$parentRight">
|
||||
<Offset>
|
||||
<AbsDimension x="-16" y="-18"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<Scripts>
|
||||
<OnEnter>
|
||||
local parent = self:GetParent();
|
||||
local myscript = parent:GetScript("OnEnter");
|
||||
if(myscript ~= nil) then
|
||||
myscript(parent);
|
||||
end
|
||||
</OnEnter>
|
||||
<OnLeave>
|
||||
local parent = self:GetParent();
|
||||
local myscript = parent:GetScript("OnLeave");
|
||||
if(myscript ~= nil) then
|
||||
myscript(parent);
|
||||
end
|
||||
</OnLeave>
|
||||
<OnClick>
|
||||
Lib_ToggleDropDownMenu(nil, nil, self:GetParent());
|
||||
PlaySound("igMainMenuOptionCheckBoxOn");
|
||||
</OnClick>
|
||||
</Scripts>
|
||||
<NormalTexture name="$parentNormalTexture" file="Interface\ChatFrame\UI-ChatIcon-ScrollDown-Up">
|
||||
<Size>
|
||||
<AbsDimension x="24" y="24"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="RIGHT"/>
|
||||
</Anchors>
|
||||
</NormalTexture>
|
||||
<PushedTexture name="$parentPushedTexture" file="Interface\ChatFrame\UI-ChatIcon-ScrollDown-Down">
|
||||
<Size>
|
||||
<AbsDimension x="24" y="24"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="RIGHT"/>
|
||||
</Anchors>
|
||||
</PushedTexture>
|
||||
<DisabledTexture name="$parentDisabledTexture" file="Interface\ChatFrame\UI-ChatIcon-ScrollDown-Disabled">
|
||||
<Size>
|
||||
<AbsDimension x="24" y="24"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="RIGHT"/>
|
||||
</Anchors>
|
||||
</DisabledTexture>
|
||||
<HighlightTexture name="$parentHighlightTexture" file="Interface\Buttons\UI-Common-MouseHilight" alphaMode="ADD">
|
||||
<Size>
|
||||
<AbsDimension x="24" y="24"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="RIGHT"/>
|
||||
</Anchors>
|
||||
</HighlightTexture>
|
||||
</Button>
|
||||
</Frames>
|
||||
<Scripts>
|
||||
<OnHide>
|
||||
Lib_CloseDropDownMenus();
|
||||
</OnHide>
|
||||
</Scripts>
|
||||
</Frame>
|
||||
</Ui>
|
|
@ -1,71 +0,0 @@
|
|||
Standard UIDropDownMenu global functions using protected frames and causing taints when used by third-party addons. But it is possible to avoid taints by using same functionality with that library.
|
||||
|
||||
== What is it ==
|
||||
Library is standard code from Blizzard's files EasyMenu.lua, UIDropDownMenu.lua and UIDropDownMenuTemplates.xml with frames, tables, variables and functions renamed to:
|
||||
* constants (typed with all CAPS): "LIB_" added at the start
|
||||
* functions: "Lib_" added at the start
|
||||
|
||||
== Constants ==
|
||||
* LIB_UIDROPDOWNMENU_MINBUTTONS
|
||||
* LIB_UIDROPDOWNMENU_MAXBUTTONS
|
||||
* LIB_UIDROPDOWNMENU_MAXLEVELS
|
||||
* LIB_UIDROPDOWNMENU_BUTTON_HEIGHT
|
||||
* LIB_UIDROPDOWNMENU_BORDER_HEIGHT
|
||||
* LIB_UIDROPDOWNMENU_OPEN_MENU
|
||||
* LIB_UIDROPDOWNMENU_INIT_MENU
|
||||
* LIB_UIDROPDOWNMENU_MENU_LEVEL
|
||||
* LIB_UIDROPDOWNMENU_MENU_VALUE
|
||||
* LIB_UIDROPDOWNMENU_SHOW_TIME
|
||||
* LIB_UIDROPDOWNMENU_DEFAULT_TEXT_HEIGHT
|
||||
* LIB_OPEN_DROPDOWNMENUS
|
||||
|
||||
== Functions ==
|
||||
* Lib_EasyMenu
|
||||
* Lib_EasyMenu_Initialize
|
||||
|
||||
* Lib_UIDropDownMenuDelegate_OnAttributeChanged
|
||||
* Lib_UIDropDownMenu_InitializeHelper
|
||||
* Lib_UIDropDownMenu_Initialize
|
||||
* Lib_UIDropDownMenu_OnUpdate
|
||||
* Lib_UIDropDownMenu_StartCounting
|
||||
* Lib_UIDropDownMenu_StopCounting
|
||||
* Lib_UIDropDownMenu_CreateInfo
|
||||
* Lib_UIDropDownMenu_CreateFrames
|
||||
* Lib_UIDropDownMenu_AddButton
|
||||
* Lib_UIDropDownMenu_Refresh
|
||||
* Lib_UIDropDownMenu_RefreshAll
|
||||
* Lib_UIDropDownMenu_SetIconImage
|
||||
* Lib_UIDropDownMenu_SetSelectedName
|
||||
* Lib_UIDropDownMenu_SetSelectedValue
|
||||
* Lib_UIDropDownMenu_SetSelectedID
|
||||
* Lib_UIDropDownMenu_GetSelectedName
|
||||
* Lib_UIDropDownMenu_GetSelectedID
|
||||
* Lib_UIDropDownMenu_GetSelectedValue
|
||||
* Lib_UIDropDownMenuButton_OnClick
|
||||
* Lib_HideDropDownMenu
|
||||
* Lib_ToggleDropDownMenu
|
||||
* Lib_CloseDropDownMenus
|
||||
* Lib_UIDropDownMenu_OnHide
|
||||
* Lib_UIDropDownMenu_SetWidth
|
||||
* Lib_UIDropDownMenu_SetButtonWidth
|
||||
* Lib_UIDropDownMenu_SetText
|
||||
* Lib_UIDropDownMenu_GetText
|
||||
* Lib_UIDropDownMenu_ClearAll
|
||||
* Lib_UIDropDownMenu_JustifyText
|
||||
* Lib_UIDropDownMenu_SetAnchor
|
||||
* Lib_UIDropDownMenu_GetCurrentDropDown
|
||||
* Lib_UIDropDownMenuButton_GetChecked
|
||||
* Lib_UIDropDownMenuButton_GetName
|
||||
* Lib_UIDropDownMenuButton_OpenColorPicker
|
||||
* Lib_UIDropDownMenu_DisableButton
|
||||
* Lib_UIDropDownMenu_EnableButton
|
||||
* Lib_UIDropDownMenu_SetButtonText
|
||||
* Lib_UIDropDownMenu_DisableDropDown
|
||||
* Lib_UIDropDownMenu_EnableDropDown
|
||||
* Lib_UIDropDownMenu_IsEnabled
|
||||
* Lib_UIDropDownMenu_GetValue
|
||||
|
||||
== How to use it ==
|
||||
|
||||
* Add it to your toc.
|
||||
* Like ordinal code for UIDropDownMenu with "Lib_" instead.
|
|
@ -24,5 +24,4 @@
|
|||
<Include file="LibCompress\lib.xml"/>
|
||||
<Include file="LibBase64-1.0\lib.xml"/>
|
||||
<Script file="LibAnim\LibAnim.lua"/>
|
||||
<Include file="DropDownMenu\DropDownMenu.xml"/>
|
||||
</Ui>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
-- MxW (MxW Addon)
|
||||
-- By mikx
|
||||
-- https://git.mikx.xyz/wow/MxW_Addon
|
||||
-- https://git.mikx.xyz/mikx/MxW_Addon
|
||||
-- Licensed under the GNU General Public License 3.0
|
||||
-- See included License file for more informations.
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
-- MxW (MxW Addon)
|
||||
-- By mikx
|
||||
-- https://git.mikx.xyz/wow/MxW_Addon
|
||||
-- https://git.mikx.xyz/mikx/MxW_Addon
|
||||
-- Licensed under the GNU General Public License 3.0
|
||||
-- See included License file for more informations.
|
||||
|
||||
|
|
Binary file not shown.
Binary file not shown.
8
MxW.toc
8
MxW.toc
|
@ -1,10 +1,10 @@
|
|||
## Interface: 80100
|
||||
## Interface: 90001
|
||||
## Title: |cff1784d1MxW|r
|
||||
## Version: 1.7.0_8.1.5
|
||||
## Version: 1.10.0_9.0.1
|
||||
## Author: mikx
|
||||
## Notes: MxW Addon
|
||||
## RequiredDeps: TradeSkillMaster
|
||||
## SavedVariables: MxWDB,DayCounter,DailyRecord,DailyRecordFlag,DailyTen,DailyTwenty,DailyThirty,DailyForty,DailyFifty,DailySixty,DailySeventy,DailyEighty,DailyNinety,DailyHundred,CurrentGold,Settings_Alert_Enabled,Settings_GuildMessage_Enabled,Farmer_Money_MonthBack,Farmer_Logic_Day,Farmer_Logic_MinUI,Farmer_Logic_MinAlert,Farmer_Money_MonthGlobal,Farmer_Money_DayGlobal
|
||||
## RequiredDeps: TradeSkillMaster,AddOnSkins
|
||||
## SavedVariables: MxWDB,DayCounter,DailyRecord,DailyRecordFlag,DailyTen,DailyTwenty,DailyThirty,DailyForty,DailyFifty,DailySixty,DailySeventy,DailyEighty,DailyNinety,DailyHundred,CurrentGold,Settings_Alert_Enabled,Settings_GuildMessage_Enabled,Farmer_Money_MonthBack,Farmer_Logic_Day,Farmer_Logic_MinUI,Farmer_Logic_MinAlert,Farmer_Money_MonthGlobal,Farmer_Money_DayGlobal,Farmer_Money_LootSession
|
||||
|
||||
Libraries\Load_Libraries.xml
|
||||
Locale\Load_Locales.xml
|
||||
|
|
12
init.lua
12
init.lua
|
@ -1,6 +1,6 @@
|
|||
-- MxW (MxW Addon)
|
||||
-- By mikx
|
||||
-- https://git.mikx.xyz/wow/MxW_Addon
|
||||
-- https://git.mikx.xyz/mikx/MxW_Addon
|
||||
-- Licensed under the GNU General Public License 3.0
|
||||
-- See included License file for more informations.
|
||||
|
||||
|
@ -8,7 +8,7 @@ local MX = LibStub("AceAddon-3.0"):NewAddon("MxW", "AceConsole-3.0", "AceEvent-3
|
|||
local L = LibStub("AceLocale-3.0"):GetLocale("MxW");
|
||||
local AceGUI = LibStub("AceGUI-3.0")
|
||||
|
||||
local date = C_Calendar.GetDate();
|
||||
local date = C_DateAndTime.GetCurrentCalendarTime();
|
||||
local weekday, month, day, year = date.weekday, date.month, date.monthDay, date.year;
|
||||
|
||||
local MXLDB = LibStub("LibDataBroker-1.1"):NewDataObject("MxW", {
|
||||
|
@ -40,6 +40,9 @@ function MX:OnInitialize()
|
|||
if (Farmer_Money_MonthGlobal == nil) then
|
||||
Farmer_Money_MonthGlobal = 0;
|
||||
end
|
||||
if (Farmer_Money_LootSession == nil) then
|
||||
Farmer_Money_LootSession = 0;
|
||||
end
|
||||
if (Farmer_Logic_MinUI == nil) then
|
||||
Farmer_Logic_MinUI = 500000; -- 50 golds
|
||||
end
|
||||
|
@ -138,9 +141,12 @@ local function MyAddonCommands(msg, editbox)
|
|||
DailyRecordFlag = false;
|
||||
ReloadUI();
|
||||
end
|
||||
elseif (msg == 'resetd') then
|
||||
elseif (msg == 'resetd' or msg == 'resetday') then
|
||||
Farmer_Money_DayGlobal = 0;
|
||||
ReloadUI();
|
||||
elseif (msg == 'resetl' or msg == 'resetloot') then
|
||||
Farmer_Money_LootSession = 0;
|
||||
ReloadUI();
|
||||
elseif (msg == 'alert') then
|
||||
if (Settings_Alert_Enabled) then
|
||||
Settings_Alert_Enabled = false;
|
||||
|
|
Loading…
Reference in New Issue