• 0

    posted a message on How to find UI element and change it

    I'm trying to do something I often find myself doing. I want to track down what a certain UI element is on the screen. I use /fstack and then write down everything and proceed to :Hide() or :Show() the element.

     

    I log in and get notified about mission completions. I, for now, just want to hide them or set the alpha to 0. I can't seem to find the right thing to focus on.

     

    This is what fstack shows me:

     

    ObjectiveTrackerUIWidgetContainer.FrontModelScene

    UIWidgetBelowMinimapContainerFrame.FrontModelScene

    UIWidgetBelowMinimapContainerFrame.BackModelScene

    UIWidgetTopCenterContainerFrame.FrontModelScene

    UIWidgetTopCenterContainerFrame.BackModelScene

    TimerTracker

    UIWidgetPowerBarContainerFrame.FrontModelScene

    UIWidgetPowerBarContainerFrame.BackModelScene

    GlobalFXBackgroundModelScene

    ObjectiveTrackerUIWidgetContainer.BackModelScene

    GlobalFXBackgroundModelScene

    AlertFrame

    GlobalFXDialogModelScene

    UIWidgetBelowMinimapContainerFrame

    UIWidgetPowerBarContainerFrame

    UIWidgetTopCenterContainerFrame

    ObjectiveTrackerUIWidgetContainer

    TimerTracker

    GlobalFXBackgroundModelScene

    GlobalFXMediumModelScene

    I've tried putting them all in functions like this:

    TimerTracker.Show = function() end

    AlertFrame.Show = function() end

    ...

    etc..

    So not only am I asking how to code this up I also really would like any advice you might have about investigating these things and going about the work of making addons like this. Where do you start? I find the xml code on github for blizzard addons. I read that wow uses 2 systems for alerts: The two files are AlertFrames.lua and AlertFrameSystems.lua Do I load one (or both) of those addons and THEN try to hide the alert?

    Posted in: Lua Code Discussion
  • 0

    posted a message on Hiding a frame in a macro vs lua file

    In reply to Ketho17:

    Thanks that worked. Also, the second line wasn't actually necessary. I appreciate the help.

    Posted in: Lua Code Discussion
  • 0

    posted a message on Hiding a frame in a macro vs lua file

    Thanks for the help. I'm still actually confused though. I was able to set the alpha to 0 and hide it that way. That is not ideal, but it did work. Why does this work and not Hide()?

     

    GarrisonLandingPageMinimapButton:SetAlpha(0);

    This addition of SetAlpha(0) was done before trying your suggestion.

    Posted in: Lua Code Discussion
  • 0

    posted a message on Hiding a frame in a macro vs lua file

    I made a toc and lua file and tested the lua file with this code:

    ObjectiveTrackerFrame:Hide();

    and it works. It is able to hide the Objective Frame. I thought I would just try a new addon for hiding the Covenant Minimap Button:

    GarrisonLandingPageMinimapButton:Hide();

    This does not work.

    But it does work as a macro.

    In short why can't I just have a plain .lua file with:

    GarrisonLandingpageMinimapButton:Hide();

    It works fine when I do that with the ObjectiveTrackerFrame. And also why does it work as a macro but not in the lua file? Thanks for any assistance.

    Posted in: Lua Code Discussion
  • To post a comment, please or register a new account.