From 5dc77acb3a8a01f78f1402177b58548fd67f62d5 Mon Sep 17 00:00:00 2001 From: Sidoine De Wispelaere Date: Sat, 19 Dec 2020 21:50:31 +0100 Subject: [PATCH] fix: spellFlashCore wasn't working with bartender and more fixes --- src/engine/action-bar.ts | 21 ++++++++++++++++++- src/ui/Options.ts | 44 ++++++++++++++++++++-------------------- 2 files changed, 42 insertions(+), 23 deletions(-) diff --git a/src/engine/action-bar.ts b/src/engine/action-bar.ts index 29dae64e8..be1a67b7e 100644 --- a/src/engine/action-bar.ts +++ b/src/engine/action-bar.ts @@ -31,6 +31,14 @@ import { AceModule } from "@wowts/tsaddon"; import { OvaleClass } from "../Ovale"; import { OptionUiAll } from "../ui/acegui-helpers"; +const ActionBars: LuaArray = { + 1: "ActionButton", + 2: "MultiBarRightButton", + 3: "MultiBarLeftButton", + 4: "MultiBarBottomRightButton", + 5: "MultiBarBottomLeftButton", +}; + export class OvaleActionBarClass { private debugOptions: LuaObj = { actionbar: { @@ -322,7 +330,18 @@ export class OvaleActionBarClass { return this.keybind[slot]; } getFrame(slot: number): UIFrame { - return _G["ActionButton" + slot]; + let name; + if (_G["Bartender4"]) { + name = `BT4Button${slot}`; + } else { + if (slot <= 24 || slot > 72) { + name = `ActionButton${((slot - 1) % 12) + 1}`; + } else { + const actionBar = (slot - (slot % 12)) / 12; + name = `${ActionBars[actionBar]}${slot % 12}`; + } + } + return _G[name]; } output: LuaArray = {}; diff --git a/src/ui/Options.ts b/src/ui/Options.ts index ab99b6c19..eee483929 100644 --- a/src/ui/Options.ts +++ b/src/ui/Options.ts @@ -536,28 +536,28 @@ export class OvaleOptionsClass { }, }, }, - predictiveIcon: { - order: 70, - type: "group", - name: L["two_abilities"], - args: { - predictif: { - order: 10, - type: "toggle", - name: L["two_abilities"], - desc: L["two_icons"], - }, - secondIconScale: { - order: 20, - type: "range", - name: L["second_icon_scale"], - min: 0.2, - max: 1, - bigStep: 0.01, - isPercent: true, - }, - }, - }, + // predictiveIcon: { + // order: 70, + // type: "group", + // name: L["two_abilities"], + // args: { + // predictif: { + // order: 10, + // type: "toggle", + // name: L["two_abilities"], + // desc: L["two_icons"], + // }, + // secondIconScale: { + // order: 20, + // type: "range", + // name: L["second_icon_scale"], + // min: 0.2, + // max: 1, + // bigStep: 0.01, + // isPercent: true, + // }, + // }, + // }, advanced: { order: 80, type: "group",