update to class getters/setters and meta module

rename factory functions.

class getters now send is_string parameter.

each property type for each class now has separate meta function.
This commit is contained in:
onyx-and-iris
2022-01-19 21:52:59 +00:00
parent 84d31d3d61
commit 8e03c4e53b
6 changed files with 101 additions and 87 deletions

View File

@@ -7,14 +7,14 @@ class MacroButton {
$this.id = $id
}
[void] Setter($set, $mode) {
MB_Set -ID $this.id -SET $set -MODE $mode
}
[int] Getter($mode) {
return MB_Get -ID $this.id -MODE $mode
}
[void] Setter($set, $mode) {
MB_Set -ID $this.id -SET $set -MODE $mode
}
hidden $_state = $($this | Add-Member ScriptProperty 'state' `
{
$this.Getter(1)
@@ -46,7 +46,7 @@ class MacroButton {
)
}
Function Buttons {
Function Make_Buttons {
[System.Collections.ArrayList]$button = @()
0..69 | ForEach-Object {
[void]$button.Add([MacroButton]::new($_))