mirror of
https://github.com/onyx-and-iris/voicemeeter.git
synced 2024-11-22 12:50:53 +00:00
button factory method moved
This commit is contained in:
parent
a07df8f7b8
commit
9b7be8d89d
@ -7,6 +7,11 @@ type button struct {
|
|||||||
index int
|
index int
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// newButton returns a button type
|
||||||
|
func newButton(i int) button {
|
||||||
|
return button{i}
|
||||||
|
}
|
||||||
|
|
||||||
// getter returns the value of a macrobutton parameter
|
// getter returns the value of a macrobutton parameter
|
||||||
func (m *button) getter(mode int) bool {
|
func (m *button) getter(mode int) bool {
|
||||||
return getMacroStatus(m.index, mode) == 1
|
return getMacroStatus(m.index, mode) == 1
|
||||||
@ -23,11 +28,6 @@ func (m *button) setter(v bool, mode int) {
|
|||||||
setMacroStatus(m.index, value, mode)
|
setMacroStatus(m.index, value, mode)
|
||||||
}
|
}
|
||||||
|
|
||||||
// newButton returns a button type
|
|
||||||
func newButton(i int) button {
|
|
||||||
return button{i}
|
|
||||||
}
|
|
||||||
|
|
||||||
// String implements the stringer interface
|
// String implements the stringer interface
|
||||||
func (m *button) String() string {
|
func (m *button) String() string {
|
||||||
return fmt.Sprintf("MacroButton%d\n", m.index)
|
return fmt.Sprintf("MacroButton%d\n", m.index)
|
||||||
|
Loading…
Reference in New Issue
Block a user