From 7041a4680d199bbe669798c63138c370ed057552 Mon Sep 17 00:00:00 2001 From: Gregor Best Date: Tue, 21 Oct 2008 19:28:45 +0200 Subject: [PATCH] invaders: add luadoc comments this commit adds luadoc comments right before invaders.run() so that all its parameters are explained in luadoc. --- lib/invaders.lua.in | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/invaders.lua.in b/lib/invaders.lua.in index 9992659b..940227ea 100644 --- a/lib/invaders.lua.in +++ b/lib/invaders.lua.in @@ -450,6 +450,12 @@ function game.highscore (score) end end +--- Run Awesome Invaders +-- @param args A table with parameters. +-- x the X coordinate of the playing field. +-- y the Y coordinate of the playing field. +-- if either of these is left out, the game is placed in the center of the focused screen. +-- solidbg the background color of the playing field. If none is given, the playing field is transparent. function run(args) gamedata.screen = capi.screen[capi.mouse.screen] gamedata.field.x = gamedata.screen.geometry.x + math.floor((gamedata.screen.geometry.width - gamedata.field.w) / 2)