You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// copies of the Software, and to permit persons to whom the Software is
10
+
// furnished to do so, subject to the following conditions:
11
+
//
12
+
// The above copyright notice and this permission notice shall be included in all
13
+
// copies or substantial portions of the Software.
14
+
//
15
+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+
// FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
18
+
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+
// SOFTWARE.
22
+
23
+
namespaceLoupedeck.VoiceMeeterPlugin.Actions;
24
+
25
+
usingSystem.Reactive.Linq;
26
+
usingSystem.Reactive.Subjects;
27
+
28
+
usingExtensions;
29
+
30
+
usingHelpers;
31
+
32
+
usingLibrary.Voicemeeter;
33
+
34
+
usingServices;
35
+
36
+
usingSkiaSharp;
37
+
38
+
publicclassLevelsCommand:ActionEditorCommand
39
+
{
40
+
privateVoiceMeeterServiceVmService{get;}
41
+
privateSubject<Boolean>OnDestroy{get;}=new();
42
+
43
+
publicLevelsCommand()
44
+
{
45
+
this.DisplayName="Level Display";
46
+
this.Description="Displays specific Levels";
47
+
48
+
this.ActionEditor.AddControlEx(
49
+
newActionEditorTextbox("name","Display Name","Name displayed on the device itself").SetRequired()
50
+
);
51
+
this.ActionEditor.AddControlEx(
52
+
newActionEditorSlider("channel_number","Channel Number","The Channel Number to display").SetRequired().SetValues(0,100,0,1)
53
+
);
54
+
this.ActionEditor.AddControlEx(
55
+
newActionEditorListbox("channel_type","Channel Type","The Channel Type to display").SetRequired()
56
+
);
57
+
this.ActionEditor.AddControlEx(
58
+
newActionEditorTextbox("bgcolor","Background Color","The color it should use in hex (#rrggbb example: #FF0000 = red)").SetRegex("^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$")
59
+
);
60
+
this.ActionEditor.AddControlEx(
61
+
newActionEditorTextbox("fgcolor","Foreground Color","The color it should use in hex (#rrggbb example: #FF0000 = red)").SetRegex("^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$")
62
+
);
63
+
64
+
this.ActionEditor.ListboxItemsRequested+=(_,e)=>
65
+
{
66
+
// iterate over LevelType enum values and add them (their name) to the listbox
0 commit comments