1
0
mirror of https://github.com/Artemis-RGB/Artemis synced 2025-12-13 05:48:35 +00:00

Updated Layers (markdown)

Robert Beekman 2017-09-12 14:21:28 +02:00
parent dc9c4e4add
commit a9850db8c2

@ -21,7 +21,7 @@ In the same way a profile contains layers, a layer can also contain layers (chil
#### Example: #### Example:
```lua ```lua
local layer = Profile.GetLayerByName("Test layer 1"); local layer = Profile.GetLayerByName("Test layer 1")
print(layer.Name) print(layer.Name)
``` ```
@ -30,14 +30,14 @@ print(layer.Name)
Returns all child layers within the layer Returns all child layers within the layer
#### Syntax: #### Syntax:
```lua ```lua
table GetChildren( ); table GetChildren( )
``` ```
#### Example: #### Example:
```lua ```lua
local layer = Profile.GetLayerByName("Test layer 1"); local layer = Profile.GetLayerByName("Test layer 1")
local children = layer.GetChildren(); local children = layer.GetChildren()
for childKey, childValue in pairs(children) do for childKey, childValue in pairs(children) do
print(childValue.Name) print(childValue.Name)
end end
``` ```
#### Result: #### Result:
@ -51,12 +51,12 @@ Test child layer 2
If found, returns the first child layer with the given name. If found, returns the first child layer with the given name.
#### Syntax: #### Syntax:
```lua ```lua
layer GetChildByName(string layerName); layer GetChildByName(string layerName)
``` ```
#### Example: #### Example:
```lua ```lua
local layer = Profile.GetLayerByName("Test layer 1"); local layer = Profile.GetLayerByName("Test layer 1");
local child = layer.GetChildByName("Test child layer 1"); local child = layer.GetChildByName("Test child layer 1")
print(child.Name) print(child.Name)
``` ```
#### Result: #### Result: