Skip to content

Commit

Permalink
Moved common files to external library. New icon when VoiceMeeter is …
Browse files Browse the repository at this point in the history
…disconnected
  • Loading branch information
BarRaider committed Jan 17, 2019
1 parent 5c10b03 commit 54c795f
Show file tree
Hide file tree
Showing 24 changed files with 396 additions and 264 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ VoiceMeeter Advanced Plugin is now called *VoiceMeeter Advanced Click/Long-Click
- See a live indication of the current status on Stream Deck (never forget your microphone on again!)
- Can also be used to mute/unmute different Strips/Buses such as Spotify/Background music/etc.
- Choose from 4 different icons to display the mute/unmute settings
- **New in v0.6:** You can now choose your own images to display, instead of the 4 pre-defined icons
- **New in v1.0:** You can now choose your own images to display, instead of the 4 pre-defined icons

#### VoiceMeeter Modify Setting
- Allows you to easily modify various VoiceMeeter settings
Expand Down
4 changes: 2 additions & 2 deletions VoiceMeeter/App.config

Large diffs are not rendered by default.

12 changes: 0 additions & 12 deletions VoiceMeeter/IPluginable.cs

This file was deleted.

5 changes: 3 additions & 2 deletions VoiceMeeter/PluginContainer.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Newtonsoft.Json;
using BarRaider.SdTools;
using Newtonsoft.Json;
using streamdeck_client_csharp;
using streamdeck_client_csharp.Events;
using System;
Expand Down Expand Up @@ -99,7 +100,7 @@ private async void RunTick()
}
else
{
_ = connection.SetImageAsync(Properties.Plugin.Default.VMDefault, kvp.Key, SDKTarget.HardwareAndSoftware);
_ = connection.SetImageAsync(Properties.Plugin.Default.VMNotRunning, kvp.Key, SDKTarget.HardwareAndSoftware);
}
}
}
Expand Down
3 changes: 2 additions & 1 deletion VoiceMeeter/Program.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using CommandLine;
using BarRaider.SdTools;
using CommandLine;
using System;

namespace VoiceMeeter
Expand Down
4 changes: 2 additions & 2 deletions VoiceMeeter/Properties/Plugin.settings

Large diffs are not rendered by default.

402 changes: 292 additions & 110 deletions VoiceMeeter/Properties/Plugin1.Designer.cs

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions VoiceMeeter/PropertyInspector/Advanced.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,18 @@ function sendValueToPlugin(value, param) {
}
}

function openWebsite() {
if (websocket && (websocket.readyState === 1)) {
const json = {
'event': 'openUrl',
'payload': {
'url': 'https://BarRaider.github.io'
}
};
websocket.send(JSON.stringify(json));
}
}

