Advertisement
Guest User

Untitled

a guest
Jul 8th, 2011
384
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 26.11 KB | None | 0 0
  1. Basic globals:
  2. Development.Documentation
  3. Provide documentation on items in the addon environment. Called with no parameters, it returns a table listing all documentation. Can provide both human-readable and computer-readable documentation.
  4. documentables = Development.Documentation() -- table <- void
  5. documentation = Development.Documentation(item) -- string <- variant
  6. documentation = Development.Documentation(item, parseable = false) -- string <- variant, boolean
  7. documentationTable = Development.Documentation(item, parseable = true) -- table <- variant, boolean
  8. Parameters:
  9. parseable: Whether to return in a computer-readable format, as opposed to the normal human-readable format.
  10. item: The item to get documentation on. May be either the item itself or a string identifier.
  11. Results:
  12. documentables: List of all items that documentation can be retrieved for. In {["itemname"] = true} format.
  13. documentationTable: Computer-readable documentation for the requested item. Format may change without warning.
  14. documentation: Documentation for the requested item.
  15. UI.CreateContext
  16. Creates a new UI context. A UI context must be created in order to create any frames.
  17. context = UI.CreateContext(name) -- Context <- string
  18. Parameters:
  19. name: A descriptive name for this element. Used for error reports and performance information. May be shown to end-users.
  20. Results:
  21. context: A new context. Contexts are guaranteed to have at least the capabilities of a Frame.
  22. UI.CreateFrame
  23. Creates a new frame. Frames are the blocks that all addon UIs are made out of. Since all frames must have a parent, you'll need to create a Context before any frames. See UI.CreateContext.
  24. frame = UI.CreateFrame(type, name, parent) -- Frame <- string, string, Frame
  25. Parameters:
  26. type: The type of your new frame. Current supported types: Frame, Text, Texture.
  27. name: A descriptive name for this element. Used for error reports and performance information. May be shown to end-users.
  28. parent: The new parent for this frame.
  29. Results:
  30. frame: Your new frame.
  31. Utility.Serialize.Inline
  32. Serializes a single parameter. Results in a string suitable for use as a parameter in Lua code. If the input is a table, it must not contain table cycles or non-tree structures.
  33. serialized = Utility.Serialize.Inline(element) -- string <- variant
  34. Parameters:
  35. element: Element to serialize.
  36. Results:
  37. serialized: String containing serialized output. May be nil if there was an error with the input.
  38. _VERSION
  39. assert
  40. bit.arshift
  41. bit.band
  42. bit.bnot
  43. bit.bor
  44. bit.bswap
  45. bit.bxor
  46. bit.lshift
  47. bit.rol
  48. bit.ror
  49. bit.rshift
  50. bit.tobit
  51. bit.tohex
  52. collectgarbage
  53. coroutine.create
  54. coroutine.resume
  55. coroutine.running
  56. coroutine.status
  57. coroutine.wrap
  58. coroutine.yield
  59. debug.traceback
  60. dump
  61. Debug utility function. Similar to print(), but serializes any table parameters before outputting.
  62. dump(...) -- ...
  63. Parameters:
  64. ...: Takes any number of any parameter type.
  65. error
  66. gcinfo
  67. getfenv
  68. getmetatable
  69. ipairs
  70. load
  71. loadstring
  72. math.abs
  73. math.acos
  74. math.asin
  75. math.atan
  76. math.atan2
  77. math.ceil
  78. math.cos
  79. math.cosh
  80. math.deg
  81. math.exp
  82. math.floor
  83. math.fmod
  84. math.frexp
  85. math.huge
  86. math.ldexp
  87. math.log
  88. math.log10
  89. math.max
  90. math.min
  91. math.mod
  92. math.modf
  93. math.pi
  94. math.pow
  95. math.rad
  96. math.random
  97. math.randomseed
  98. math.sin
  99. math.sinh
  100. math.sqrt
  101. math.tan
  102. math.tanh
  103. newproxy
  104. next
  105. pairs
  106. pcall
  107. print
  108. print_console
  109. rawequal
  110. rawget
  111. rawset
  112. select
  113. setfenv
  114. setmetatable
  115. string.byte
  116. string.char
  117. string.find
  118. string.format
  119. string.gfind
  120. string.gmatch
  121. string.gsub
  122. string.len
  123. string.lower
  124. string.match
  125. string.rep
  126. string.reverse
  127. string.sub
  128. string.upper
  129. table.concat
  130. table.foreach
  131. table.foreachi
  132. table.getn
  133. table.insert
  134. table.maxn
  135. table.remove
  136. table.sort
  137. tonumber
  138. tostring
  139. type
  140. unpack
  141. xpcall
  142. Inspectors:
  143. Inspect.Ability.Detail
  144. Provides detailed information about abilities.
  145. detail = Inspect.Ability.Detail(ability) -- table <- ability
  146. details = Inspect.Ability.Detail(abilities) -- table <- table
  147. Parameters:
  148. ability: The identifier of the ability to retrieve detail for.
  149. abilities: A lookup table of identifiers of abilities to retrieve detail for.
  150. Results:
  151. detail: Detail table for a single ability. May include members: name, icon, castingTime, channeled, continuous, autoattack, stealthRequired, rangeMin, rangeMax, cooldown, currentCooldown, currentCooldownExpired, currentCooldownRemaining, racial, passive, positioned, target, outOfRange, unusable, costPlanarCharge, costPower, costMana, costEnergy, costCharge, gainCharge, weapon.
  152. details: Detail tables for all requested abilities. The key is the ability ID, the value is the ability's detail table.
  153. Inspect.Ability.List
  154. List available abilities.
  155. abilities = Inspect.Ability.List() -- table <- void
  156. Results:
  157. abilities: A lookup table of IDs of the available abilities.
  158. Inspect.Addon.Cpu
  159. Returns recent CPU usage information. This is calculated using an exponential-falloff method.
  160. data = Inspect.Addon.Cpu() -- table <- void
  161. Results:
  162. data: Recent CPU usage. This takes the format { AddonIdentifier = { SubIdentifier = cpu_used_as_a_fraction_of_one } }. SubIdentifiers are generated by Rift and the format may change without notice.
  163. Inspect.Addon.Current
  164. Returns the current addon. This information is used internally for counting CPU usage and determining frame ownership.
  165. addonIdentifier = Inspect.Addon.Current() -- string <- void
  166. Results:
  167. addonIdentifier: The addon's identifier, as written in its TOC file.
  168. Inspect.Buff.Detail
  169. Provides detailed information about the buffs on a unit.
  170. detail = Inspect.Buff.Detail(unit, buff) -- table <- unit, buff
  171. details = Inspect.Buff.Detail(unit, buffs) -- table <- unit, table
  172. Parameters:
  173. buff: An identifier for the buff to retrieve detail for.
  174. buffs: A lookup table containing buff identifiers to retrieve details for.
  175. unit: The unit to inspect.
  176. Results:
  177. detail: Detail table for a single buff. May include members: name, buff, debuff, noncancelable, duration, remaining, expired, stack, caster, icon, poison, curse, disease.
  178. details: Detail tables for all requested buffs. The key is the buff ID, the value is the buff's detail table.
  179. Inspect.Buff.List
  180. List buffs on a unit.
  181. buffs = Inspect.Buff.List(unit) -- table <- unit
  182. Parameters:
  183. unit: The unit to inspect.
  184. Results:
  185. buffs: A lookup table of the IDs of the buffs on the unit.
  186. Inspect.System.Time
  187. A high-resolution timer.
  188. time = Inspect.System.Time() -- number <- void
  189. Results:
  190. time: Time in seconds. Counted from an arbitrary point in the past. Guaranteed to be non-negative.
  191. Inspect.Unit.Detail
  192. Provides detailed information about a unit.
  193. detail = Inspect.Unit.Detail(unit) -- table <- unit
  194. details = Inspect.Unit.Detail(units) -- table <- table
  195. Parameters:
  196. unit: A unit, in either unit ID or unit specifier format.
  197. units: A lookup table containing units to inspect.
  198. Results:
  199. detail: Detail table for a single buff. May include members: name, nameSecondary, guild, titlePrefix, titleSuffix, player, relation, level, unavailable, offline, afk, ready, health, healthMax, calling, mana, manaMax, charge, chargeMax, energy, energyMax, combo, comboUnit, comboMax, power, powerMax, loot, pvp, guaranteedLoot, mark, vitality, planar.
  200. details: Detail tables for all requested units. The key is the unit ID or unit specifier, the value is the unit's detail table.
  201. Inspect.Unit.List
  202. Lists all the units that the client can see.
  203. list = Inspect.Unit.List() -- table <- void
  204. Results:
  205. list: Map of unit ID to unit specifier. Units with multiple valid specs will have one chosen at random.
  206. Inspect.Unit.Lookup
  207. Converts unit IDs to unit specifiers and vice-versa.
  208. unit = Inspect.Unit.Lookup(unit) -- unit <- unit
  209. units = Inspect.Unit.Lookup(units) -- table <- table
  210. Parameters:
  211. unit: A single unit ID or unit specifier.
  212. units: A lookup table containing unit IDs and unit specifiers.
  213. Results:
  214. unit: A unit ID or unit specifier, whichever is the opposite of the parameter given. May be nil.
  215. units: A lookup table of unit IDs and unit specifiers. The key is the input, the value is the result. Invalid inputs will not result in output entries.
  216. Commands:
  217. Command.Buff.Cancel
  218. Cancels a buff on the player. Not all buffs are cancelable.
  219. Command.Buff.Cancel(buff) -- buff
  220. Parameters:
  221. buff: The ID of the buff to cancel.
  222. Command.Slash.Register
  223. Registers a new chat slash command, inserts a new event table into the Event.Slash hierarchy, and returns that table. If called multiple times with the same slash command, will return the same table each time.
  224. eventTable = Command.Slash.Register(slashCommand) -- table <- string
  225. Parameters:
  226. slashCommand: The name of the slash command to register.
  227. Results:
  228. eventTable: The event table for your slash command. nil if the slash command could not be registered (usually because it conflicts with a built-in slash command.)
  229. Events:
  230. Event.Ability.Add
  231. Signals the addition of a player ability.
  232. Ability.Add(abilities)
  233. Parameters:
  234. abilities: Lists the abilities that were added. Lookup table from ability ID to "true".
  235. Event.Ability.Cooldown.Begin
  236. Signals the start of an ability's cooldown.
  237. Ability.Cooldown.Begin(cooldowns)
  238. Parameters:
  239. cooldowns: The abilities whose cooldown has been changed. The key is the ability ID, the value is the new cooldown. 0 indicates that the cooldown has finished.
  240. Event.Ability.Cooldown.End
  241. Signals the end of an ability's cooldown. All the values in the "cooldown" parameter will be 0.
  242. Ability.Cooldown.End(cooldowns)
  243. Parameters:
  244. cooldowns: The abilities whose cooldown has been changed. The key is the ability ID, the value is the new cooldown. 0 indicates that the cooldown has finished.
  245. Event.Ability.Range.False
  246. Signals a player ability exiting range from its current target.
  247. Ability.Range.False(abilities)
  248. Parameters:
  249. abilities: The abilities that have entered or exited range. The key is the ability ID, the value is whether they are currently in range.
  250. Event.Ability.Range.True
  251. Signals a player ability entering range from its current target.
  252. Ability.Range.True(abilities)
  253. Parameters:
  254. abilities: The abilities that have entered or exited range. The key is the ability ID, the value is whether they are currently in range.
  255. Event.Ability.Remove
  256. Signals the removal of a player ability.
  257. Ability.Remove(abilities)
  258. Parameters:
  259. abilities: Lists the abilities that were removed. Lookup table from ability ID to "false".
  260. Event.Ability.Target
  261. Signals a player ability changing its current target.
  262. Ability.Target(abilities)
  263. Parameters:
  264. abilities: The abilities whose target has changed. The key is the ability ID, the value is the new target.
  265. Event.Ability.Usable.False
  266. Signals a player ability becoming unusable.
  267. Ability.Usable.False(abilities)
  268. Parameters:
  269. abilities: The abilities whose usability has changed. The key is the ability ID, the value is the new usability.
  270. Event.Ability.Usable.True
  271. Signals a player ability becoming usable.
  272. Ability.Usable.True(abilities)
  273. Parameters:
  274. abilities: The abilities whose usability has changed. The key is the ability ID, the value is the new usability.
  275. Event.Addon.Load.Begin
  276. Signals the beginning of an addon's loading sequence.
  277. Addon.Load.Begin(addonidentifier)
  278. Parameters:
  279. addonidentifier: The addon's identifier.
  280. Event.Addon.Load.End
  281. Signals the end of an addon's loading sequence. At this point, that addon is fully loaded and initialized.
  282. Addon.Load.End(addonidentifier)
  283. Parameters:
  284. addonidentifier: The addon's identifier.
  285. Event.Addon.SavedVariables.Load.Begin
  286. Signals the beginning of an addon's saved variable loading.
  287. Addon.SavedVariables.Load.Begin(addonidentifier)
  288. Parameters:
  289. addonidentifier: The addon's identifier.
  290. Event.Addon.SavedVariables.Load.End
  291. Signals the end of an addon's saved variable load.
  292. Addon.SavedVariables.Load.End(addonidentifier)
  293. Parameters:
  294. addonidentifier: The addon's identifier.
  295. (1 handler)
  296. Event.Addon.SavedVariables.Save.Begin
  297. Signals the beginning of an addon's saved variable saving.
  298. Addon.SavedVariables.Save.Begin(addonidentifier)
  299. Parameters:
  300. addonidentifier: The addon's identifier.
  301. Event.Addon.SavedVariables.Save.End
  302. Signals the end of an addon's saved variable saving.
  303. Addon.SavedVariables.Save.End(addonidentifier)
  304. Parameters:
  305. addonidentifier: The addon's identifier.
  306. Event.Addon.Shutdown.Begin
  307. Signals the beginning of the shutdown sequence.
  308. Addon.Shutdown.Begin()
  309. Event.Addon.Shutdown.End
  310. Signals the end of the shutdown sequence. This is the last event that will be sent.
  311. Addon.Shutdown.End()
  312. Event.Addon.Startup.End
  313. Signals the end of the startup sequence. At this point, all addons are fully loaded and initialized.
  314. Addon.Startup.End()
  315. Event.Buff.Add
  316. Signals new buffs on a unit.
  317. Buff.Add(unit, buffs)
  318. Parameters:
  319. unit: The Unit ID of the unit involved.
  320. buffs: A lookup table containing the buffs involved.
  321. Event.Buff.Change
  322. Signals a change in existing buffs on a unit.
  323. Buff.Change(unit, buffs)
  324. Parameters:
  325. unit: The Unit ID of the unit involved.
  326. buffs: A lookup table containing the buffs involved.
  327. Event.Buff.Remove
  328. Signals removal of buffs from a unit.
  329. Buff.Remove(unit, buffs)
  330. Parameters:
  331. unit: The Unit ID of the unit involved.
  332. buffs: A lookup table containing the buffs involved.
  333. Event.Slash (category for dynamically-created events)
  334. Event.Slash.dump
  335. (Slash event documentation TBI)
  336. (1 handler)
  337. Event.Slash.eventlog
  338. (Slash event documentation TBI)
  339. Event.System.Error
  340. Signals that an addon error has occured. To prevent infinite loops, errors in handlers for this event may not result in further events being triggered.
  341. System.Error(error)
  342. Parameters:
  343. error: Table containing error data. Includes member "type". May also include error, stacktrace, event, addon, info, frame, script, file. Possible values for type: event (error, stacktrace, event, addon, info), frameEvent (error, stacktrace, event, addon, frame), script (error, stacktrace, script), internal (event), fileNotFound (addon, file), fileLoad (addon, file, error), fileRun (error, stacktrace, addon, file).
  344. (1 handler)
  345. Event.System.Update.Begin
  346. Signals the beginning of a frame render. This is your last chance to make UI changes for this frame.
  347. System.Update.Begin()
  348. Event.System.Update.End
  349. Signals the end of a frame render.
  350. System.Update.End()
  351. (1 handler)
  352. Event.Unit.Add
  353. Signals the addition of units to unit specifiers. Always preceded by Event.Unit.Change.Remove. Triggers for unit IDs that have been removed from the specifier tree, but may not trigger for any children of those units. You may want to use LibUnitChange instead of this event.
  354. Unit.Add(units)
  355. Parameters:
  356. units: Table of the units changed. Key is the unit ID, value is the unit specifier, or "false" if the unit now has no specifier.
  357. Event.Unit.Remove
  358. Signals the removal of units from unit specifiers. Always followed by Event.Unit.Change.Add. Triggers for unit IDs that have been removed from the specifier tree, but may not trigger for any children of those units. You may want to use LibUnitChange instead of this event.
  359. Unit.Remove(units)
  360. Parameters:
  361. units: Table of the units changed. Key is the unit ID, value is the unit specifier, or "false" if the unit now has no specifier.
  362. UI:
  363. Layout:
  364. Members:
  365. GetBottom
  366. Retrieves the Y position of the bottom edge of this element.
  367. bottom = Layout:GetBottom() -- number <- void
  368. Results:
  369. bottom: The Y position of the bottom edge of this element.
  370. GetBounds
  371. Retrieves the complete bounds of this element.
  372. left, top, right, bottom = Layout:GetBounds() -- number, number, number, number <- void
  373. Results:
  374. right: The X position of the right edge of this element.
  375. left: The X position of the left edge of this element.
  376. bottom: The Y position of the bottom edge of this element.
  377. top: The Y position of the top edge of this element.
  378. GetEventTable
  379. Retrieves the event table of this element. By default, this value is also stored in "this.Event".
  380. eventTable = Layout:GetEventTable() -- table <- void
  381. Results:
  382. eventTable: The event table of this element.
  383. GetHeight
  384. Retrieves the height of this element.
  385. height = Layout:GetHeight() -- number <- void
  386. Results:
  387. height: The height of this element.
  388. GetLeft
  389. Retrieves the X position of the left edge of this element.
  390. left = Layout:GetLeft() -- number <- void
  391. Results:
  392. left: The X position of the left edge of this element.
  393. GetName
  394. Retrieves the name of this element.
  395. name = Layout:GetName() -- string <- void
  396. Results:
  397. name: The name of this element, as provided by the addon that created it.
  398. GetOwner
  399. Retrieves the owner of this element.
  400. owner = Layout:GetOwner() -- string <- void
  401. Results:
  402. owner: The owner of this element. Given as an addon identifier.
  403. GetRight
  404. Retrieves the X position of the right edge of this element.
  405. right = Layout:GetRight() -- number <- void
  406. Results:
  407. right: The X position of the right edge of this element.
  408. GetTop
  409. Retrieves the Y position of the top edge of this element.
  410. top = Layout:GetTop() -- number <- void
  411. Results:
  412. top: The Y position of the top edge of this element.
  413. GetWidth
  414. Retrieves the width of this element.
  415. width = Layout:GetWidth() -- number <- void
  416. Results:
  417. width: The width of this element.
  418. Events:
  419. Move
  420. Size
  421. Frame: Inherits from Layout
  422. Members:
  423. GetAlpha
  424. Gets the alpha multiplier of this frame.
  425. alpha = Frame:GetAlpha() -- number <- void
  426. Results:
  427. alpha: The alpha multiplier of this frame. 1 is fully opaque, 0 is fully transparent. This does not include multiplied alphas from this frame's parent - it's the exact value passed to SetAlpha.
  428. GetBackgroundColor
  429. Retrieves the background color of this frame.
  430. r, g, b, a = Frame:GetBackgroundColor() -- number, number, number, number <- void
  431. Results:
  432. b: Blue.
  433. r: Red.
  434. a: Alpha. 1 is fully opaque, 0 is fully transparent.
  435. g: Green.
  436. GetLayer
  437. Gets the frame's layer order.
  438. layer = Frame:GetLayer() -- number <- void
  439. Results:
  440. layer: The render layer of this frame. See Frame:SetLayer for details.
  441. GetParent
  442. Gets the parent of this frame.
  443. parent = Frame:GetParent() -- Frame <- void
  444. Results:
  445. parent: The parent element of this frame.
  446. GetVisible
  447. Gets the visibility flag for this frame.
  448. visible = Frame:GetVisible() -- boolean <- void
  449. Results:
  450. visible: This frame's visibility flag, as set by SetVisible. Does not check the visibility flags of the frame's parents.
  451. SetAllPoints
  452. Pins all the edges of this frame to the edges of a different frame.
  453. Frame:SetAllPoints(target) -- Layout
  454. Parameters:
  455. target: Target Layout to pin this frame's edges to.
  456. SetAlpha
  457. Sets the alpha transparency multiplier for this frame and its children.
  458. Frame:SetAlpha(alpha) -- number
  459. Parameters:
  460. alpha: The new alpha multiplier. 1 is fully opaque, 0 is fully transparent.
  461. SetBackgroundColor
  462. Sets the background color of this frame.
  463. Frame:SetBackgroundColor(r, g, b) -- number, number, number
  464. Frame:SetBackgroundColor(r, g, b, a) -- number, number, number, number
  465. Parameters:
  466. b: Blue.
  467. r: Red.
  468. a: Alpha. 1 is fully opaque, 0 is fully transparent. Defaults to 1.
  469. g: Green.
  470. SetHeight
  471. Sets the height of this frame. Undefined results if the frame already has two pinned Y coordinates.
  472. Frame:SetHeight(height) -- number
  473. Parameters:
  474. height: The new height of this frame.
  475. SetLayer
  476. Sets the frame layer for this frame. This can be any number. Frames are drawn in ascending order. If two frames have the same layer number, then the order of those frames is undefined, but stable during a single play session. Frames are always drawn after their parents.
  477. Frame:SetLayer(layer) -- number
  478. Parameters:
  479. layer: The new layer for this frame.
  480. SetParent
  481. Sets the parent of this frame. Circular dependencies result in undefined behavior.
  482. Frame:SetParent(parent) -- Frame
  483. Parameters:
  484. parent: The new parent for this frame.
  485. SetPoint
  486. Pins a point on this frame to a location on another frame. This is a rather complex function and you should look at examples to see how to use it. Better documentation will be forthcoming.
  487. Frame:SetPoint(...) -- ...
  488. Parameters:
  489. ...: This function's parameters are complicated. More details will be forthcoming.
  490. SetVisible
  491. Sets the frame's visibility flag. If set to false, then this frame and all its children will not be rendered or accept mouse input.
  492. Frame:SetVisible(visible) -- boolean
  493. Parameters:
  494. visible: The new visibility flag.
  495. SetWidth
  496. Sets the width of this frame. Undefined results if the frame already has two pinned X coordinates.
  497. Frame:SetWidth(width) -- number
  498. Parameters:
  499. width: The new width of this frame.
  500. Events:
  501. LeftDown
  502. LeftUp
  503. Context: Inherits from Frame
  504. Members:
  505. (No extra members)
  506. Events:
  507. (No extra events)
  508. Text: Inherits from Frame
  509. Members:
  510. GetFont
  511. Gets the current font used for this element.
  512. source, font = Text:GetFont() -- string, string <- void
  513. Results:
  514. font: The actual font identifier. Either a resource identifier or a filename.
  515. source: The source of the resource. "Rift" will take the resource from Rift's internal data. Anything else will take the resource from the addon with that identifier.
  516. GetFontColor
  517. Gets the current font color for this element.
  518. r, g, b, a = Text:GetFontColor() -- number, number, number, number <- void
  519. Results:
  520. b: Blue.
  521. r: Red.
  522. a: Alpha. 1 is fully opaque, 0 is fully transparent.
  523. g: Green.
  524. GetFontSize
  525. Gets the font size of the current element.
  526. fontsize = Text:GetFontSize() -- number <- void
  527. Results:
  528. fontsize: The current font size of this element.
  529. GetFullHeight
  530. Get the height that would be required for this element to display all lines of text.
  531. height = Text:GetFullHeight() -- number <- void
  532. Results:
  533. height: The element height needed to display all lines of text.
  534. GetFullWidth
  535. Get the width that would be required for this element to avoid word wrapping or truncation.
  536. width = Text:GetFullWidth() -- number <- void
  537. Results:
  538. width: The element width needed to avoid word wrapping or truncation.
  539. GetText
  540. Get the current text for this element.
  541. text = Text:GetText() -- string <- void
  542. Results:
  543. text: The current text of the element.
  544. GetWordwrap
  545. Gets the wordwrap flag for this element.
  546. wordwrap = Text:GetWordwrap() -- boolean <- void
  547. Results:
  548. wordwrap: The current wordwrap flag for this element. If false, long lines will be truncated. Defaults to false.
  549. ResizeToText
  550. Sets the element's width and height to display all text without wordwrapping or truncation.
  551. Text:ResizeToText() -- void
  552. SetFont
  553. Sets the current font used for this element.
  554. Text:SetFont(source, font) -- string, string
  555. Parameters:
  556. font: The actual font identifier. Either a resource identifier or a filename.
  557. source: The source of the resource. "Rift" will take the resource from Rift's internal data. Anything else will take the resource from the addon with that identifier.
  558. SetFontColor
  559. Sets the current font color for this element.
  560. Text:SetFontColor(r, g, b) -- number, number, number
  561. Text:SetFontColor(r, g, b, a) -- number, number, number, number
  562. Parameters:
  563. b: Blue.
  564. r: Red.
  565. a: Alpha. 1 is fully opaque, 0 is fully transparent. Defaults to 1.
  566. g: Green.
  567. SetFontSize
  568. Sets the current font size of this element.
  569. Text:SetFontSize(fontsize) -- number
  570. Parameters:
  571. fontsize: The new font size of this element.
  572. SetText
  573. Sets the current text for this element.
  574. Text:SetText(text) -- string
  575. Parameters:
  576. text: The new text for the element.
  577. SetWordwrap
  578. Sets the wordwrap flag for this element.
  579. Text:SetWordwrap(wordwrap) -- boolean
  580. Parameters:
  581. wordwrap: The new wordwrap flag for this element. If false, long lines will be truncated. Defaults to false.
  582. Events:
  583. (No extra events)
  584. Texture: Inherits from Frame
  585. Members:
  586. GetTexture
  587. Gets the current texture used for this element.
  588. source, texture = Texture:GetTexture() -- string, string <- void
  589. Results:
  590. source: The source of the resource. "Rift" will take the resource from Rift's internal data. Anything else will take the resource from the addon with that identifier.
  591. texture: The actual texture identifier. Either a resource identifier or a filename.
  592. GetTextureHeight
  593. Returns the actual pixel height of the current texture.
  594. height = Texture:GetTextureHeight() -- number <- void
  595. Results:
  596. height: The height of the current texture in pixels.
  597. GetTextureWidth
  598. Returns the actual pixel width of the current texture.
  599. width = Texture:GetTextureWidth() -- number <- void
  600. Results:
  601. width: The width of the current texture in pixels.
  602. ResizeToTexture
  603. Sets the element's width and height to the exact pixel size of the texture.
  604. Texture:ResizeToTexture() -- void
  605. SetTexture
  606. Sets the current texture used for this element.
  607. Texture:SetTexture(source, texture) -- string, string
  608. Parameters:
  609. source: The source of the resource. "Rift" will take the resource from Rift's internal data. Anything else will take the resource from the addon with that identifier.
  610. texture: The actual texture identifier. Either a resource identifier or a filename.
  611. Events:
  612. (No extra events)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement