Add the ability to query and rearrange globebrowsing layers at runtime

This commit is contained in:
Alexander Bock
2019-07-30 14:28:23 +02:00
parent f7fafa5255
commit 4a070c939f
7 changed files with 126 additions and 1 deletions
@@ -385,6 +385,27 @@ scripting::LuaLibrary GlobeBrowsingModule::luaLibrary() const {
"any of " + listLayerGroups + ". The third argument is the dictionary"
"defining the layer."
},
{
"getLayers",
&globebrowsing::luascriptfunctions::getLayers,
{},
"string, string",
"Returns the list of layers for the scene graph node specified in the first "
"parameter. The second parameter specifies which layer type should be "
"queried."
},
{
"moveLayer",
&globebrowsing::luascriptfunctions::moveLayer,
{},
"string, string, number, number",
"Rearranges the order of a single layer in a scene graph node. The first "
"parameter specifies the scene graph node, the second parameter specifies "
"the name of the layer group, the third parameter is the original position "
"of the layer that should be moved and the last parameter is the new "
"position. The new position may be -1 to place the layer at the top or any "
"large number bigger than the number of layers to place it at the bottom."
},
{
"goToChunk",
&globebrowsing::luascriptfunctions::goToChunk,