1. Hello.

    Is there a function that return the icon name (or id) when i mouse over the icon itself?

    I need to know when my mouse is over a particular icon, so i can tell my addons to do something.

    Like GetMouseFocus() but while this return the frame, i want something that return just the name of the icon.

     

    Don't know if i've been clear enough... this stuff is kinda new for me.

     

     

     

    Hello.

    Is there a function that return the icon name (or id) when i mouse over the icon itself?

    I need to know when my mouse is over a particular icon, so i can tell my addons to do something.

    Like GetMouseFocus() but while this return the frame, i want something that return just the name of the icon.

     

    Don't know if i've been clear enough... this stuff is kinda new for me.

     

     

     

    Is there a function that return the icon name (or id) when i mouse over the icon itself? I need to know when my mouse is over a particular icon, so i can tell my addons to do something.  Like GetMouseFocus() but while this return the frame, i want something that return just the name of the icon.

    No, that's not really the way the system works.  If you want to do something with a frame when the mouse enters it, then you should be using the OnEnter frame script.  This function is passed the frame that caused the OnEnter, and then you can use that to find the Icon (ideally it will be named or accessible in some way).  For example the first example in Chapter 11, which addresses OnEnter and OnLeave could be altered in the following way:

    <Frame name=”EnterLeaveTest” parent=”UIParent”>

    <Size x=”100” y=”100”/>

    <Anchors>

    <Anchor point=”CENTER” relativePoint=”CENTER” relativeTo=”UIParent”/>

    </Anchors>

    <Layers>

    <Layer level=”BACKGROUND”>

    <Texture name=”$parentIcon” file=”Interface\Icons\Spell_Shadow_ShadowWordPain” setAllPoints=”true”/>

    </Layer>

    </Layers>

    <Scripts>

    <OnEnter>

    local icon = getglobal(self:GetName() .. "Icon")

    local iconName = icon:GetTexture()

    ChatFrame1:AddMessage(“++ Entered frame with icon: “ .. iconName)

    </OnEnter>

    <OnLeave>

    local icon = getglobal(self:GetName() .. "Icon")

    local iconName = icon:GetTexture()

    ChatFrame1:AddMessage(“— Leaving frame with icon: “ .. iconName)

    </OnLeave>

    </Scripts>

    </Frame>

    This will instead of printing the name, look up the icon object and then check icon:GetTexture() so it can print the texture that is being displayed.  It may help if you can specify what you're trying to accomplish rather than telling us how you want to implement it.