mirror of
https://github.com/onyx-and-iris/voicemeeter-api-powershell.git
synced 2026-04-08 00:53:30 +00:00
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:
@@ -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($_))
|
||||
|
||||
Reference in New Issue
Block a user