mirror of
https://github.com/onyx-and-iris/voicemeeter-rb.git
synced 2024-11-22 01:40:49 +00:00
add ButtonColorMixin
This commit is contained in:
parent
6a21aa686a
commit
57946fa151
@ -9,7 +9,23 @@ module Voicemeeter
|
|||||||
TRIGGER = 3
|
TRIGGER = 3
|
||||||
end
|
end
|
||||||
|
|
||||||
|
module ButtonColorMixin
|
||||||
|
def identifier
|
||||||
|
"command.button[#{@index}]"
|
||||||
|
end
|
||||||
|
|
||||||
|
def color
|
||||||
|
method(:getter).super_method.call("color").to_i
|
||||||
|
end
|
||||||
|
|
||||||
|
def color=(val)
|
||||||
|
method(:setter).super_method.call("color", val)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
class Button < IRemote
|
class Button < IRemote
|
||||||
|
include ButtonColorMixin
|
||||||
|
|
||||||
def getter(mode)
|
def getter(mode)
|
||||||
@remote.get_buttonstatus(@index, mode)
|
@remote.get_buttonstatus(@index, mode)
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user