View Single Post
01-27-18, 01:53 AM   #5
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,290
This looks very weak, feels like even my documentation is more useful. (Currently working on Widget Reference):
https://github.com/Resike/BlizzardIn...ster/Resources

Also i'm not sure whats the point listing the type of arguments/return values and nilability, since it's Lua. It can be table, string or number (or nil) and 99,9% of the time you can tell what it is just by it's name.

Personally i would like to see something like this, and this is what i'm also aiming for:

Lua Code:
  1. GetPlayerMapPosition = { -- Returns the position of a unit on the current map
  2.     args = {
  3.         unit, -- The unitID for which the position is returned (string)
  4.     }
  5.     returns = {
  6.         x, -- X value of the unit position (a proportion between 0 and 1, relative to WorldMapDetailFrame) (number)
  7.         y, -- Y value of the unit position (a proportion between 0 and 1, relative to WorldMapDetailFrame) (number)
  8.     }
  9. }

And only add the arg/return types if done with everything.

Last edited by Resike : 01-27-18 at 02:00 AM.
  Reply With Quote