config.anchor
config.anchor = {"point", relativeTo [,  "relativePoint" [, xOffset [,  yOffset]]]}

Places EventHorizon's main window. This option uses the same syntax as the SetPoint function used in most addons.

See the examples below for how each of these are used.

  • "point": Sets which edge or corner of the window to anchor with. Valid points are shown in the table below.
  • relativeTo: Sets which frame to anchor the main window to. If "EventHorizonHandle" is used as the anchor frame, EventHorizon will be movable. Otherwise, it will be immobile until adjusted from the config files and the anchor frame is not created. If you wish to change the anchor frame, it's recommended to use either UIParent (the full screen area) or "EventHorizonHandle".
  • "relativePoint": Optional. Sets which edge or corner of the anchor frame (relativeTo) to place the anchor relative to. If this is not set, it will be the same as "point". If "relativePoint" is unused or set to nil, this will be the same as "point". Valid points are shown in the table below.
  • xOffset: Optional. Move the anchor this many pixels right. A negative value will move it left instead. If this is not set, it will be 0.
  • yOffset: Optional. Move the anchor this many pixels up. A negative value will move it down instead.

Examples:

1. config.anchor = {"TOPRIGHT", "EventHorizonHandle", "BOTTOMRIGHT"}
2. config.anchor = {"TOPLEFT", "EventHorizonHandle", "TOPLEFT"}
3. config.anchor = {"TOPLEFT", UIParent, "CENTER", 100, -192}
  1. The default anchoring. The anchor is shown at the topright corner of EventHorizon's window.
  2. This example also uses the handle as the anchor, but places the anchor's topleft corner at the main window's topleft corner - This means the anchor will actually be shown within the top bar icon and pretty much invisible until it's moused over.
  3. Instead of using the handle, this anchors EventHorizon's "TOPLEFT" corner to UIParent's (the game window's) "CENTER", with an offset of 100 pixels right and 192 pixels down. Note the lack of quotes around UIParent - External frames can not be accessed with their name in quotes.
Valid Frame Edges
"TOPLEFT" "TOP "TOPRIGHT"
"LEFT" "CENTER" "RIGHT"
"BOTTOMLEFT" "BOTTOM" "BOTTOMRIGHT"
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License