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
This adds a way to add fully configurable commands and adjustments
resolves#18
This should also, in theory, resolve#22 because the Macro Buttons don't do anything else as the RawCommand.
It also resolves#23 (with the raw adjustment, this can me done without any issues)
// 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.Globalization;
26
+
usingSystem.Reactive.Linq;
27
+
usingSystem.Reactive.Subjects;
28
+
29
+
usingExtensions;
30
+
31
+
usingHelpers;
32
+
33
+
usingLibrary.Voicemeeter;
34
+
35
+
usingServices;
36
+
37
+
usingSkiaSharp;
38
+
39
+
publicclassRawAdjustment:ActionEditorAdjustment
40
+
{
41
+
privateVoiceMeeterServiceVmService{get;}
42
+
privateSubject<Boolean>OnDestroy{get;}=new();
43
+
44
+
publicRawAdjustment():base(false)
45
+
{
46
+
this.DisplayName="Raw Adjustment";
47
+
this.Description="Adjusts a raw value";
48
+
49
+
this.ActionEditor.AddControlEx(
50
+
newActionEditorTextbox("name","Display Name","Name displayed on the device itself").SetRequired()
51
+
);
52
+
this.ActionEditor.AddControlEx(
53
+
newActionEditorTextbox("api","API","The \"API\" to adjust, example: Strip[0].Gain").SetRequired()
54
+
);
55
+
this.ActionEditor.AddControlEx(
56
+
newActionEditorTextbox("steps","Steps","The steps to adjust the API by").SetRequired().SetFormat(ActionEditorTextboxFormat.Integer).SetRegex(@"^-?\d+(\.\d+)?$")
57
+
);
58
+
this.ActionEditor.AddControlEx(
59
+
newActionEditorTextbox("min","Min Value","The minimum value that can be reached").SetRequired().SetFormat(ActionEditorTextboxFormat.Integer).SetRegex(@"^-?\d+(\.\d+)?$")
60
+
);
61
+
this.ActionEditor.AddControlEx(
62
+
newActionEditorTextbox("max","Max Value","The maximum value that can be reached").SetRequired().SetFormat(ActionEditorTextboxFormat.Integer).SetRegex(@"^-?\d+(\.\d+)?$")
63
+
);
64
+
this.ActionEditor.AddControlEx(
65
+
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})$")
66
+
);
67
+
68
+
this.ActionEditor.AddControlEx(
69
+
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})$")
newActionEditorTextbox("name","Display Name","Name displayed on the device itself").SetRequired()
48
+
);
49
+
this.ActionEditor.AddControlEx(
50
+
newActionEditorTextbox("api","API","The \"API\" to adjust, example: Strip[0].Gain").SetRequired()
51
+
);
52
+
this.ActionEditor.AddControlEx(
53
+
newActionEditorTextbox("oncolor","On Color","The color it should use in hex (#rrggbb example: #FF0000 = red)").SetRegex("^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$")
54
+
);
55
+
this.ActionEditor.AddControlEx(
56
+
newActionEditorTextbox("offcolor","Off Color","The color it should use in hex (#rrggbb example: #FF0000 = red)").SetRegex("^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$")
0 commit comments