diff options
| -rw-r--r-- | src/client/lua_api/gui/iguifiledialog.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/client/lua_api/gui/iguifiledialog.cpp b/src/client/lua_api/gui/iguifiledialog.cpp index 9b789cb..88fcae0 100644 --- a/src/client/lua_api/gui/iguifiledialog.cpp +++ b/src/client/lua_api/gui/iguifiledialog.cpp @@ -89,6 +89,12 @@ static int newfileopendialog(lua_State* L){ return 1; } +/*** +Returns the direcotry the client wanted to open. +Returns the name of the directory once the client has pressed "open". +@function iguiopenfiledialog:getdir() +@treturn string The name of the directory the opened file is in. +*/ //{fileopendialog} -> "dir" int getdir(lua_State *L){ lua_getfield(L,-1,"guielement");//{fileopendialog},ud_fileopendialog @@ -99,6 +105,12 @@ int getdir(lua_State *L){ return 1; } +/*** +Returns the name of the file opened. +Returns the name of the file, without the file path. +@function iguiopenfiledialog:getname() +@treturn string the name of the file the user wants to open +*/ //{fileopendialog} -> "name" int getname(lua_State *L){ lua_getfield(L, -1, "guielement");//{fileopendialog},ud_fileopendialog |
