Skip to content

Commit

Permalink
fix: spellFlashCore wasn't working with bartender and more fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Sidoine committed Dec 19, 2020
1 parent 0695abd commit 5dc77ac
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 23 deletions.
21 changes: 20 additions & 1 deletion src/engine/action-bar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,14 @@ import { AceModule } from "@wowts/tsaddon";
import { OvaleClass } from "../Ovale";
import { OptionUiAll } from "../ui/acegui-helpers";

const ActionBars: LuaArray<string> = {
1: "ActionButton",
2: "MultiBarRightButton",
3: "MultiBarLeftButton",
4: "MultiBarBottomRightButton",
5: "MultiBarBottomLeftButton",
};

export class OvaleActionBarClass {
private debugOptions: LuaObj<OptionUiAll> = {
actionbar: {
Expand Down Expand Up @@ -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<string> = {};
Expand Down
44 changes: 22 additions & 22 deletions src/ui/Options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 5dc77ac

Please sign in to comment.