Git Product home page Git Product logo

Comments (8)

TigerVI avatar TigerVI commented on August 12, 2024 1

Using "if masque" around the calls should do the trick.
Tested it with disabled masque addon on my pc.

if (Masque) then	
	local MasqueGroup = Masque:Group("TrinketMenu")	
end	
if (Masque) then
     MasqueGroup:AddButton(TrinketMenu_Trinket0)
     MasqueGroup:AddButton(TrinketMenu_Trinket1)
end
	
for i = 1, 30 do
    _G["TrinketMenu_Menu"..i]:SetFrameLevel(2)
    if (Masque) then
        MasqueGroup:AddButton(_G["TrinketMenu_Menu"..i])
    end
end

from trinketmenu.

TigerVI avatar TigerVI commented on August 12, 2024 1

Just downloaded it, it's working.
With and without masque installed no lua error messages appear.

Many thanks for your efforts.

from trinketmenu.

Nixxen avatar Nixxen commented on August 12, 2024

Honestly I just picked this addon up since it wasn't working for Classic and I wanted to use it.
I'm still learning and don't know much at all about coding as it's mostly just a hobby I dabble with for fun.

I looked at the Masque API wiki (https://github.com/StormFX/Masque/wiki/Masque-API), and it looks like it could be used to skin the buttons, but it would require a rewrite of how the buttons are displayed in game.

So in short, yes, I strongly suspect it is possible - But I doubt I am the one that's able to add it at this point in time ;)

from trinketmenu.

TigerVI avatar TigerVI commented on August 12, 2024

Since I'm also new at WOW Lua and Masque API I tried to add it for myself and it seems only a few lines need to be added:
Image of the result (using ElvUIesque Skin): https://imgur.com/a/Imj2pci

I added the following lines at the beginng of Trinketmenu.lua to create the MasqueGroup:

local Masque = LibStub("Masque", true)
local MasqueGroup = Masque:Group("TrinketMenu")

and the following lines at the end of the function TrinketMenu.Initialize() to add the buttons to the previously defined group.

MasqueGroup:AddButton(TrinketMenu_Trinket0)
MasqueGroup:AddButton(TrinketMenu_Trinket1)
for i = 1, 30 do
   _G["TrinketMenu_Menu"..i]:SetFrameLevel(2)
   MasqueGroup:AddButton(_G["TrinketMenu_Menu"..i])
end

from trinketmenu.

Nixxen avatar Nixxen commented on August 12, 2024

Nice job, this is great stuff!
I'll test this during the weekend and see how it runs then push a patch if it's not causing any issues.

from trinketmenu.

Nixxen avatar Nixxen commented on August 12, 2024

Gave it a quick test.
It works well with Masque installed, but without masque it throws errors (referencing masque, which doesn't exist).
Will need to find a way to only load it if Masque is present.
I'll look into it and see what I can find.

from trinketmenu.

Nixxen avatar Nixxen commented on August 12, 2024

Wasn't as bad as expected TBH.
Some checks pointed at the lib solved it.
I'll get it pushed ASAP.

from trinketmenu.

Nixxen avatar Nixxen commented on August 12, 2024

Should be active in the latest version.
Let me know if it doesn't work :)

from trinketmenu.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.