Recent changes Random page
GAMING
Gaming
 
StarCraft Wiki
Super Smash Wiki
Halopedia
Diablo Wiki
FFXIclopedia
Grand Theft Wiki
See more...

Eclipse AddOn.SetFrame

From WoWWiki

Jump to: navigation, search

This article is a part of the documentation of the Eclipse function library

--[[ 
 SetFrame ( {reglist} )
   Adds or updates a frame for Eclipse to keep track of.  If you need to specify a frame
   to have a special area, or requirements, use this function.
 
 Args:
   reglist - the table of options
     {
     Data required to register or update a frame:
       (string) name - the name of the frame to register, or update.  This can be a made up
                       name if you wish to track a virtual frame, usefull for tracking the
                       mouse in custom areas.
     
     Optional data:
       (boolean) control - if true, Eclipse should control showing/hiding of this frame
       (boolean) controltrans - if true, Eclipse should control the transparency of this frame
       (number) trans - the level of opacity for this frame
       (boolean) checkmouse -  if true, then Eclipse should check this frame to see if the mouse
                               is hovering over it.
       (table) reqs -  A table of requirements that must be met for the frame to be considered
                       as having the mouse.  Also you can force a frame to hide or show if the
                       requirements are not, or are met(respectively).
                       If there is only one requirement, you do not have to encapsulate it in
                       a table.
         {
           (table) - each requirement is a table of this form.  var and val must be passed for
                     each requirement, but hide and show are optional.
             {
               -required-
               (string or function) var -  the name of the variable to check or this can be a
                                           function, or the name of a function instead.
               (any) val - the value that var must be equal to for the requirement to be
                           considered met.
               -optional-
               (bool) hide - if true, then if this requirement is not met, the frame will be hidden.
               (bool) show - if true, then if this requirement is met, then the frame will be shown,
                             but only if all other requirements are met.  Failing a show requirement
                             does not cause the full requirements check to fail, it simply doens't
                             force the frame to show.
             }
         }
       (boolean) manual -  If this is true, then Eclipse takes complete control over the hide/showing
                           of the frame, and will show ignore the normal state of the frame all
                           together.  I.E. if something tries to hide the frame, it will not hide,
                           instead it will only hide if VO decides it should.
       (boolean) manualtrans - If this is true, then Eclipse takes complete control over the
                               transparency of the frame, and will ignore what other things try to do
                               to the transparency.  The frames transparency will be exactly as it is
                               set in VO.
       (table) state - Allows you to set the initial state of the hidden/transparency of the frames
                       true setting.  Useful if the item is actually shown, but not showing at time
                       of reg, such as if it's parent is hidden.
         {
           Optional:
             (boolean) show - Set to true, if the frame is showing
             (number) trans - Set to the alpha transparency of the frame
         }
       (function) onupdate - When a frame is hidden it will not receive OnUpdate events.  Some frames
                             need to receive these events even while hidden, if this is the cast for
                             your frame, then set onupdate to your frames OnUpdate function, and it
                             will be called while the frame is hidden.
                               
     These options will allow you to specify the area tested against the mouse position.
     Each option can be one of these:
       An exact value, indicating distance from the bottom left of the screen in pixels.
       A string containing the name of a variable with the exact value.
       A function whose return value will be used.
       Or a frame to get the position of the side from.
       
       (multi) top - the distance from the bottom of the screen to the top of the frame
       (multi) left - the distance from the left of the screen to the left of the frame
       (multi) bottom - the distance from the bottom of the screen to the bottom of the frame
       (multi) right - the distance from the left of the screen to the right of the frame
       
     Frame Padding Specifiers:
       These options allow you to specify and amount of additional space to be added to the
       ends of the frame area.  Allowing you to incrase/decrease the area the mouse can go
       into to trigger the showing of the frame.
       
       (number) toppad - the amount of padding to add to the top of the frame
       (number) leftpad - the amount of padding to add to the left of the frame
       (number) bottompad - the amount of padding to add to the bottom of the frame
       (number) rightpad - the amount of padding to add to the right of the frame
     }
 Note:
   If you wish to make any particular frame behave as normal despite all of what Eclipse does,
   then simply set the override option on the frame to 1, like so:
   Eclipse.Frames["frameName"].override = 1;
   Set it back to 0, to return it to normal Eclipse controlled behavior 
]]--
Rate this article:
Share this article: