mirror of
https://github.com/onyx-and-iris/voicemeeter-api-python.git
synced 2024-11-15 16:40:46 +00:00
rename action_prop to action_fn
This commit is contained in:
parent
b10a90418e
commit
435a9e2085
@ -1,6 +1,5 @@
|
||||
from .error import VMError
|
||||
from .iremote import IRemote
|
||||
from .meta import action_prop
|
||||
from .meta import action_fn
|
||||
|
||||
|
||||
class Command(IRemote):
|
||||
@ -22,10 +21,9 @@ class Command(IRemote):
|
||||
(cls,),
|
||||
{
|
||||
**{
|
||||
param: action_prop(param)
|
||||
for param in ["show", "shutdown", "restart"]
|
||||
param: action_fn(param) for param in ["show", "shutdown", "restart"]
|
||||
},
|
||||
"hide": action_prop("show", val=0),
|
||||
"hide": action_fn("show", val=0),
|
||||
},
|
||||
)
|
||||
return CMD_cls(remote)
|
||||
|
@ -22,8 +22,8 @@ def float_prop(param):
|
||||
return property(fget, fset)
|
||||
|
||||
|
||||
def action_prop(param, val: int = 1):
|
||||
"""A param that performs an action"""
|
||||
def action_fn(param, val: int = 1):
|
||||
"""meta function that performs an action"""
|
||||
|
||||
def fdo(self):
|
||||
self.setter(param, val)
|
||||
|
@ -1,7 +1,7 @@
|
||||
from .error import VMError
|
||||
from .iremote import IRemote
|
||||
from .kinds import kinds_all
|
||||
from .meta import action_prop, bool_prop
|
||||
from .meta import action_fn, bool_prop
|
||||
|
||||
|
||||
class Recorder(IRemote):
|
||||
@ -24,7 +24,7 @@ class Recorder(IRemote):
|
||||
(cls, CHANNELOUTMIXIN_cls),
|
||||
{
|
||||
**{
|
||||
param: action_prop(param)
|
||||
param: action_fn(param)
|
||||
for param in [
|
||||
"play",
|
||||
"stop",
|
||||
|
Loading…
Reference in New Issue
Block a user