-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add config to all the StreamDeck+ actions.
- Loading branch information
Showing
11 changed files
with
305 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
92 changes: 92 additions & 0 deletions
92
streamdeck-vtubestudio/PropertyInspector/src/pages/DialRotate/App.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
<template> | ||
<NotConnected v-if="!websocketConnected" /> | ||
<div v-else> | ||
<div class="sdpi-item"> | ||
<div class="sdpi-item-label">Rotation ({{ currentRotation }})</div> | ||
<span class="sdpi-item-value"> | ||
<input type="range" min="0" max="360" step="0.01" v-model="defaultRotation"> | ||
</span> | ||
</div> | ||
|
||
<div class="sdpi-item"> | ||
<div class="sdpi-item-label">Step Size ({{ stepSize ?? '0' }})</div> | ||
<span class="sdpi-item-value"> | ||
<input type="range" min="1" max="10" step="1" v-model="stepSize"> | ||
</span> | ||
</div> | ||
|
||
<div class="sdpi-item"> | ||
<div class="sdpi-item-label">Tools</div> | ||
<button class="sdpi-item-value" id="use-current" @click="sendAction('use-current', null)">Current Pos</button> | ||
<button class="sdpi-item-value" id="force-refresh" @click="sendAction('refresh', null)">Refresh</button> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
import NotConnected from "../../components/NotConnected.vue"; | ||
export default { | ||
name: 'App', | ||
components: { | ||
NotConnected | ||
}, | ||
data() { | ||
return { | ||
websocketConnected: false, | ||
defaultRotation: 0.0, | ||
stepSize: 2 | ||
} | ||
}, | ||
computed: { | ||
currentRotation() { | ||
let pos = Number(this.defaultRotation) ?? 0 | ||
return pos.toLocaleString(undefined, { maximumFractionDigits: 2 }) + "°"; | ||
} | ||
}, | ||
watch: { | ||
defaultRotation() { | ||
this.saveSettings() | ||
}, | ||
stepSize() { | ||
this.saveSettings() | ||
} | ||
}, | ||
methods: { | ||
sendAction(command, payload) { | ||
this.$store.state.streamDeck.sendToPlugin({ | ||
command, payload | ||
}) | ||
}, | ||
saveSettings() { | ||
this.$store.state.streamDeck.saveSettings({ | ||
defaultRotation: this.defaultPosition, | ||
stepSize: this.stepSize | ||
}); | ||
} | ||
}, | ||
mounted() { | ||
this.$store.state.streamDeck.on('didReceiveSettings', payload => | ||
{ | ||
let settings = payload?.payload?.settings ?? this.settings | ||
this.defaultRotation = settings.defaultRotation ?? 0.0 | ||
this.stepSize = settings.stepSize ?? 2 | ||
}) | ||
this.$store.state.streamDeck.on('connected', payload => { | ||
let settings = payload?.payload?.settings ?? this.settings | ||
this.defaultRotation = settings.defaultRotation ?? 0.0 | ||
this.stepSize = settings.stepSize ?? 2 | ||
}) | ||
this.$store.state.streamDeck.on('sendToPropertyInspector', e => { | ||
this.websocketConnected = e.connected ?? false | ||
}) | ||
}, | ||
} | ||
</script> | ||
<style> | ||
</style> |
26 changes: 26 additions & 0 deletions
26
streamdeck-vtubestudio/PropertyInspector/src/pages/DialRotate/main.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { createApp } from 'vue' | ||
import StreamDeck from '../../utils/streamdeck'; | ||
import App from './App.vue' | ||
import { createStore } from 'vuex'; | ||
|
||
window.connectElgatoStreamDeckSocket = function (inPort, inPluginUUID, inRegisterEvent, inInfo, inActionInfo) { | ||
let streamDeck = new StreamDeck(inPort, inPluginUUID, inRegisterEvent, inInfo, inActionInfo); | ||
console.log("Connected to stream deck") | ||
|
||
let store = createStore({ | ||
state: { | ||
streamDeck, | ||
}, | ||
mutations: { | ||
}, | ||
actions: { | ||
}, | ||
modules: { | ||
} | ||
}) | ||
|
||
createApp(App).use(store).mount('#app') | ||
} | ||
|
||
|
||
|
Oops, something went wrong.