if (!isQT) {
document.addEventListener('DOMContentLoaded', function () {
initPropertyInspector();
Expand Down
12 changes: 12 additions & 0 deletions VoiceMeeter/PropertyInspector/AdvancedToggle.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,18 @@ function sendValueToPlugin(value, param) {
}
}

function openWebsite() {
if (websocket && (websocket.readyState === 1)) {
const json = {
'event': 'openUrl',
'payload': {
'url': 'https://BarRaider.github.io'
}
};
websocket.send(JSON.stringify(json));
}
}

if (!isQT) {
document.addEventListener('DOMContentLoaded', function () {
initPropertyInspector();
Expand Down
12 changes: 12 additions & 0 deletions VoiceMeeter/PropertyInspector/Microphone.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,18 @@ function sendValueToPlugin(value, param) {
}
}

function openWebsite() {
if (websocket && (websocket.readyState === 1)) {
const json = {
'event': 'openUrl',
'payload': {
'url': 'https://BarRaider.github.io'
}
};
websocket.send(JSON.stringify(json));
}
}

if (!isQT) {
document.addEventListener('DOMContentLoaded', function () {
initPropertyInspector();
Expand Down
12 changes: 12 additions & 0 deletions VoiceMeeter/PropertyInspector/Modify.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,18 @@ function sendValueToPlugin(value, param) {
}
}

function openWebsite() {
if (websocket && (websocket.readyState === 1)) {
const json = {
'event': 'openUrl',
'payload': {
'url': 'https://BarRaider.github.io'
}
};
websocket.send(JSON.stringify(json));
}
}

if (!isQT) {
document.addEventListener('DOMContentLoaded', function () {
initPropertyInspector();
Expand Down
2 changes: 1 addition & 1 deletion VoiceMeeter/PropertyInspector/VoiceMeeter/Advanced.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
Example: "Strip[0].mono=1;Bus[2].Gain=-20;"
</p>
<p>
For more information or feedback/suggestions contact me at <a href="https://BarRaider.github.io" target="_blank">https://BarRaider.github.io</a>
For more information or feedback/suggestions contact me at <a href="https://BarRaider.github.io" target="_blank" onclick="openWebsite()">https://BarRaider.github.io</a>
</p>
</details>
<div class="sdpi-item">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
Example: "Strip[0].mono=1;Bus[2].Gain=-20;"
</p>
<p>
For more information or feedback/suggestions contact me at <a href="https://BarRaider.github.io" target="_blank">https://BarRaider.github.io</a>
For more information or feedback/suggestions contact me at <a href="https://BarRaider.github.io" target="_blank" onclick="openWebsite()">https://BarRaider.github.io</a>
</p>
</details>
<div class="sdpi-item">
Expand Down
2 changes: 1 addition & 1 deletion VoiceMeeter/PropertyInspector/VoiceMeeter/Microphone.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<body>
<div class="sdpi-wrapper">
<details class="message info">
<summary>For feedback/suggestions contact me at <a href="https://BarRaider.github.io" target="_blank">https://BarRaider.github.io</a> </summary>
<summary>For feedback/suggestions contact me at <a href="https://BarRaider.github.io" target="_blank" onclick="openWebsite()">https://BarRaider.github.io</a> </summary>
</details>
<div class="sdpi-item" id="select_single">
<div class="sdpi-item-label">Mic Type</div>
Expand Down
2 changes: 1 addition & 1 deletion VoiceMeeter/PropertyInspector/VoiceMeeter/Modify.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<body>
<div class="sdpi-wrapper">
<details class="message info">
<summary>For feedback/suggestions contact me at <a href="https://BarRaider.github.io" target="_blank">https://BarRaider.github.io</a> </summary>
<summary>For feedback/suggestions contact me at <a href="https://BarRaider.github.io" target="_blank" onclick="openWebsite()">https://BarRaider.github.io</a> </summary>
</details>
<div class="sdpi-item" id="select_single">
<div class="sdpi-item-label">Param</div>
Expand Down
54 changes: 0 additions & 54 deletions VoiceMeeter/SettingsBase.cs

This file was deleted.

24 changes: 0 additions & 24 deletions VoiceMeeter/StreamDeckOptions.cs

This file was deleted.

38 changes: 0 additions & 38 deletions VoiceMeeter/Tools.cs

This file was deleted.

9 changes: 8 additions & 1 deletion VoiceMeeter/VMAdvanced.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Newtonsoft.Json;
using BarRaider.SdTools;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
Expand Down Expand Up @@ -88,6 +89,12 @@ public void KeyPressed()
keyPressed = true;
keyPressStart = DateTime.Now;

if (!VMManager.Instance.IsConnected)
{
settings.ShowAlert();
return;
}

if (!String.IsNullOrEmpty(settings.SetValue))
{
VMManager.Instance.SetParameters(settings.SetValue);
Expand Down
9 changes: 8 additions & 1 deletion VoiceMeeter/VMAdvancedToggle.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Newtonsoft.Json;
using BarRaider.SdTools;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
Expand Down Expand Up @@ -84,6 +85,12 @@ public VMAdvancedToggle(streamdeck_client_csharp.StreamDeckConnection connection

public void KeyPressed()
{
if (!VMManager.Instance.IsConnected)
{
settings.ShowAlert();
return;
}

bool isMode1 = IsMode1();
if (isMode1 && !String.IsNullOrEmpty(settings.Mode2Value))
{
Expand Down
9 changes: 8 additions & 1 deletion VoiceMeeter/VMMicrophone.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Newtonsoft.Json;
using BarRaider.SdTools;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System;

Expand Down Expand Up @@ -90,6 +91,12 @@ public VMMicrophone(streamdeck_client_csharp.StreamDeckConnection connection, st

public void KeyPressed()
{
if (!VMManager.Instance.IsConnected)
{
settings.ShowAlert();
return;
}

switch (settings.MicType)
{
case MicTypeEnum.SingleMode:
Expand Down
9 changes: 8 additions & 1 deletion VoiceMeeter/VMModify.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Newtonsoft.Json;
using BarRaider.SdTools;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
Expand Down Expand Up @@ -113,6 +114,12 @@ public void LongKeyPressed()

public void KeyPressed()
{
if (!VMManager.Instance.IsConnected)
{
settings.ShowAlert();
return;
}

// Used for long press
keyPressed = true;
keyPressStart = DateTime.Now;
Expand Down
8 changes: 4 additions & 4 deletions VoiceMeeter/VoiceMeeter.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="barraider-sdtools, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\barraider-sdtools\barraider-sdtools\bin\Release\barraider-sdtools.dll</HintPath>
</Reference>
<Reference Include="CommandLine, Version=2.4.3.0, Culture=neutral, PublicKeyToken=de6f01bd326f8c32, processorArchitecture=MSIL">
<HintPath>..\packages\CommandLineParser.2.4.3\lib\netstandard2.0\CommandLine.dll</HintPath>
</Reference>
Expand All @@ -59,7 +63,6 @@
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="IPluginable.cs" />
<Compile Include="Properties\Plugin1.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
Expand All @@ -68,9 +71,6 @@
<Compile Include="PluginContainer.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="SettingsBase.cs" />
<Compile Include="StreamDeckOptions.cs" />
<Compile Include="Tools.cs" />
<Compile Include="VMAdvanced.cs" />
<Compile Include="VMAdvancedToggle.cs" />
<Compile Include="VMManager.cs" />
Expand Down
Loading

0 comments on commit 54c795f

Please sign in to comment.