mirror of
https://github.com/onyx-and-iris/voicemeeter-rb.git
synced 2024-11-15 23:00:48 +00:00
fixes bug setting button states
getters now return boolean values.
This commit is contained in:
parent
2efd07b3d5
commit
4e419fa74f
@ -10,16 +10,16 @@ module Voicemeeter
|
|||||||
end
|
end
|
||||||
|
|
||||||
class Button < IRemote
|
class Button < IRemote
|
||||||
def getter(type_)
|
def getter(mode)
|
||||||
@remote.get_buttonstatus(@index, type_)
|
@remote.get_buttonstatus(@index, mode)
|
||||||
end
|
end
|
||||||
|
|
||||||
def setter(type_, val)
|
def setter(mode, val)
|
||||||
@remote.set_buttonstatus(@index, type_, val)
|
@remote.set_buttonstatus(@index, mode, val)
|
||||||
end
|
end
|
||||||
|
|
||||||
def state
|
def state
|
||||||
getter(ButtonEnum::STATE)
|
getter(ButtonEnum::STATE) == 1
|
||||||
end
|
end
|
||||||
|
|
||||||
def state=(value)
|
def state=(value)
|
||||||
@ -27,7 +27,7 @@ module Voicemeeter
|
|||||||
end
|
end
|
||||||
|
|
||||||
def stateonly
|
def stateonly
|
||||||
getter(ButtonEnum::STATEONLY)
|
getter(ButtonEnum::STATEONLY) == 1
|
||||||
end
|
end
|
||||||
|
|
||||||
def stateonly=(value)
|
def stateonly=(value)
|
||||||
@ -35,7 +35,7 @@ module Voicemeeter
|
|||||||
end
|
end
|
||||||
|
|
||||||
def trigger
|
def trigger
|
||||||
getter(ButtonEnum::TRIGGER)
|
getter(ButtonEnum::TRIGGER) == 1
|
||||||
end
|
end
|
||||||
|
|
||||||
def trigger=(value)
|
def trigger=(value)
|
||||||
|
Loading…
Reference in New Issue
Block a user