From c03715fbd3038c3e50f6a82464d9a0cf4620f1d9 Mon Sep 17 00:00:00 2001 From: Spit <19otari98@gmail.com> Date: Tue, 24 Sep 2024 10:24:30 +0300 Subject: [PATCH] add bindings --- Bindings.xml | 56 ++++++++++++++++++++++++++++++++++++++++++++++ Core/AtlasLoot.lua | 12 +++++++++- 2 files changed, 67 insertions(+), 1 deletion(-) create mode 100644 Bindings.xml diff --git a/Bindings.xml b/Bindings.xml new file mode 100644 index 0000000..79d0fbc --- /dev/null +++ b/Bindings.xml @@ -0,0 +1,56 @@ + + + AtlasLoot_Toggle() + + + AtlasLootOptions_Toggle() + + + if AtlasLootCharDB["QuickLooks"][1] then + if AtlasFrame and AtlasFrame:IsVisible() then + AtlasLootPanel_Preset1:Click() + else + ShowUIPanel(AtlasLootDefaultFrame) + AtlasLootDefaultFrame_Preset1:Click() + end + end + + + if AtlasLootCharDB["QuickLooks"][2] then + if AtlasFrame and AtlasFrame:IsVisible() then + AtlasLootPanel_Preset2:Click() + else + ShowUIPanel(AtlasLootDefaultFrame) + AtlasLootDefaultFrame_Preset2:Click() + end + end + + + if AtlasLootCharDB["QuickLooks"][3] then + if AtlasFrame and AtlasFrame:IsVisible() then + AtlasLootPanel_Preset3:Click() + else + ShowUIPanel(AtlasLootDefaultFrame) + AtlasLootDefaultFrame_Preset3:Click() + end + end + + + if AtlasLootCharDB["QuickLooks"][4] then + if AtlasFrame and AtlasFrame:IsVisible() then + AtlasLootPanel_Preset4:Click() + else + ShowUIPanel(AtlasLootDefaultFrame) + AtlasLootDefaultFrame_Preset4:Click() + end + end + + + if AtlasFrame and AtlasFrame:IsVisible() then + AtlasLootPanel_WishList:Click() + else + ShowUIPanel(AtlasLootDefaultFrame) + AtlasLootDefaultFrameWishListButton:Click() + end + + \ No newline at end of file diff --git a/Core/AtlasLoot.lua b/Core/AtlasLoot.lua index 4da37a6..c3a309e 100644 --- a/Core/AtlasLoot.lua +++ b/Core/AtlasLoot.lua @@ -61,6 +61,16 @@ strtrim ]] +--Bindings +BINDING_HEADER_ATLASLOOT_TITLE = "AtlasLoot Bindings" +BINDING_NAME_ATLASLOOT_TOGGLE = "Toggle AtlasLoot" +BINDING_NAME_ATLASLOOT_OPTIONS = "Toggle Options" +BINDING_NAME_ATLASLOOT_QL1 = "QuickLook 1" +BINDING_NAME_ATLASLOOT_QL2 = "QuickLook 2" +BINDING_NAME_ATLASLOOT_QL3 = "QuickLook 3" +BINDING_NAME_ATLASLOOT_QL4 = "QuickLook 4" +BINDING_NAME_ATLASLOOT_WISHLIST = "WishList" + AtlasLoot = AceLibrary("AceAddon-2.0"):new("AceDB-2.0") --Instance required libraries @@ -69,7 +79,7 @@ local AL = AceLibrary("AceLocale-2.2"):new("AtlasLoot"); --Establish version number and compatible version of Atlas local VERSION_MAJOR = "1"; local VERSION_MINOR = "1"; -local VERSION_BOSSES = "3"; +local VERSION_BOSSES = "4"; ATLASLOOT_VERSION = "|cffFF8400AtlasLoot TW Edition v"..VERSION_MAJOR.."."..VERSION_MINOR.."."..VERSION_BOSSES.."|r"; ATLASLOOT_CURRENT_ATLAS = "1.12.0"; ATLASLOOT_PREVIEW_ATLAS = "1.12.1";