From 50f2fc7b22f0e7212d74fe72b376ab6a73956fe8 Mon Sep 17 00:00:00 2001 From: Imbus Date: Sat, 28 Oct 2023 19:43:10 +0200 Subject: [PATCH] Multiple versions --- binds.lua | 34 ++++++++++++++++++---------------- binds_Mainline.toc | 6 ++++++ binds.toc => binds_Wrath.toc | 2 +- 3 files changed, 25 insertions(+), 17 deletions(-) create mode 100755 binds_Mainline.toc rename binds.toc => binds_Wrath.toc (79%) diff --git a/binds.lua b/binds.lua index 4cab77c..e3fa6ff 100755 --- a/binds.lua +++ b/binds.lua @@ -27,6 +27,7 @@ local myBinds = { ["F1"] = "TOGGLEBACKPACK", ["F2"] = "TOGGLECHARACTER0", + -- Remove zoom from mousewheel ["-"] = "CAMERAZOOMOUT", ["+"] = "CAMERAZOOMIN", @@ -108,12 +109,20 @@ local function setAllBinds() print("Bindings set. Run /binds permanent to save them permanently.") end +local function enableBars() + SetActionBarToggles(1, 1, 1, 1, 1); + SHOW_MULTI_ACTIONBAR_1 = 1 --Bottom Left Bar + SHOW_MULTI_ACTIONBAR_2 = 1 --Bottom Right Bar + SHOW_MULTI_ACTIONBAR_3 = 1 --Right Bar + SHOW_MULTI_ACTIONBAR_4 = 1 --Right Bar 2 + MultiActionBar_Update(); + InterfaceOptions_UpdateMultiActionBars(); + SetCVar("alwaysShowActionBars", 1); + SetCVar("lockActionBars", 1); + SetCVar("countdownForCooldowns", 1 ); +end + local function BindsHandler(msg, editbox) - if msg == "permanent" then - SaveBindings(1) - print("Bindings saved permanently. Enjoy!") - return - end if msg == "reset" then for key, action in pairs(myBinds) do unsetBinding(action) @@ -123,20 +132,13 @@ local function BindsHandler(msg, editbox) end if msg == "" then setAllBinds() - return - end - if msg == "help" then - print("Usage: /binds [ permanent | bars | reset | help ]") - return - end - if msg == "bars" then - print("\124cFFFF0000THIS DOESENT WORK YET\124r") - SetActionBarToggles(1, 1, 1, 1); - MultiActionBar_Update(); + enableBars() + SaveBindings(1) + ReloadUI() return end end -- Register the /hello command SLASH_BINDS1 = "/binds" -SlashCmdList["BINDS"] = BindsHandler \ No newline at end of file +SlashCmdList["BINDS"] = BindsHandler diff --git a/binds_Mainline.toc b/binds_Mainline.toc new file mode 100755 index 0000000..51106cb --- /dev/null +++ b/binds_Mainline.toc @@ -0,0 +1,6 @@ +## Interface: 100107 +## Title: ImbusBindings +## Author: Imbus +## Version: 0.1.1 + +binds.lua \ No newline at end of file diff --git a/binds.toc b/binds_Wrath.toc similarity index 79% rename from binds.toc rename to binds_Wrath.toc index 6e04e6a..2b844d6 100755 --- a/binds.toc +++ b/binds_Wrath.toc @@ -1,6 +1,6 @@ ## Interface: 30403 ## Title: ImbusBindings ## Author: Imbus -## Version: 0.1 +## Version: 0.1.1 binds.lua \ No newline at end of file