PageRenderTime 154ms CodeModel.GetById 135ms RepoModel.GetById 1ms app.codeStats 0ms

/Tukui/docs/API.txt

http://github.com/Asphyxia/Tukui
Plain Text | 64 lines | 50 code | 14 blank | 0 comment | 0 complexity | 7677dd74dc604fdb930b6b22f3f3b0b2 MD5 | raw file
  1. Tukui API
  2. This is how another addon imports the Tukui engine:
  3. (it must be at the top of every lua file if your addon or edited version is built around Tukui)
  4. local T, C, L = unpack(Tukui)
  5. Now the functions:
  6. frame:SetTemplate("Template", texture)
  7. Set a backdrop that cover the exact size of the frame according
  8. to which template is choosen. If "texture" is set to true, it will
  9. use media.normTex instead of the default blank texture. If "" is empty,
  10. it will use "Default" template by default.
  11. frame:CreatePanel("Template", width, height, point, anchor, relativepoint, xposition, yposition)
  12. SetTemplate's brother, sets a backdrop with more options like custom
  13. size, position, point, etc. If "" is empty, it will use "Default"
  14. template by default.
  15. frame:Size(width, height)
  16. Sets the width and height of object to an absolute (pixel perfect) value
  17. in pixels. If height is ommitted then height = width is assumed.
  18. frame:Point(...)
  19. Exactly the same as its little brother SetPoint, but every offset
  20. is scaled to absolute (pixel perfect) pixel amounts.
  21. frame:Width(...)
  22. Exactly the same as its little brother SetWidth, but every offset
  23. is scaled to absolute (pixel perfect) pixel amounts.
  24. frame:Height(...)
  25. Exactly the same as its little brother SetHeight, but every offset
  26. is scaled to absolute (pixel perfect) pixel amounts.
  27. frame:CreateShadow("Template")
  28. Create shadow effect on the edge of the frame according to which template
  29. we choose. If "" is empty, it will use "Default" template by default.
  30. frame:Kill()
  31. Unregister all events from this frame and kill its process for ever.
  32. frame:StyleButton(hasChecked)
  33. Set a hover / pushed / and... Checked texture (if set on true)
  34. frame:FontString(name, fontName, fontHeight, fontStyle)
  35. Create a FontString with the frame as a parent. If you leave name as nil the font name will become
  36. "<framename>.text". If a name is provided however it will be called "<framename>.<yourname>".
  37. Templates:
  38. - "Default"
  39. -- use default color according to what we have set via /media/medias.lua
  40. - "Transparent"
  41. -- Same as "Default" but with Transparent background
  42. - "Tukui"
  43. - "ClassColor"
  44. - "Elv"
  45. - "Eclipse"
  46. - "Dajova"
  47. - "Hydra"
  48. - "Duffed"
  49. - "Eclipse"
  50. ( ... will probably add more in the future from most popular edits ... )