mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-08-29 12:45:28 -05:00
Compare commits
140 Commits
1.32.8
...
nested-que
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ba7886c8c1 | ||
|
|
801268d08b | ||
|
|
7dfd9ddcb5 | ||
|
|
6215c39024 | ||
|
|
1c856911e8 | ||
|
|
ed17c2ac6d | ||
|
|
1ce332a91d | ||
|
|
2aa27fc051 | ||
|
|
31b239d5dc | ||
|
|
7c3779e287 | ||
|
|
3f13c33b10 | ||
|
|
8727a65513 | ||
|
|
baf3d0e63c | ||
|
|
ea2d1e7e9d | ||
|
|
f9f26ad50b | ||
|
|
9911c41a35 | ||
|
|
d590bc11f8 | ||
|
|
31c4c1f5d7 | ||
|
|
42ff48d637 | ||
|
|
d44376e869 | ||
|
|
4b1fd9e700 | ||
|
|
d61099f9c0 | ||
|
|
c2b73a02ca | ||
|
|
49a681bcfe | ||
|
|
4cedb29123 | ||
|
|
d80b3aaf69 | ||
|
|
b1cc15386f | ||
|
|
748744d1b7 | ||
|
|
912ff98e27 | ||
|
|
a9614c5306 | ||
|
|
cb2f97f11d | ||
|
|
017ea233ec | ||
|
|
e8206173ff | ||
|
|
680f72e4f9 | ||
|
|
930e8b38d4 | ||
|
|
ee1d0136d9 | ||
|
|
20c276f4ea | ||
|
|
bea4f66eb1 | ||
|
|
c5185765ee | ||
|
|
90130c119e | ||
|
|
a7ca06d25c | ||
|
|
5a5d590c51 | ||
|
|
336b398bc3 | ||
|
|
56c8f335db | ||
|
|
b6a4d48948 | ||
|
|
774ccb7fbd | ||
|
|
eda9dde23d | ||
|
|
bbf91efd0d | ||
|
|
b022d59391 | ||
|
|
cf46a010a7 | ||
|
|
595bab0d83 | ||
|
|
6fc819d72b | ||
|
|
0553a9b2ee | ||
|
|
3caa3a4735 | ||
|
|
2469057ad6 | ||
|
|
b230ec5bc5 | ||
|
|
1669b4cb72 | ||
|
|
2841fcaadb | ||
|
|
91810d9c40 | ||
|
|
ccb5c8ba2c | ||
|
|
265daebdf3 | ||
|
|
a149a11c57 | ||
|
|
d7cc7a4c7b | ||
|
|
41866bcb24 | ||
|
|
c73a5866d7 | ||
|
|
18aaf1dd31 | ||
|
|
d523a2e674 | ||
|
|
0f7eed6257 | ||
|
|
1f5a346190 | ||
|
|
7fd2979e86 | ||
|
|
2077e1971d | ||
|
|
873e073eb6 | ||
|
|
4f3d9e3a00 | ||
|
|
c02896ea17 | ||
|
|
4bfd40219b | ||
|
|
6a3de18069 | ||
|
|
8c51b44fbb | ||
|
|
10daa38921 | ||
|
|
6e0f7ab38f | ||
|
|
86061b3cf1 | ||
|
|
c3669cae3e | ||
|
|
a116360f87 | ||
|
|
713f695aa4 | ||
|
|
dec5c2d763 | ||
|
|
f090dea136 | ||
|
|
d00986df03 | ||
|
|
03e5397b7e | ||
|
|
94d49db196 | ||
|
|
1483f9d9dc | ||
|
|
99629e8c66 | ||
|
|
ba38b8bf27 | ||
|
|
38513735dd | ||
|
|
acfc7d605b | ||
|
|
df42538319 | ||
|
|
b02259e926 | ||
|
|
2b6bd9fb51 | ||
|
|
aadedbb610 | ||
|
|
d15a324137 | ||
|
|
119fac17bf | ||
|
|
088881b674 | ||
|
|
f008d5367b | ||
|
|
1ace185a57 | ||
|
|
a01d26e25d | ||
|
|
7e2ef9aacc | ||
|
|
4a98d064f7 | ||
|
|
b0d6cea52a | ||
|
|
d6bf9ed101 | ||
|
|
7e940e515b | ||
|
|
29e1ff0754 | ||
|
|
6309100cc4 | ||
|
|
ec3052c823 | ||
|
|
a28b800228 | ||
|
|
713a64ab45 | ||
|
|
4d5ffe38fc | ||
|
|
85460157b1 | ||
|
|
35e5b7620e | ||
|
|
e4c06b14a7 | ||
|
|
7fe3258269 | ||
|
|
ec19b4d4fb | ||
|
|
9301ead060 | ||
|
|
bc29ece526 | ||
|
|
4158c7a363 | ||
|
|
944d1059da | ||
|
|
bf18d8e106 | ||
|
|
bf216e0917 | ||
|
|
2405b6dbbf | ||
|
|
e64f2d195e | ||
|
|
f66bec8caf | ||
|
|
3eb79e3adb | ||
|
|
07e2ac3ca0 | ||
|
|
8e2c466c2d | ||
|
|
cc68e2366c | ||
|
|
7a0e08b0d8 | ||
|
|
be8744f0d0 | ||
|
|
d4425df694 | ||
|
|
70e5f6002d | ||
|
|
ff98ec36d6 | ||
|
|
4966802f14 | ||
|
|
b23a90557f | ||
|
|
d6ea815b85 |
@@ -19,14 +19,9 @@ inputs:
|
|||||||
runs:
|
runs:
|
||||||
using: 'composite'
|
using: 'composite'
|
||||||
steps:
|
steps:
|
||||||
- name: Setup cmake
|
|
||||||
uses: jwlawson/actions-setup-cmake@v1.13
|
|
||||||
with:
|
|
||||||
cmake-version: '3.x.x'
|
|
||||||
|
|
||||||
- name: Restore cached dependencies
|
- name: Restore cached dependencies
|
||||||
id: restore-cache
|
id: restore-cache
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v5
|
||||||
with:
|
with:
|
||||||
path: ${{ env.DEP_DIR }}
|
path: ${{ env.DEP_DIR }}
|
||||||
key: ${{ env.DEP_DIR }}-${{ runner.os }}-${{ inputs.target }}
|
key: ${{ env.DEP_DIR }}-${{ runner.os }}-${{ inputs.target }}
|
||||||
|
|||||||
2
.github/actions/run-clang-format/action.yaml
vendored
2
.github/actions/run-clang-format/action.yaml
vendored
@@ -29,6 +29,7 @@ runs:
|
|||||||
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
|
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
|
||||||
echo "/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin" >> $GITHUB_PATH
|
echo "/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin" >> $GITHUB_PATH
|
||||||
echo "/home/linuxbrew/.linuxbrew/opt/clang-format@16/bin" >> $GITHUB_PATH
|
echo "/home/linuxbrew/.linuxbrew/opt/clang-format@16/bin" >> $GITHUB_PATH
|
||||||
|
brew update
|
||||||
brew install --quiet zsh
|
brew install --quiet zsh
|
||||||
echo ::endgroup::
|
echo ::endgroup::
|
||||||
|
|
||||||
@@ -52,6 +53,7 @@ runs:
|
|||||||
|
|
||||||
if (( ${changes[(I)(*.c|*.h|*.cpp|*.hpp|*.m|*.mm)]} )) {
|
if (( ${changes[(I)(*.c|*.h|*.cpp|*.hpp|*.m|*.mm)]} )) {
|
||||||
echo ::group::Install clang-format-16
|
echo ::group::Install clang-format-16
|
||||||
|
brew update
|
||||||
brew install --quiet obsproject/tools/clang-format@16
|
brew install --quiet obsproject/tools/clang-format@16
|
||||||
echo ::endgroup::
|
echo ::endgroup::
|
||||||
|
|
||||||
|
|||||||
2
.github/scripts/.Wingetfile
vendored
2
.github/scripts/.Wingetfile
vendored
@@ -1,4 +1,4 @@
|
|||||||
package 'cmake', path: 'Cmake\bin', bin: 'cmake'
|
package 'cmake', path: 'Cmake\bin', bin: 'cmake'
|
||||||
package 'innosetup', path: 'Inno Setup 6', bin: 'iscc'
|
package 'innosetup', path: 'Inno Setup 6', bin: 'iscc'
|
||||||
package 'OpenSSL', path: 'OpenSSL', bin: 'openssl'
|
package 'OpenSSL', path: 'OpenSSL', bin: 'openssl', version: '3.6.2'
|
||||||
package 'Microsoft.VisualStudio.Locator', path: 'vswhere', bin: 'vswhere'
|
package 'Microsoft.VisualStudio.Locator', path: 'vswhere', bin: 'vswhere'
|
||||||
4
.github/scripts/.build.zsh
vendored
4
.github/scripts/.build.zsh
vendored
@@ -255,6 +255,10 @@ ${_usage_host:-}"
|
|||||||
|
|
||||||
cmake_args+=(
|
cmake_args+=(
|
||||||
-DCMAKE_PREFIX_PATH="${advss_deps_path}"
|
-DCMAKE_PREFIX_PATH="${advss_deps_path}"
|
||||||
|
-DOPENSSL_ROOT_DIR="${advss_deps_path}"
|
||||||
|
-DOPENSSL_INCLUDE_DIR="${advss_deps_path}/include"
|
||||||
|
-DOPENSSL_CRYPTO_LIBRARY="${advss_deps_path}/lib/libcrypto.a"
|
||||||
|
-DOPENSSL_SSL_LIBRARY="${advss_deps_path}/lib/libssl.a"
|
||||||
--preset ${_preset}
|
--preset ${_preset}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
73
.github/scripts/Package-Windows.ps1
vendored
73
.github/scripts/Package-Windows.ps1
vendored
@@ -68,14 +68,53 @@ function Package {
|
|||||||
|
|
||||||
Remove-Item @RemoveArgs
|
Remove-Item @RemoveArgs
|
||||||
|
|
||||||
Log-Group "Archiving ${ProductName}..."
|
$ReleasePath = "${ProjectRoot}/release/${Configuration}"
|
||||||
$CompressArgs = @{
|
$NewBinPath = "${ReleasePath}/${ProductName}/bin/64bit"
|
||||||
Path = (Get-ChildItem -Path "${ProjectRoot}/release/${Configuration}" -Exclude "${OutputName}*.*")
|
$NewDataPath = "${ReleasePath}/${ProductName}/data"
|
||||||
CompressionLevel = 'Optimal'
|
$CIWindowsDir = "${ProjectRoot}/build-aux/CI/windows"
|
||||||
DestinationPath = "${ProjectRoot}/release/${OutputName}.zip"
|
|
||||||
Verbose = ($Env:CI -ne $null)
|
# --- Recommended zip (new layout, extract to %ProgramData%\obs-studio\) ---
|
||||||
|
Log-Group "Archiving ${ProductName} (recommended)..."
|
||||||
|
$RecStaging = "${ProjectRoot}/release/zip-staging-rec"
|
||||||
|
Remove-Item -Path $RecStaging -Recurse -Force -ErrorAction SilentlyContinue
|
||||||
|
New-Item -ItemType Directory -Force -Path $RecStaging | Out-Null
|
||||||
|
Copy-Item -Path "${CIWindowsDir}/README.txt" -Destination "${RecStaging}/README.txt"
|
||||||
|
if ( Test-Path -Path $NewBinPath ) {
|
||||||
|
$RecBinPath = "${RecStaging}/${ProductName}/bin/64bit"
|
||||||
|
New-Item -ItemType Directory -Force -Path $RecBinPath | Out-Null
|
||||||
|
Copy-Item -Path "${NewBinPath}/*" -Destination $RecBinPath -Recurse -Force
|
||||||
}
|
}
|
||||||
Compress-Archive -Force @CompressArgs
|
if ( Test-Path -Path $NewDataPath ) {
|
||||||
|
$RecDataPath = "${RecStaging}/${ProductName}/data"
|
||||||
|
New-Item -ItemType Directory -Force -Path $RecDataPath | Out-Null
|
||||||
|
Copy-Item -Path "${NewDataPath}/*" -Destination $RecDataPath -Recurse -Force
|
||||||
|
}
|
||||||
|
Compress-Archive -Force -Path (Get-ChildItem -Path $RecStaging) `
|
||||||
|
-CompressionLevel Optimal `
|
||||||
|
-DestinationPath "${ProjectRoot}/release/${OutputName}.zip"
|
||||||
|
Remove-Item -Path $RecStaging -Recurse -Force
|
||||||
|
Log-Group
|
||||||
|
|
||||||
|
# --- Legacy zip (old layout, extract to OBS install directory) ---
|
||||||
|
Log-Group "Archiving ${ProductName} (legacy)..."
|
||||||
|
$LegStaging = "${ProjectRoot}/release/zip-staging-leg"
|
||||||
|
Remove-Item -Path $LegStaging -Recurse -Force -ErrorAction SilentlyContinue
|
||||||
|
New-Item -ItemType Directory -Force -Path $LegStaging | Out-Null
|
||||||
|
Copy-Item -Path "${CIWindowsDir}/README-legacy.txt" -Destination "${LegStaging}/README.txt"
|
||||||
|
if ( Test-Path -Path $NewBinPath ) {
|
||||||
|
$LegBinPath = "${LegStaging}/obs-plugins/64bit"
|
||||||
|
New-Item -ItemType Directory -Force -Path $LegBinPath | Out-Null
|
||||||
|
Copy-Item -Path "${NewBinPath}/*" -Destination $LegBinPath -Recurse -Force
|
||||||
|
}
|
||||||
|
if ( Test-Path -Path $NewDataPath ) {
|
||||||
|
$LegDataPath = "${LegStaging}/data/obs-plugins/${ProductName}"
|
||||||
|
New-Item -ItemType Directory -Force -Path $LegDataPath | Out-Null
|
||||||
|
Copy-Item -Path "${NewDataPath}/*" -Destination $LegDataPath -Recurse -Force
|
||||||
|
}
|
||||||
|
Compress-Archive -Force -Path (Get-ChildItem -Path $LegStaging) `
|
||||||
|
-CompressionLevel Optimal `
|
||||||
|
-DestinationPath "${ProjectRoot}/release/${OutputName}-legacy.zip"
|
||||||
|
Remove-Item -Path $LegStaging -Recurse -Force
|
||||||
Log-Group
|
Log-Group
|
||||||
|
|
||||||
if ( ( $BuildInstaller ) ) {
|
if ( ( $BuildInstaller ) ) {
|
||||||
@@ -89,7 +128,25 @@ function Package {
|
|||||||
Log-Information 'Creating InnoSetup installer...'
|
Log-Information 'Creating InnoSetup installer...'
|
||||||
Push-Location -Stack BuildTemp
|
Push-Location -Stack BuildTemp
|
||||||
Ensure-Location -Path "${ProjectRoot}/release"
|
Ensure-Location -Path "${ProjectRoot}/release"
|
||||||
Copy-Item -Path ${Configuration} -Destination Package -Recurse
|
Remove-Item -Path Package -Recurse -Force -ErrorAction SilentlyContinue
|
||||||
|
|
||||||
|
# Recommended layout (for %ProgramData%\obs-studio\plugins\)
|
||||||
|
$PkgRec = "Package/recommended"
|
||||||
|
New-Item -ItemType Directory -Force -Path $PkgRec | Out-Null
|
||||||
|
Copy-Item -Path "${Configuration}/*" -Destination $PkgRec -Recurse -Force
|
||||||
|
|
||||||
|
# Legacy layout (for OBS installation directory)
|
||||||
|
if ( Test-Path "${Configuration}/${ProductName}/bin/64bit" ) {
|
||||||
|
$PkgLegBin = "Package/legacy/obs-plugins/64bit"
|
||||||
|
New-Item -ItemType Directory -Force -Path $PkgLegBin | Out-Null
|
||||||
|
Copy-Item -Path "${Configuration}/${ProductName}/bin/64bit/*" -Destination $PkgLegBin -Recurse -Force
|
||||||
|
}
|
||||||
|
if ( Test-Path "${Configuration}/${ProductName}/data" ) {
|
||||||
|
$PkgLegData = "Package/legacy/data/obs-plugins/${ProductName}"
|
||||||
|
New-Item -ItemType Directory -Force -Path $PkgLegData | Out-Null
|
||||||
|
Copy-Item -Path "${Configuration}/${ProductName}/data/*" -Destination $PkgLegData -Recurse -Force
|
||||||
|
}
|
||||||
|
|
||||||
Invoke-External iscc ${IsccFile} /O"${ProjectRoot}/release" /F"${OutputName}-Installer"
|
Invoke-External iscc ${IsccFile} /O"${ProjectRoot}/release" /F"${OutputName}-Installer"
|
||||||
Remove-Item -Path Package -Recurse
|
Remove-Item -Path Package -Recurse
|
||||||
Pop-Location -Stack BuildTemp
|
Pop-Location -Stack BuildTemp
|
||||||
|
|||||||
4
.github/scripts/utils.zsh/check_macos
vendored
4
.github/scripts/utils.zsh/check_macos
vendored
@@ -18,7 +18,5 @@ if (( ! ${+commands[brew]} )) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
brew bundle --file ${SCRIPT_HOME}/.Brewfile
|
brew bundle --file ${SCRIPT_HOME}/.Brewfile
|
||||||
# Workaround to make sure locally built openssl is picked up by cmake
|
rehash
|
||||||
brew uninstall --ignore-dependencies openssl@3 || true
|
|
||||||
rehash || true
|
|
||||||
log_group
|
log_group
|
||||||
|
|||||||
4
.github/workflows/build-debian.yml
vendored
4
.github/workflows/build-debian.yml
vendored
@@ -21,7 +21,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v6
|
||||||
with:
|
with:
|
||||||
submodules: "recursive"
|
submodules: "recursive"
|
||||||
- name: check_libobs_revision
|
- name: check_libobs_revision
|
||||||
@@ -50,7 +50,7 @@ jobs:
|
|||||||
mv ../*.deb .
|
mv ../*.deb .
|
||||||
- name: Publish
|
- name: Publish
|
||||||
if: success()
|
if: success()
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v7
|
||||||
with:
|
with:
|
||||||
name: "obs-scene-switcher.deb"
|
name: "obs-scene-switcher.deb"
|
||||||
path: ${{ github.workspace }}/*.deb
|
path: ${{ github.workspace }}/*.deb
|
||||||
|
|||||||
34
.github/workflows/build-project.yaml
vendored
34
.github/workflows/build-project.yaml
vendored
@@ -6,7 +6,7 @@ on:
|
|||||||
description: "Project name detected by parsing build spec file"
|
description: "Project name detected by parsing build spec file"
|
||||||
value: ${{ jobs.check-event.outputs.pluginName }}
|
value: ${{ jobs.check-event.outputs.pluginName }}
|
||||||
env:
|
env:
|
||||||
DEP_DIR: .deps/advss-build-dependencies-3
|
DEP_DIR: .deps/advss-build-dependencies-5
|
||||||
jobs:
|
jobs:
|
||||||
check-event:
|
check-event:
|
||||||
name: Check GitHub Event Data 🔎
|
name: Check GitHub Event Data 🔎
|
||||||
@@ -22,7 +22,7 @@ jobs:
|
|||||||
commitHash: ${{ steps.setup.outputs.commitHash }}
|
commitHash: ${{ steps.setup.outputs.commitHash }}
|
||||||
pluginName: ${{ steps.setup.outputs.pluginName }}
|
pluginName: ${{ steps.setup.outputs.pluginName }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v6
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- name: Check Event Data ☑️
|
- name: Check Event Data ☑️
|
||||||
@@ -81,7 +81,7 @@ jobs:
|
|||||||
run:
|
run:
|
||||||
shell: zsh --no-rcs --errexit --pipefail {0}
|
shell: zsh --no-rcs --errexit --pipefail {0}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v6
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
@@ -111,7 +111,7 @@ jobs:
|
|||||||
sudo xcode-select --switch /Applications/Xcode_16.1.0.app/Contents/Developer
|
sudo xcode-select --switch /Applications/Xcode_16.1.0.app/Contents/Developer
|
||||||
print '::endgroup::'
|
print '::endgroup::'
|
||||||
|
|
||||||
- uses: actions/cache@v4
|
- uses: actions/cache@v5
|
||||||
id: ccache-cache
|
id: ccache-cache
|
||||||
with:
|
with:
|
||||||
path: ${{ github.workspace }}/.ccache
|
path: ${{ github.workspace }}/.ccache
|
||||||
@@ -163,13 +163,13 @@ jobs:
|
|||||||
codesignPass: ${{ secrets.MACOS_NOTARIZATION_PASSWORD }}
|
codesignPass: ${{ secrets.MACOS_NOTARIZATION_PASSWORD }}
|
||||||
|
|
||||||
- name: Upload Artifacts 📡
|
- name: Upload Artifacts 📡
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v7
|
||||||
with:
|
with:
|
||||||
name: ${{ steps.setup.outputs.pluginName }}-${{ steps.setup.outputs.pluginVersion }}-macos-universal-${{ needs.check-event.outputs.commitHash }}
|
name: ${{ steps.setup.outputs.pluginName }}-${{ steps.setup.outputs.pluginVersion }}-macos-universal-${{ needs.check-event.outputs.commitHash }}
|
||||||
path: ${{ github.workspace }}/release/${{ steps.setup.outputs.pluginName }}-*-macos-universal.*
|
path: ${{ github.workspace }}/release/${{ steps.setup.outputs.pluginName }}-*-macos-universal.*
|
||||||
|
|
||||||
- name: Upload Debug Symbol Artifacts 🪲
|
- name: Upload Debug Symbol Artifacts 🪲
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v7
|
||||||
if: ${{ needs.check-event.outputs.config == 'Release' }}
|
if: ${{ needs.check-event.outputs.config == 'Release' }}
|
||||||
with:
|
with:
|
||||||
name: ${{ steps.setup.outputs.pluginName }}-${{ steps.setup.outputs.pluginVersion }}-macos-universal-${{ needs.check-event.outputs.commitHash }}-dSYMs
|
name: ${{ steps.setup.outputs.pluginName }}-${{ steps.setup.outputs.pluginVersion }}-macos-universal-${{ needs.check-event.outputs.commitHash }}-dSYMs
|
||||||
@@ -183,7 +183,7 @@ jobs:
|
|||||||
run:
|
run:
|
||||||
shell: bash
|
shell: bash
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v6
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
@@ -202,7 +202,7 @@ jobs:
|
|||||||
echo "pluginName=${product_name}" >> $GITHUB_OUTPUT
|
echo "pluginName=${product_name}" >> $GITHUB_OUTPUT
|
||||||
echo "pluginVersion=${git_tag}" >> $GITHUB_OUTPUT
|
echo "pluginVersion=${git_tag}" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- uses: actions/cache@v4
|
- uses: actions/cache@v5
|
||||||
id: ccache-cache
|
id: ccache-cache
|
||||||
with:
|
with:
|
||||||
path: ${{ github.workspace }}/.ccache
|
path: ${{ github.workspace }}/.ccache
|
||||||
@@ -210,13 +210,8 @@ jobs:
|
|||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-ccache-x86_64-
|
${{ runner.os }}-ccache-x86_64-
|
||||||
|
|
||||||
- name: Set up CMake 🏗️
|
|
||||||
uses: jwlawson/actions-setup-cmake@v1.13
|
|
||||||
with:
|
|
||||||
cmake-version: '3.x.x'
|
|
||||||
|
|
||||||
- name: Set up Homebrew 🍺
|
- name: Set up Homebrew 🍺
|
||||||
uses: Homebrew/actions/setup-homebrew@master
|
uses: Homebrew/actions/setup-homebrew@main
|
||||||
|
|
||||||
- name: Build Plugin 🧱
|
- name: Build Plugin 🧱
|
||||||
uses: ./.github/actions/build-plugin
|
uses: ./.github/actions/build-plugin
|
||||||
@@ -238,23 +233,24 @@ jobs:
|
|||||||
config: ${{ needs.check-event.outputs.config }}
|
config: ${{ needs.check-event.outputs.config }}
|
||||||
|
|
||||||
- name: Upload Source Tarball 🗜️
|
- name: Upload Source Tarball 🗜️
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v7
|
||||||
with:
|
with:
|
||||||
name: ${{ steps.setup.outputs.pluginName }}-${{ steps.setup.outputs.pluginVersion }}-sources-${{ needs.check-event.outputs.commitHash }}
|
name: ${{ steps.setup.outputs.pluginName }}-${{ steps.setup.outputs.pluginVersion }}-sources-${{ needs.check-event.outputs.commitHash }}
|
||||||
path: ${{ github.workspace }}/release/${{ steps.setup.outputs.pluginName }}-*-source.*
|
path: ${{ github.workspace }}/release/${{ steps.setup.outputs.pluginName }}-*-source.*
|
||||||
|
|
||||||
- name: Upload Artifacts 📡
|
- name: Upload Artifacts 📡
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v7
|
||||||
with:
|
with:
|
||||||
name: ${{ steps.setup.outputs.pluginName }}-${{ steps.setup.outputs.pluginVersion }}-ubuntu-24.04-x86_64-${{ needs.check-event.outputs.commitHash }}
|
name: ${{ steps.setup.outputs.pluginName }}-${{ steps.setup.outputs.pluginVersion }}-ubuntu-24.04-x86_64-${{ needs.check-event.outputs.commitHash }}
|
||||||
path: ${{ github.workspace }}/release/${{ steps.setup.outputs.pluginName }}-*-x86_64*.*
|
path: ${{ github.workspace }}/release/${{ steps.setup.outputs.pluginName }}-*-x86_64*.*
|
||||||
|
|
||||||
- name: Upload debug symbol artifacts 🪲
|
- name: Upload debug symbol artifacts 🪲
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v7
|
||||||
if: ${{ fromJSON(needs.check-event.outputs.package) }}
|
if: ${{ fromJSON(needs.check-event.outputs.package) }}
|
||||||
with:
|
with:
|
||||||
name: ${{ steps.setup.outputs.pluginName }}-${{ steps.setup.outputs.pluginVersion }}-ubuntu-24.04-x86_64-${{ needs.check-event.outputs.commitHash }}-dbgsym
|
name: ${{ steps.setup.outputs.pluginName }}-${{ steps.setup.outputs.pluginVersion }}-ubuntu-24.04-x86_64-${{ needs.check-event.outputs.commitHash }}-dbgsym
|
||||||
path: ${{ github.workspace }}/release/${{ steps.setup.outputs.pluginName }}-*-x86_64*-dbgsym.ddeb
|
path: ${{ github.workspace }}/release/${{ steps.setup.outputs.pluginName }}-*-x86_64*-dbgsym.ddeb
|
||||||
|
if-no-files-found: ignore
|
||||||
|
|
||||||
windows-build:
|
windows-build:
|
||||||
name: Build for Windows 🪟
|
name: Build for Windows 🪟
|
||||||
@@ -264,7 +260,7 @@ jobs:
|
|||||||
run:
|
run:
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v6
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
@@ -311,7 +307,7 @@ jobs:
|
|||||||
package: ${{ fromJSON(needs.check-event.outputs.package) }}
|
package: ${{ fromJSON(needs.check-event.outputs.package) }}
|
||||||
|
|
||||||
- name: Upload Artifacts 📡
|
- name: Upload Artifacts 📡
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v7
|
||||||
with:
|
with:
|
||||||
name: ${{ steps.setup.outputs.pluginName }}-${{ steps.setup.outputs.pluginVersion }}-windows-x64-${{ needs.check-event.outputs.commitHash }}
|
name: ${{ steps.setup.outputs.pluginName }}-${{ steps.setup.outputs.pluginVersion }}-windows-x64-${{ needs.check-event.outputs.commitHash }}
|
||||||
path: ${{ github.workspace }}/release/${{ steps.setup.outputs.pluginName }}-*-windows-x64*.*
|
path: ${{ github.workspace }}/release/${{ steps.setup.outputs.pluginName }}-*-windows-x64*.*
|
||||||
|
|||||||
4
.github/workflows/check-format.yaml
vendored
4
.github/workflows/check-format.yaml
vendored
@@ -5,7 +5,7 @@ jobs:
|
|||||||
clang-format:
|
clang-format:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v6
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- name: clang-format check 🐉
|
- name: clang-format check 🐉
|
||||||
@@ -17,7 +17,7 @@ jobs:
|
|||||||
cmake-format:
|
cmake-format:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v6
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- name: cmake-format check 🎛️
|
- name: cmake-format check 🎛️
|
||||||
|
|||||||
2
.github/workflows/locale-check.yml
vendored
2
.github/workflows/locale-check.yml
vendored
@@ -19,7 +19,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v6
|
||||||
|
|
||||||
- name: Check locale files
|
- name: Check locale files
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
4
.github/workflows/push.yaml
vendored
4
.github/workflows/push.yaml
vendored
@@ -59,7 +59,7 @@ jobs:
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
- name: Download Build Artifacts 📥
|
- name: Download Build Artifacts 📥
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v8
|
||||||
if: fromJSON(steps.check.outputs.validTag)
|
if: fromJSON(steps.check.outputs.validTag)
|
||||||
id: download
|
id: download
|
||||||
|
|
||||||
@@ -106,7 +106,7 @@ jobs:
|
|||||||
- name: Create Release 🛫
|
- name: Create Release 🛫
|
||||||
if: fromJSON(steps.check.outputs.validTag)
|
if: fromJSON(steps.check.outputs.validTag)
|
||||||
id: create_release
|
id: create_release
|
||||||
uses: softprops/action-gh-release@d4e8205d7e959a9107da6396278b2f1f07af0f9b
|
uses: softprops/action-gh-release@b4309332981a82ec1c5618f44dd2e27cc8bfbfda
|
||||||
with:
|
with:
|
||||||
draft: true
|
draft: true
|
||||||
prerelease: ${{ fromJSON(steps.check.outputs.prerelease) }}
|
prerelease: ${{ fromJSON(steps.check.outputs.prerelease) }}
|
||||||
|
|||||||
@@ -134,6 +134,9 @@ target_sources(
|
|||||||
lib/macro/macro-dock-window.hpp
|
lib/macro/macro-dock-window.hpp
|
||||||
lib/macro/macro-edit.cpp
|
lib/macro/macro-edit.cpp
|
||||||
lib/macro/macro-edit.hpp
|
lib/macro/macro-edit.hpp
|
||||||
|
lib/macro/macro-export-builtin-extensions.cpp
|
||||||
|
lib/macro/macro-export-extensions.cpp
|
||||||
|
lib/macro/macro-export-extensions.hpp
|
||||||
lib/macro/macro-export-import-dialog.cpp
|
lib/macro/macro-export-import-dialog.cpp
|
||||||
lib/macro/macro-export-import-dialog.hpp
|
lib/macro/macro-export-import-dialog.hpp
|
||||||
lib/macro/macro-helpers.cpp
|
lib/macro/macro-helpers.cpp
|
||||||
@@ -204,6 +207,8 @@ target_sources(
|
|||||||
lib/utils/file-selection.hpp
|
lib/utils/file-selection.hpp
|
||||||
lib/utils/filter-combo-box.cpp
|
lib/utils/filter-combo-box.cpp
|
||||||
lib/utils/filter-combo-box.hpp
|
lib/utils/filter-combo-box.hpp
|
||||||
|
lib/utils/first-run-wizard.cpp
|
||||||
|
lib/utils/first-run-wizard.hpp
|
||||||
lib/utils/help-icon.hpp
|
lib/utils/help-icon.hpp
|
||||||
lib/utils/help-icon.cpp
|
lib/utils/help-icon.cpp
|
||||||
lib/utils/item-selection-helpers.cpp
|
lib/utils/item-selection-helpers.cpp
|
||||||
@@ -454,14 +459,29 @@ else()
|
|||||||
endif()
|
endif()
|
||||||
if(PROCPS2_INCLUDE_DIR)
|
if(PROCPS2_INCLUDE_DIR)
|
||||||
find_package(PkgConfig REQUIRED)
|
find_package(PkgConfig REQUIRED)
|
||||||
pkg_check_modules(libproc2 IMPORTED_TARGET libproc2<4.0.5 QUIET)
|
|
||||||
if(libproc2_FOUND)
|
|
||||||
target_compile_definitions(${LIB_NAME} PRIVATE PROCPS2_USE_INFO)
|
|
||||||
endif()
|
|
||||||
pkg_check_modules(libproc2 REQUIRED IMPORTED_TARGET libproc2)
|
pkg_check_modules(libproc2 REQUIRED IMPORTED_TARGET libproc2)
|
||||||
set(PROC_INCLUDE_DIR "${PROCPS2_INCLUDE_DIR}")
|
set(PROC_INCLUDE_DIR "${PROCPS2_INCLUDE_DIR}")
|
||||||
target_compile_definitions(${LIB_NAME} PRIVATE PROCPS2_AVAILABLE)
|
target_compile_definitions(${LIB_NAME} PRIVATE PROCPS2_AVAILABLE)
|
||||||
set(PROCESS_CONDITION_SUPPORTED 1)
|
set(PROCESS_CONDITION_SUPPORTED 1)
|
||||||
|
|
||||||
|
# Check if PIDS_VAL takes 4 arguments (old API, pre-4.0.5) or 3 (new API)
|
||||||
|
include(CheckCSourceCompiles)
|
||||||
|
set(CMAKE_REQUIRED_INCLUDES "${PROCPS2_INCLUDE_DIR}")
|
||||||
|
set(CMAKE_REQUIRED_LIBRARIES proc2)
|
||||||
|
check_c_source_compiles(
|
||||||
|
"
|
||||||
|
#include <libproc2/pids.h>
|
||||||
|
int main(void) {
|
||||||
|
struct pids_stack *s = 0;
|
||||||
|
struct pids_info *i = 0;
|
||||||
|
(void)PIDS_VAL(0, str, s, i);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
"
|
||||||
|
PROCPS2_PIDS_VAL_TAKES_INFO)
|
||||||
|
if(PROCPS2_PIDS_VAL_TAKES_INFO)
|
||||||
|
target_compile_definitions(${LIB_NAME} PRIVATE PROCPS2_USE_INFO)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
if(NOT DEFINED PROCESS_CONDITION_SUPPORTED)
|
if(NOT DEFINED PROCESS_CONDITION_SUPPORTED)
|
||||||
message(
|
message(
|
||||||
@@ -487,7 +507,11 @@ endif()
|
|||||||
# --- End of section ---
|
# --- End of section ---
|
||||||
|
|
||||||
add_subdirectory(plugins)
|
add_subdirectory(plugins)
|
||||||
add_subdirectory(tests)
|
|
||||||
|
option(ADVSS_ENABLE_TESTS "Build advanced-scene-switcher unit tests" OFF)
|
||||||
|
if(ADVSS_ENABLE_TESTS)
|
||||||
|
add_subdirectory(tests)
|
||||||
|
endif()
|
||||||
|
|
||||||
# --- Install ---
|
# --- Install ---
|
||||||
|
|
||||||
|
|||||||
@@ -41,7 +41,8 @@
|
|||||||
"description": "Build for macOS 11.0+ (Universal binary) for CI",
|
"description": "Build for macOS 11.0+ (Universal binary) for CI",
|
||||||
"generator": "Xcode",
|
"generator": "Xcode",
|
||||||
"cacheVariables": {
|
"cacheVariables": {
|
||||||
"CMAKE_COMPILE_WARNING_AS_ERROR": true
|
"CMAKE_COMPILE_WARNING_AS_ERROR": true,
|
||||||
|
"ADVSS_ENABLE_TESTS": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -69,7 +70,8 @@
|
|||||||
"displayName": "Windows x64 CI build",
|
"displayName": "Windows x64 CI build",
|
||||||
"description": "Build for Windows x64 on CI",
|
"description": "Build for Windows x64 on CI",
|
||||||
"cacheVariables": {
|
"cacheVariables": {
|
||||||
"CMAKE_COMPILE_WARNING_AS_ERROR": true
|
"CMAKE_COMPILE_WARNING_AS_ERROR": true,
|
||||||
|
"ADVSS_ENABLE_TESTS": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -97,7 +99,8 @@
|
|||||||
"description": "Build for Linux x86_64 on CI",
|
"description": "Build for Linux x86_64 on CI",
|
||||||
"cacheVariables": {
|
"cacheVariables": {
|
||||||
"CMAKE_BUILD_TYPE": "RelWithDebInfo",
|
"CMAKE_BUILD_TYPE": "RelWithDebInfo",
|
||||||
"CMAKE_COMPILE_WARNING_AS_ERROR": true
|
"CMAKE_COMPILE_WARNING_AS_ERROR": true,
|
||||||
|
"ADVSS_ENABLE_TESTS": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -125,7 +128,8 @@
|
|||||||
"description": "Build for Linux aarch64 on CI",
|
"description": "Build for Linux aarch64 on CI",
|
||||||
"cacheVariables": {
|
"cacheVariables": {
|
||||||
"CMAKE_BUILD_TYPE": "RelWithDebInfo",
|
"CMAKE_BUILD_TYPE": "RelWithDebInfo",
|
||||||
"CMAKE_COMPILE_WARNING_AS_ERROR": true
|
"CMAKE_COMPILE_WARNING_AS_ERROR": true,
|
||||||
|
"ADVSS_ENABLE_TESTS": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -14,11 +14,6 @@ On Linux the plugin is available via the **Flatpak** package manager for users w
|
|||||||
flatpak install com.obsproject.Studio.Plugin.SceneSwitcher
|
flatpak install com.obsproject.Studio.Plugin.SceneSwitcher
|
||||||
```
|
```
|
||||||
|
|
||||||
The **Snap** package manager offers an OBS Studio installation which is bundled with the plugin:
|
|
||||||
```
|
|
||||||
sudo snap install obs-studio
|
|
||||||
```
|
|
||||||
|
|
||||||
More information can be found [here](https://github.com/WarmUpTill/SceneSwitcher/wiki/Installation).
|
More information can be found [here](https://github.com/WarmUpTill/SceneSwitcher/wiki/Installation).
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
|
|||||||
23
build-aux/CI/windows/README-legacy.txt
Normal file
23
build-aux/CI/windows/README-legacy.txt
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
Advanced Scene Switcher - Windows Installation (Legacy)
|
||||||
|
========================================================
|
||||||
|
|
||||||
|
For full installation instructions visit:
|
||||||
|
https://github.com/WarmUpTill/SceneSwitcher/wiki/Installation
|
||||||
|
|
||||||
|
|
||||||
|
This archive uses the legacy plugin layout for older OBS versions,
|
||||||
|
portable OBS installs, and Steam.
|
||||||
|
|
||||||
|
Extract the CONTENTS of this archive into your OBS installation directory,
|
||||||
|
typically:
|
||||||
|
|
||||||
|
C:\Program Files\obs-studio\
|
||||||
|
|
||||||
|
Merge the data\ and obs-plugins\ folders with the existing ones when prompted.
|
||||||
|
|
||||||
|
Steam users: right-click OBS in your library -> Manage -> Browse local files,
|
||||||
|
then extract the contents of this archive into that directory.
|
||||||
|
|
||||||
|
|
||||||
|
For OBS 28 and newer the recommended archive is preferred:
|
||||||
|
advanced-scene-switcher-<version>-windows-x64.zip
|
||||||
21
build-aux/CI/windows/README.txt
Normal file
21
build-aux/CI/windows/README.txt
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
Advanced Scene Switcher - Windows Installation
|
||||||
|
===============================================
|
||||||
|
|
||||||
|
For full installation instructions visit:
|
||||||
|
https://github.com/WarmUpTill/SceneSwitcher/wiki/Installation
|
||||||
|
|
||||||
|
|
||||||
|
This archive uses the recommended plugin layout for OBS 28 and newer.
|
||||||
|
|
||||||
|
Extract the CONTENTS of this archive into:
|
||||||
|
|
||||||
|
C:\ProgramData\obs-studio\plugins\
|
||||||
|
|
||||||
|
Tip: press Win+R and type %ProgramData%\obs-studio\plugins to open that folder.
|
||||||
|
|
||||||
|
After extracting, the path should look like:
|
||||||
|
C:\ProgramData\obs-studio\plugins\advanced-scene-switcher\bin\64bit\advanced-scene-switcher.dll
|
||||||
|
|
||||||
|
|
||||||
|
If the plugin does not appear in OBS, try the legacy archive instead:
|
||||||
|
advanced-scene-switcher-<version>-windows-x64-legacy.zip
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
if(BUILD_OUT_OF_TREE)
|
if(BUILD_OUT_OF_TREE)
|
||||||
if(OS_WINDOWS)
|
if(OS_WINDOWS)
|
||||||
set(OBS_PLUGIN_DESTINATION "obs-plugins/64bit")
|
set(OBS_PLUGIN_DESTINATION "${CMAKE_PROJECT_NAME}/bin/64bit")
|
||||||
else()
|
else()
|
||||||
set(OBS_PLUGIN_DESTINATION "${CMAKE_INSTALL_LIBDIR}/obs-plugins")
|
set(OBS_PLUGIN_DESTINATION "${CMAKE_INSTALL_LIBDIR}/obs-plugins")
|
||||||
endif()
|
endif()
|
||||||
@@ -157,7 +157,9 @@ else()
|
|||||||
set_target_properties(${target} PROPERTIES INSTALL_RPATH
|
set_target_properties(${target} PROPERTIES INSTALL_RPATH
|
||||||
"$ORIGIN:$ORIGIN/..")
|
"$ORIGIN:$ORIGIN/..")
|
||||||
endif()
|
endif()
|
||||||
message(STATUS "ADVSS: ENABLED PLUGIN ${target}")
|
get_filename_component(_plugin_dir_name "${CMAKE_CURRENT_SOURCE_DIR}" NAME)
|
||||||
|
set_property(GLOBAL APPEND PROPERTY ADVSS_PLUGINS_ENABLED
|
||||||
|
${_plugin_dir_name})
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
function(install_advss_plugin_dependency_target target dep)
|
function(install_advss_plugin_dependency_target target dep)
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ function(_git_find_closest_git_dir _start_dir _git_dir_var)
|
|||||||
while(NOT EXISTS "${git_dir}")
|
while(NOT EXISTS "${git_dir}")
|
||||||
# .git dir not found, search parent directories
|
# .git dir not found, search parent directories
|
||||||
set(git_previous_parent "${cur_dir}")
|
set(git_previous_parent "${cur_dir}")
|
||||||
get_filename_component(cur_dir ${cur_dir} DIRECTORY)
|
get_filename_component(cur_dir "${cur_dir}" DIRECTORY)
|
||||||
if(cur_dir STREQUAL git_previous_parent)
|
if(cur_dir STREQUAL git_previous_parent)
|
||||||
# We have reached the root directory, we are not in git
|
# We have reached the root directory, we are not in git
|
||||||
set(${_git_dir_var}
|
set(${_git_dir_var}
|
||||||
|
|||||||
@@ -18,7 +18,9 @@ set(CPACK_PACKAGE_FILE_NAME
|
|||||||
"${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${CMAKE_C_LIBRARY_ARCHITECTURE}"
|
"${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${CMAKE_C_LIBRARY_ARCHITECTURE}"
|
||||||
)
|
)
|
||||||
|
|
||||||
set(CPACK_GENERATOR "DEB")
|
set(CPACK_GENERATOR
|
||||||
|
"DEB"
|
||||||
|
CACHE STRING "CPack generator to use")
|
||||||
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
|
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
|
||||||
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "${PLUGIN_EMAIL}")
|
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "${PLUGIN_EMAIL}")
|
||||||
set(CPACK_SET_DESTDIR ON)
|
set(CPACK_SET_DESTDIR ON)
|
||||||
@@ -46,6 +48,19 @@ set(CPACK_SOURCE_PACKAGE_FILE_NAME
|
|||||||
set(CPACK_ARCHIVE_THREADS 0)
|
set(CPACK_ARCHIVE_THREADS 0)
|
||||||
|
|
||||||
include(CPack)
|
include(CPack)
|
||||||
|
# CPack.cmake has a side effect that leaves binary packaging variables in the
|
||||||
|
# state intended for source packaging when it finishes. Specifically it sets
|
||||||
|
# CPACK_GENERATOR to CPACK_SOURCE_GENERATOR ("TXZ"), sets
|
||||||
|
# CPACK_INSTALLED_DIRECTORIES to the source root (which would cause CPackDeb to
|
||||||
|
# scan the entire source tree, including ccache object files that lack a Build
|
||||||
|
# ID), and clears CPACK_INSTALL_CMAKE_PROJECTS (preventing the cmake install
|
||||||
|
# mechanism from being used). In some cmake versions these overrides happen
|
||||||
|
# before CPackConfig.cmake is written. Reset all three so that binary DEB
|
||||||
|
# packaging works correctly regardless of cmake version.
|
||||||
|
set(CPACK_GENERATOR "DEB")
|
||||||
|
set(CPACK_INSTALLED_DIRECTORIES "")
|
||||||
|
set(CPACK_INSTALL_CMAKE_PROJECTS
|
||||||
|
"${CMAKE_BINARY_DIR};${CMAKE_PROJECT_NAME};ALL;/")
|
||||||
|
|
||||||
find_package(libobs QUIET)
|
find_package(libobs QUIET)
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,11 @@ include(buildspec_common)
|
|||||||
|
|
||||||
# _check_dependencies_windows: Set up Windows slice for _check_dependencies
|
# _check_dependencies_windows: Set up Windows slice for _check_dependencies
|
||||||
function(_check_dependencies_windows)
|
function(_check_dependencies_windows)
|
||||||
set(arch ${CMAKE_GENERATOR_PLATFORM})
|
if(CMAKE_GENERATOR_PLATFORM)
|
||||||
|
set(arch ${CMAKE_GENERATOR_PLATFORM})
|
||||||
|
else()
|
||||||
|
set(arch x64)
|
||||||
|
endif()
|
||||||
set(platform windows-${arch})
|
set(platform windows-${arch})
|
||||||
|
|
||||||
set(dependencies_dir "${CMAKE_CURRENT_SOURCE_DIR}/.deps")
|
set(dependencies_dir "${CMAKE_CURRENT_SOURCE_DIR}/.deps")
|
||||||
|
|||||||
@@ -6,3 +6,9 @@ include_guard(GLOBAL)
|
|||||||
set(CMAKE_FIND_PACKAGE_TARGETS_GLOBAL TRUE)
|
set(CMAKE_FIND_PACKAGE_TARGETS_GLOBAL TRUE)
|
||||||
|
|
||||||
include(buildspec)
|
include(buildspec)
|
||||||
|
|
||||||
|
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
|
||||||
|
set(CMAKE_INSTALL_PREFIX
|
||||||
|
"$ENV{ALLUSERSPROFILE}/obs-studio/plugins"
|
||||||
|
CACHE STRING "Default plugin installation directory" FORCE)
|
||||||
|
endif()
|
||||||
|
|||||||
@@ -30,13 +30,13 @@ function(set_target_properties_plugin target)
|
|||||||
|
|
||||||
install(
|
install(
|
||||||
TARGETS ${target}
|
TARGETS ${target}
|
||||||
RUNTIME DESTINATION bin/64bit
|
RUNTIME DESTINATION "${target}/bin/64bit"
|
||||||
LIBRARY DESTINATION obs-plugins/64bit)
|
LIBRARY DESTINATION "${target}/bin/64bit")
|
||||||
|
|
||||||
install(
|
install(
|
||||||
FILES "$<TARGET_PDB_FILE:${target}>"
|
FILES "$<TARGET_PDB_FILE:${target}>"
|
||||||
CONFIGURATIONS RelWithDebInfo Debug Release
|
CONFIGURATIONS RelWithDebInfo Debug Release
|
||||||
DESTINATION obs-plugins/64bit
|
DESTINATION "${target}/bin/64bit"
|
||||||
OPTIONAL)
|
OPTIONAL)
|
||||||
|
|
||||||
if(OBS_BUILD_DIR)
|
if(OBS_BUILD_DIR)
|
||||||
@@ -44,11 +44,11 @@ function(set_target_properties_plugin target)
|
|||||||
TARGET ${target}
|
TARGET ${target}
|
||||||
POST_BUILD
|
POST_BUILD
|
||||||
COMMAND "${CMAKE_COMMAND}" -E make_directory
|
COMMAND "${CMAKE_COMMAND}" -E make_directory
|
||||||
"${OBS_BUILD_DIR}/obs-plugins/64bit"
|
"${OBS_BUILD_DIR}/plugins/${target}/bin/64bit"
|
||||||
COMMAND
|
COMMAND
|
||||||
"${CMAKE_COMMAND}" -E copy_if_different "$<TARGET_FILE:${target}>"
|
"${CMAKE_COMMAND}" -E copy_if_different "$<TARGET_FILE:${target}>"
|
||||||
"$<$<CONFIG:Debug,RelWithDebInfo,Release>:$<TARGET_PDB_FILE:${target}>>"
|
"$<$<CONFIG:Debug,RelWithDebInfo,Release>:$<TARGET_PDB_FILE:${target}>>"
|
||||||
"${OBS_BUILD_DIR}/obs-plugins/64bit"
|
"${OBS_BUILD_DIR}/plugins/${target}/bin/64bit"
|
||||||
COMMENT "Copy ${target} to obs-studio directory ${OBS_BUILD_DIR}"
|
COMMENT "Copy ${target} to obs-studio directory ${OBS_BUILD_DIR}"
|
||||||
VERBATIM)
|
VERBATIM)
|
||||||
endif()
|
endif()
|
||||||
@@ -105,7 +105,7 @@ function(target_install_resources target)
|
|||||||
|
|
||||||
install(
|
install(
|
||||||
DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/data/"
|
DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/data/"
|
||||||
DESTINATION data/obs-plugins/${target}
|
DESTINATION "${target}/data"
|
||||||
USE_SOURCE_PERMISSIONS)
|
USE_SOURCE_PERMISSIONS)
|
||||||
|
|
||||||
if(OBS_BUILD_DIR)
|
if(OBS_BUILD_DIR)
|
||||||
@@ -113,11 +113,11 @@ function(target_install_resources target)
|
|||||||
TARGET ${target}
|
TARGET ${target}
|
||||||
POST_BUILD
|
POST_BUILD
|
||||||
COMMAND "${CMAKE_COMMAND}" -E make_directory
|
COMMAND "${CMAKE_COMMAND}" -E make_directory
|
||||||
"${OBS_BUILD_DIR}/data/obs-plugins/${target}"
|
"${OBS_BUILD_DIR}/plugins/${target}/data"
|
||||||
COMMAND
|
COMMAND
|
||||||
"${CMAKE_COMMAND}" -E copy_directory
|
"${CMAKE_COMMAND}" -E copy_directory
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}/data"
|
"${CMAKE_CURRENT_SOURCE_DIR}/data"
|
||||||
"${OBS_BUILD_DIR}/data/obs-plugins/${target}"
|
"${OBS_BUILD_DIR}/plugins/${target}/data"
|
||||||
COMMENT "Copy ${target} resources to data directory"
|
COMMENT "Copy ${target} resources to data directory"
|
||||||
VERBATIM)
|
VERBATIM)
|
||||||
endif()
|
endif()
|
||||||
@@ -133,7 +133,7 @@ function(target_add_resource target resource)
|
|||||||
|
|
||||||
install(
|
install(
|
||||||
FILES "${resource}"
|
FILES "${resource}"
|
||||||
DESTINATION data/obs-plugins/${target}
|
DESTINATION "${target}/data"
|
||||||
COMPONENT Runtime)
|
COMPONENT Runtime)
|
||||||
|
|
||||||
if(OBS_BUILD_DIR)
|
if(OBS_BUILD_DIR)
|
||||||
@@ -141,9 +141,9 @@ function(target_add_resource target resource)
|
|||||||
TARGET ${target}
|
TARGET ${target}
|
||||||
POST_BUILD
|
POST_BUILD
|
||||||
COMMAND "${CMAKE_COMMAND}" -E make_directory
|
COMMAND "${CMAKE_COMMAND}" -E make_directory
|
||||||
"${OBS_BUILD_DIR}/data/obs-plugins/${target}"
|
"${OBS_BUILD_DIR}/plugins/${target}/data"
|
||||||
COMMAND "${CMAKE_COMMAND}" -E copy "${resource}"
|
COMMAND "${CMAKE_COMMAND}" -E copy "${resource}"
|
||||||
"${OBS_BUILD_DIR}/data/obs-plugins/${target}"
|
"${OBS_BUILD_DIR}/plugins/${target}/data"
|
||||||
COMMENT "Copy ${target} resource ${resource} to library directory"
|
COMMENT "Copy ${target} resource ${resource} to library directory"
|
||||||
VERBATIM)
|
VERBATIM)
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
@@ -2,12 +2,13 @@
|
|||||||
#define MyAppVersion "@CMAKE_PROJECT_VERSION@"
|
#define MyAppVersion "@CMAKE_PROJECT_VERSION@"
|
||||||
#define MyAppPublisher "@PLUGIN_AUTHOR@"
|
#define MyAppPublisher "@PLUGIN_AUTHOR@"
|
||||||
#define MyAppURL "@PLUGIN_WEBSITE@"
|
#define MyAppURL "@PLUGIN_WEBSITE@"
|
||||||
|
#define MyAppId "@UUID_APP@"
|
||||||
|
|
||||||
[Setup]
|
[Setup]
|
||||||
; NOTE: The value of AppId uniquely identifies this application.
|
; NOTE: The value of AppId uniquely identifies this application.
|
||||||
; Do not use the same AppId value in installers for other applications.
|
; Do not use the same AppId value in installers for other applications.
|
||||||
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
|
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
|
||||||
AppId={{@UUID_APP@}
|
AppId={{{#MyAppId}}
|
||||||
AppName={#MyAppName}
|
AppName={#MyAppName}
|
||||||
AppVersion={#MyAppVersion}
|
AppVersion={#MyAppVersion}
|
||||||
AppPublisher={#MyAppPublisher}
|
AppPublisher={#MyAppPublisher}
|
||||||
@@ -20,15 +21,19 @@ OutputBaseFilename={#MyAppName}-{#MyAppVersion}-Windows-Installer
|
|||||||
Compression=lzma
|
Compression=lzma
|
||||||
SolidCompression=yes
|
SolidCompression=yes
|
||||||
DirExistsWarning=no
|
DirExistsWarning=no
|
||||||
|
UsePreviousAppDir=no
|
||||||
SetupIconFile=installer.ico
|
SetupIconFile=installer.ico
|
||||||
UninstallDisplayIcon={app}\data\obs-plugins\advanced-scene-switcher\res\images\logo.ico
|
UninstallDisplayIcon={code:GetUninstallIconPath}
|
||||||
DisableDirPage=no
|
DisableDirPage=no
|
||||||
|
|
||||||
[Languages]
|
[Languages]
|
||||||
Name: "english"; MessagesFile: "compiler:Default.isl"
|
Name: "english"; MessagesFile: "compiler:Default.isl"
|
||||||
|
|
||||||
[Files]
|
[Files]
|
||||||
Source: "..\release\Package\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
|
; Recommended layout - used when installing to %ProgramData%\obs-studio\plugins\
|
||||||
|
Source: "..\release\Package\recommended\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Check: IsRecommendedLayout
|
||||||
|
; Legacy layout - used when installing to the OBS installation directory
|
||||||
|
Source: "..\release\Package\legacy\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Check: IsLegacyLayout
|
||||||
Source: "..\LICENSE"; Flags: dontcopy
|
Source: "..\LICENSE"; Flags: dontcopy
|
||||||
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
|
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
|
||||||
|
|
||||||
@@ -51,17 +56,64 @@ begin
|
|||||||
);
|
);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// credit where it's due :
|
// Returns true when the selected install directory is under %ProgramData%,
|
||||||
// following function come from https://github.com/Xaymar/obs-studio_amf-encoder-plugin/blob/master/%23Resources/Installer.in.iss#L45
|
// meaning the recommended plugin layout should be used.
|
||||||
function GetDirName(Value: string): string;
|
function IsRecommendedLayout(): Boolean;
|
||||||
var
|
|
||||||
InstallPath: string;
|
|
||||||
begin
|
begin
|
||||||
// initialize default path, which will be returned when the following registry
|
Result := Pos(LowerCase(ExpandConstant('{commonappdata}')),
|
||||||
// key queries fail due to missing keys or for some different reason
|
LowerCase(WizardDirValue())) = 1;
|
||||||
Result := '{autopf}\obs-studio';
|
|
||||||
// query the first registry value; if this succeeds, return the obtained value
|
|
||||||
if RegQueryStringValue(HKLM32, 'SOFTWARE\OBS Studio', '', InstallPath) then
|
|
||||||
Result := InstallPath
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function IsLegacyLayout(): Boolean;
|
||||||
|
begin
|
||||||
|
Result := not IsRecommendedLayout();
|
||||||
|
end;
|
||||||
|
|
||||||
|
function GetUninstallIconPath(Param: string): string;
|
||||||
|
begin
|
||||||
|
if IsRecommendedLayout() then
|
||||||
|
Result := ExpandConstant('{app}\advanced-scene-switcher\data\res\images\logo.ico')
|
||||||
|
else
|
||||||
|
Result := ExpandConstant('{app}\data\obs-plugins\advanced-scene-switcher\res\images\logo.ico');
|
||||||
|
end;
|
||||||
|
|
||||||
|
function GetDirName(Value: string): string;
|
||||||
|
var
|
||||||
|
PrevPath: string;
|
||||||
|
UninstallKey: string;
|
||||||
|
begin
|
||||||
|
Result := ExpandConstant('{commonappdata}\obs-studio\plugins');
|
||||||
|
UninstallKey := 'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\' + '{' + '{#MyAppId}' + '}_is1';
|
||||||
|
if RegQueryStringValue(HKLM, UninstallKey, 'InstallLocation', PrevPath) and (PrevPath <> '') then
|
||||||
|
Result := PrevPath;
|
||||||
|
end;
|
||||||
|
|
||||||
|
// Remove files placed by the legacy installer (obs-plugins/64bit and
|
||||||
|
// data/obs-plugins layout) so the plugin is not loaded twice by OBS.
|
||||||
|
// Only runs when upgrading from a legacy location to the recommended one.
|
||||||
|
procedure RemoveLegacyFiles();
|
||||||
|
var
|
||||||
|
OldInstallPath: string;
|
||||||
|
UninstallKey: string;
|
||||||
|
begin
|
||||||
|
if not IsRecommendedLayout() then
|
||||||
|
Exit;
|
||||||
|
UninstallKey := 'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\' + '{' + '{#MyAppId}' + '}_is1';
|
||||||
|
if not RegQueryStringValue(HKLM, UninstallKey, 'InstallLocation', OldInstallPath) then
|
||||||
|
Exit;
|
||||||
|
// Skip if the previous install was already in the recommended location
|
||||||
|
if Pos(LowerCase(ExpandConstant('{commonappdata}')), LowerCase(OldInstallPath)) = 1 then
|
||||||
|
Exit;
|
||||||
|
DeleteFile(OldInstallPath + '\obs-plugins\64bit\advanced-scene-switcher.dll');
|
||||||
|
DeleteFile(OldInstallPath + '\obs-plugins\64bit\advanced-scene-switcher.pdb');
|
||||||
|
DeleteFile(OldInstallPath + '\obs-plugins\64bit\advanced-scene-switcher-lib.dll');
|
||||||
|
DeleteFile(OldInstallPath + '\obs-plugins\64bit\advanced-scene-switcher-lib.pdb');
|
||||||
|
DelTree(OldInstallPath + '\obs-plugins\64bit\advanced-scene-switcher-plugins', True, True, True);
|
||||||
|
DelTree(OldInstallPath + '\data\obs-plugins\advanced-scene-switcher', True, True, True);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure CurStepChanged(CurStep: TSetupStep);
|
||||||
|
begin
|
||||||
|
if CurStep = ssInstall then
|
||||||
|
RemoveLegacyFiles();
|
||||||
|
end;
|
||||||
|
|||||||
@@ -76,7 +76,6 @@ AdvSceneSwitcher.macroTab.name="Name:"
|
|||||||
AdvSceneSwitcher.macroTab.run="Makro ausführen"
|
AdvSceneSwitcher.macroTab.run="Makro ausführen"
|
||||||
AdvSceneSwitcher.macroTab.runFail="Ausführen von \"%1\" fehlgeschlagen!\nEntweder ist eine der Aktionen fehlgeschlagen oder das Makro wird bereits ausgeführt.\nSoll die aktuelle Ausführung gestoppt werden?"
|
AdvSceneSwitcher.macroTab.runFail="Ausführen von \"%1\" fehlgeschlagen!\nEntweder ist eine der Aktionen fehlgeschlagen oder das Makro wird bereits ausgeführt.\nSoll die aktuelle Ausführung gestoppt werden?"
|
||||||
AdvSceneSwitcher.macroTab.runInParallel="Parallel zu anderen Makros ausführen"
|
AdvSceneSwitcher.macroTab.runInParallel="Parallel zu anderen Makros ausführen"
|
||||||
AdvSceneSwitcher.macroTab.onChange="Nur bei Änderung ausführen"
|
|
||||||
AdvSceneSwitcher.macroTab.defaultname="Makro %1"
|
AdvSceneSwitcher.macroTab.defaultname="Makro %1"
|
||||||
AdvSceneSwitcher.macroTab.defaultGroupName="Gruppe %1"
|
AdvSceneSwitcher.macroTab.defaultGroupName="Gruppe %1"
|
||||||
AdvSceneSwitcher.macroTab.removeGroupPopup.text="Sicher, dass \"%1\" und alle zugehörigen Elemente gelöscht werden?"
|
AdvSceneSwitcher.macroTab.removeGroupPopup.text="Sicher, dass \"%1\" und alle zugehörigen Elemente gelöscht werden?"
|
||||||
@@ -100,7 +99,6 @@ AdvSceneSwitcher.macroList.deleted="gelöscht"
|
|||||||
AdvSceneSwitcher.macroList.duplicate="\"%1\" ist bereits ausgewählt!"
|
AdvSceneSwitcher.macroList.duplicate="\"%1\" ist bereits ausgewählt!"
|
||||||
|
|
||||||
; Macro Logic
|
; Macro Logic
|
||||||
AdvSceneSwitcher.logic.none="Eintrag ignorieren"
|
|
||||||
AdvSceneSwitcher.logic.and="Und"
|
AdvSceneSwitcher.logic.and="Und"
|
||||||
AdvSceneSwitcher.logic.or="Oder"
|
AdvSceneSwitcher.logic.or="Oder"
|
||||||
AdvSceneSwitcher.logic.andNot="Und nicht"
|
AdvSceneSwitcher.logic.andNot="Und nicht"
|
||||||
@@ -146,11 +144,7 @@ AdvSceneSwitcher.condition.file="Datei"
|
|||||||
AdvSceneSwitcher.condition.file.type.match="entspricht"
|
AdvSceneSwitcher.condition.file.type.match="entspricht"
|
||||||
AdvSceneSwitcher.condition.file.type.contentChange="Inhalt geändert"
|
AdvSceneSwitcher.condition.file.type.contentChange="Inhalt geändert"
|
||||||
AdvSceneSwitcher.condition.file.type.dateChange="Änderungsdatum geändert"
|
AdvSceneSwitcher.condition.file.type.dateChange="Änderungsdatum geändert"
|
||||||
AdvSceneSwitcher.condition.file.remote="Entfernte Datei"
|
AdvSceneSwitcher.condition.file.layout="{{filePath}}{{conditions}}{{regex}}"
|
||||||
AdvSceneSwitcher.condition.file.local="Lokale Datei"
|
|
||||||
AdvSceneSwitcher.condition.file.entry.line1="{{fileType}}{{filePath}}{{conditions}}{{useRegex}}"
|
|
||||||
AdvSceneSwitcher.condition.file.entry.line2="{{matchText}}"
|
|
||||||
AdvSceneSwitcher.condition.file.entry.line3="{{checkModificationDate}}{{checkFileContent}}"
|
|
||||||
AdvSceneSwitcher.condition.media="Medien"
|
AdvSceneSwitcher.condition.media="Medien"
|
||||||
AdvSceneSwitcher.condition.media.source="Quelle"
|
AdvSceneSwitcher.condition.media.source="Quelle"
|
||||||
AdvSceneSwitcher.condition.media.anyOnScene="Beliebige Medienquelle in"
|
AdvSceneSwitcher.condition.media.anyOnScene="Beliebige Medienquelle in"
|
||||||
@@ -216,8 +210,8 @@ AdvSceneSwitcher.condition.record.state.start="Aufnahme läuft"
|
|||||||
AdvSceneSwitcher.condition.record.state.pause="Aufnahme pausiert"
|
AdvSceneSwitcher.condition.record.state.pause="Aufnahme pausiert"
|
||||||
AdvSceneSwitcher.condition.record.state.stop="Aufnahme gestoppt"
|
AdvSceneSwitcher.condition.record.state.stop="Aufnahme gestoppt"
|
||||||
AdvSceneSwitcher.condition.process="Prozess"
|
AdvSceneSwitcher.condition.process="Prozess"
|
||||||
AdvSceneSwitcher.condition.process.entry="{{processes}}{{regex}}läuft{{focused}}und ist fokusiert"
|
AdvSceneSwitcher.condition.process.layout="{{processes}}{{regex}}läuft{{focused}}und ist fokusiert"
|
||||||
AdvSceneSwitcher.condition.process.entry.focus="Aktueller Vordergrundprozess: {{focusProcess}}"
|
AdvSceneSwitcher.condition.process.layout.focus="Aktueller Vordergrundprozess: {{focusProcess}}"
|
||||||
AdvSceneSwitcher.condition.idle="Leerlauf"
|
AdvSceneSwitcher.condition.idle="Leerlauf"
|
||||||
AdvSceneSwitcher.condition.idle.entry="Keine Tastatur- oder Mauseingaben für {{duration}}"
|
AdvSceneSwitcher.condition.idle.entry="Keine Tastatur- oder Mauseingaben für {{duration}}"
|
||||||
AdvSceneSwitcher.condition.pluginState="Plugin-Status"
|
AdvSceneSwitcher.condition.pluginState="Plugin-Status"
|
||||||
@@ -413,7 +407,6 @@ AdvSceneSwitcher.action.recording.type.unpause="Aufnahme nicht mehr pausieren"
|
|||||||
AdvSceneSwitcher.action.recording.type.split="Aufnahme-Datei teilen"
|
AdvSceneSwitcher.action.recording.type.split="Aufnahme-Datei teilen"
|
||||||
AdvSceneSwitcher.action.recording.pause.hint="Bitte beachten, dass je nach Aufnahmeeinstellung die Aufnahme möglicherweise nicht unterbrochen werden kann"
|
AdvSceneSwitcher.action.recording.pause.hint="Bitte beachten, dass je nach Aufnahmeeinstellung die Aufnahme möglicherweise nicht unterbrochen werden kann"
|
||||||
AdvSceneSwitcher.action.recording.split.hint="Vergewissern, dass die automatische Dateiaufteilung in den OBS-Einstellungen aktiviert ist!"
|
AdvSceneSwitcher.action.recording.split.hint="Vergewissern, dass die automatische Dateiaufteilung in den OBS-Einstellungen aktiviert ist!"
|
||||||
AdvSceneSwitcher.action.recording.entry="{{actions}}{{recordFolder}}{{recordFileFormat}}{{pauseHint}}{{splitHint}}"
|
|
||||||
AdvSceneSwitcher.action.replay="Replay Buffer"
|
AdvSceneSwitcher.action.replay="Replay Buffer"
|
||||||
AdvSceneSwitcher.action.replay.saveWarn="Warnung: Ein zu häufiges Speichern kann dazu führen, dass der Replay Buffer nicht gespeichert wird!"
|
AdvSceneSwitcher.action.replay.saveWarn="Warnung: Ein zu häufiges Speichern kann dazu führen, dass der Replay Buffer nicht gespeichert wird!"
|
||||||
AdvSceneSwitcher.action.replay.type.stop="Replay Buffer stoppen"
|
AdvSceneSwitcher.action.replay.type.stop="Replay Buffer stoppen"
|
||||||
@@ -422,7 +415,6 @@ AdvSceneSwitcher.action.replay.type.save="Replay Buffer speichern"
|
|||||||
AdvSceneSwitcher.action.streaming="Stream"
|
AdvSceneSwitcher.action.streaming="Stream"
|
||||||
AdvSceneSwitcher.action.streaming.type.stop="Stream stoppen"
|
AdvSceneSwitcher.action.streaming.type.stop="Stream stoppen"
|
||||||
AdvSceneSwitcher.action.streaming.type.start="Stream starten"
|
AdvSceneSwitcher.action.streaming.type.start="Stream starten"
|
||||||
AdvSceneSwitcher.action.streaming.entry="{{actions}}{{keyFrameInterval}}{{stringValue}}{{showPassword}}"
|
|
||||||
AdvSceneSwitcher.action.run="Ausführen"
|
AdvSceneSwitcher.action.run="Ausführen"
|
||||||
AdvSceneSwitcher.action.sceneVisibility="Sichtbarkeit von Szenenelementen"
|
AdvSceneSwitcher.action.sceneVisibility="Sichtbarkeit von Szenenelementen"
|
||||||
AdvSceneSwitcher.action.sceneVisibility.type.show="Anzeigen"
|
AdvSceneSwitcher.action.sceneVisibility.type.show="Anzeigen"
|
||||||
@@ -458,7 +450,7 @@ AdvSceneSwitcher.action.macro="Makro"
|
|||||||
AdvSceneSwitcher.action.macro.type.pause="Pausieren"
|
AdvSceneSwitcher.action.macro.type.pause="Pausieren"
|
||||||
AdvSceneSwitcher.action.macro.type.unpause="Nicht mehr pausieren"
|
AdvSceneSwitcher.action.macro.type.unpause="Nicht mehr pausieren"
|
||||||
AdvSceneSwitcher.action.macro.type.resetCounter="Zähler zurücksetzen"
|
AdvSceneSwitcher.action.macro.type.resetCounter="Zähler zurücksetzen"
|
||||||
AdvSceneSwitcher.action.macro.type.run="Aktionen ausführen"
|
AdvSceneSwitcher.action.macro.type.runActions="Aktionen ausführen"
|
||||||
AdvSceneSwitcher.action.macro.type.stop="Aktionen stoppen"
|
AdvSceneSwitcher.action.macro.type.stop="Aktionen stoppen"
|
||||||
AdvSceneSwitcher.action.pluginState="Plugin-Status"
|
AdvSceneSwitcher.action.pluginState="Plugin-Status"
|
||||||
AdvSceneSwitcher.action.pluginState.type.stop="Erweiterten Automatischen Szenenwechsler stoppen"
|
AdvSceneSwitcher.action.pluginState.type.stop="Erweiterten Automatischen Szenenwechsler stoppen"
|
||||||
@@ -506,9 +498,9 @@ AdvSceneSwitcher.action.transition.type.scene="Szenenübergang"
|
|||||||
AdvSceneSwitcher.action.transition.type.sceneOverride="Szenenübergang überschreiben"
|
AdvSceneSwitcher.action.transition.type.sceneOverride="Szenenübergang überschreiben"
|
||||||
AdvSceneSwitcher.action.transition.type.sourceShow="Übergang der Quelle anzeigen"
|
AdvSceneSwitcher.action.transition.type.sourceShow="Übergang der Quelle anzeigen"
|
||||||
AdvSceneSwitcher.action.transition.type.sourceHide="Übergang der Quelle verstecken"
|
AdvSceneSwitcher.action.transition.type.sourceHide="Übergang der Quelle verstecken"
|
||||||
AdvSceneSwitcher.action.transition.entry.line1="Anpassen {{type}}{{scenes}}{{sources}}"
|
AdvSceneSwitcher.action.transition.layout.type="Anpassen {{type}}{{scenes}}{{sources}}"
|
||||||
AdvSceneSwitcher.action.transition.entry.line2="{{setTransition}}Übergangstyp festlegen auf {{transitions}}"
|
AdvSceneSwitcher.action.transition.layout.transition="{{setTransition}}Übergangstyp festlegen auf {{transitions}}"
|
||||||
AdvSceneSwitcher.action.transition.entry.line3="{{setDuration}}Übergangsdauer festlegen auf {{duration}}Sekunden"
|
AdvSceneSwitcher.action.transition.layout.duration="{{setDuration}}Übergangsdauer festlegen auf {{duration}}Sekunden"
|
||||||
AdvSceneSwitcher.action.timer="Timer"
|
AdvSceneSwitcher.action.timer="Timer"
|
||||||
AdvSceneSwitcher.action.timer.type.pause="Pausieren"
|
AdvSceneSwitcher.action.timer.type.pause="Pausieren"
|
||||||
AdvSceneSwitcher.action.timer.type.continue="Fortsetzen"
|
AdvSceneSwitcher.action.timer.type.continue="Fortsetzen"
|
||||||
@@ -835,8 +827,6 @@ AdvSceneSwitcher.status.inactive="Inaktiv"
|
|||||||
AdvSceneSwitcher.running="Plugin läuft"
|
AdvSceneSwitcher.running="Plugin läuft"
|
||||||
AdvSceneSwitcher.stopped="Plugin gestoppt"
|
AdvSceneSwitcher.stopped="Plugin gestoppt"
|
||||||
|
|
||||||
AdvSceneSwitcher.firstBootMessage="<html><head/><body><p>Dies scheint das erste Mal zu sein, dass der Erweiterte Szenenwechsler gestartet wurde.<br>Bitte schaue ins <a href=\"https://github.com/WarmUpTill/SceneSwitcher/wiki\"><span style=\" text-decoration: underline; color:#268bd2;\">Wiki</span></a> für eine Liste von Anleitungen und Beispielen.<br>Nicht zögern und Fragen im <a href=\"https://obsproject.com/forum/threads/advanced-scene-switcher.48264\"><span style=\" text-decoration: underline; color:#268bd2;\">Thread</span></a> des Plugins im OBS-Forum stellen!!</p></body></html>"
|
|
||||||
|
|
||||||
AdvSceneSwitcher.deprecatedTabWarning="Die Entwicklung für dieses Tab wurde gestoppt!\nBitte stattdessen zur Verwendung des Makros-Tab übergehen.\nDieser Hinweis kann im Allgemein-Tab deaktiviert werden."
|
AdvSceneSwitcher.deprecatedTabWarning="Die Entwicklung für dieses Tab wurde gestoppt!\nBitte stattdessen zur Verwendung des Makros-Tab übergehen.\nDieser Hinweis kann im Allgemein-Tab deaktiviert werden."
|
||||||
|
|
||||||
AdvSceneSwitcher.unit.milliseconds="Millisekunden"
|
AdvSceneSwitcher.unit.milliseconds="Millisekunden"
|
||||||
|
|||||||
@@ -40,12 +40,20 @@ AdvSceneSwitcher.generalTab.generalBehavior.showTrayNotifications="Show system t
|
|||||||
AdvSceneSwitcher.generalTab.generalBehavior.disableUIHints="Disable UI hints"
|
AdvSceneSwitcher.generalTab.generalBehavior.disableUIHints="Disable UI hints"
|
||||||
AdvSceneSwitcher.generalTab.generalBehavior.comboBoxFilterDisable="Disable filtering by typing in drop down menus"
|
AdvSceneSwitcher.generalTab.generalBehavior.comboBoxFilterDisable="Disable filtering by typing in drop down menus"
|
||||||
AdvSceneSwitcher.generalTab.generalBehavior.warnPluginLoadFailure="Display warning if plugins cannot be loaded"
|
AdvSceneSwitcher.generalTab.generalBehavior.warnPluginLoadFailure="Display warning if plugins cannot be loaded"
|
||||||
|
AdvSceneSwitcher.generalTab.generalBehavior.suppressCrashRecoveryDialog="Do not ask to keep the plugin stopped after an unclean shutdown"
|
||||||
AdvSceneSwitcher.generalTab.generalBehavior.warnPluginLoadFailureMessage="<html><body>Loading of the following plugin libraries was unsuccessful, which could result in some Advanced Scene Switcher functions not being available:%1Check the OBS logs for details.<br>This message can be disabled on the General tab.</body></html>"
|
AdvSceneSwitcher.generalTab.generalBehavior.warnPluginLoadFailureMessage="<html><body>Loading of the following plugin libraries was unsuccessful, which could result in some Advanced Scene Switcher functions not being available:%1Check the OBS logs for details.<br>This message can be disabled on the General tab.</body></html>"
|
||||||
AdvSceneSwitcher.generalTab.generalBehavior.warnCorruptedInstallMessage="The plugin installation seems to be corrupted and might crash!\nPlease make sure the plugin was installed correctly!"
|
AdvSceneSwitcher.generalTab.generalBehavior.warnCorruptedInstallMessage="The plugin installation seems to be corrupted and might crash!\nPlease make sure the plugin was installed correctly!"
|
||||||
AdvSceneSwitcher.generalTab.generalBehavior.hideLegacyTabs="Hide tabs which can be represented via macros"
|
AdvSceneSwitcher.generalTab.generalBehavior.hideLegacyTabs="Hide tabs which can be represented via macros"
|
||||||
AdvSceneSwitcher.generalTab.generalBehavior.alwaysShowMacroSearch="Always show macro search"
|
AdvSceneSwitcher.generalTab.generalBehavior.alwaysShowMacroSearch="Always show macro search"
|
||||||
AdvSceneSwitcher.generalTab.generalBehavior.alwaysShowFeatureTabs="Always show all feature tabs"
|
AdvSceneSwitcher.generalTab.generalBehavior.alwaysShowFeatureTabs="Always show all feature tabs"
|
||||||
AdvSceneSwitcher.generalTab.generalBehavior.alwaysShowFeatureTabs.tooltip="Show tabs that are normally hidden until first used in a macro (e.g. Action Queues, Variables, Twitch, Websockets)."
|
AdvSceneSwitcher.generalTab.generalBehavior.alwaysShowFeatureTabs.tooltip="Show tabs that are normally hidden until first used in a macro (e.g. Action Queues, Variables, Twitch, Websockets)."
|
||||||
|
AdvSceneSwitcher.generalTab.generalBehavior.settingsLock="Lock settings dialog with password"
|
||||||
|
AdvSceneSwitcher.generalTab.generalBehavior.settingsLock.title="Settings Locked"
|
||||||
|
AdvSceneSwitcher.generalTab.generalBehavior.settingsLock.passwordLabel="Enter password:"
|
||||||
|
AdvSceneSwitcher.generalTab.generalBehavior.settingsLock.wrongPassword="Wrong password!"
|
||||||
|
AdvSceneSwitcher.generalTab.generalBehavior.settingsLock.newPasswordLabel="New password:"
|
||||||
|
AdvSceneSwitcher.generalTab.generalBehavior.settingsLock.confirmPasswordLabel="Confirm password:"
|
||||||
|
AdvSceneSwitcher.generalTab.generalBehavior.settingsLock.passwordMismatch="Passwords do not match!"
|
||||||
AdvSceneSwitcher.generalTab.matchBehavior="Match behavior"
|
AdvSceneSwitcher.generalTab.matchBehavior="Match behavior"
|
||||||
AdvSceneSwitcher.generalTab.priority="Priority"
|
AdvSceneSwitcher.generalTab.priority="Priority"
|
||||||
AdvSceneSwitcher.generalTab.priority.description="Switching methods priority (Highest priority is at the top)"
|
AdvSceneSwitcher.generalTab.priority.description="Switching methods priority (Highest priority is at the top)"
|
||||||
@@ -177,7 +185,12 @@ AdvSceneSwitcher.macroTab.run.tooltip="Run all macro actions regardless of condi
|
|||||||
AdvSceneSwitcher.macroTab.runElse="Run macro (else)"
|
AdvSceneSwitcher.macroTab.runElse="Run macro (else)"
|
||||||
AdvSceneSwitcher.macroTab.runFail="Running \"%1\" failed!\nEither one of the actions failed or the macro is running already.\nDo you want to stop it?"
|
AdvSceneSwitcher.macroTab.runFail="Running \"%1\" failed!\nEither one of the actions failed or the macro is running already.\nDo you want to stop it?"
|
||||||
AdvSceneSwitcher.macroTab.runInParallel="Run macro in parallel to other macros"
|
AdvSceneSwitcher.macroTab.runInParallel="Run macro in parallel to other macros"
|
||||||
AdvSceneSwitcher.macroTab.onChange="Perform actions only on condition change"
|
AdvSceneSwitcher.macroTab.actionTriggerMode.label="Perform actions:"
|
||||||
|
AdvSceneSwitcher.macroTab.actionTriggerMode.tooltip="Controls when the actions of this macro are performed.\n\n\"Always\" - actions are performed every time the conditions are met.\n\"Macro result changed\" - actions are only performed when the macro transitions between matching and not matching.\n\"Any condition changed\" - actions are only performed when any individual condition changes its result.\n\"Any condition triggered\" - actions are only performed when any individual condition changes from false to true."
|
||||||
|
AdvSceneSwitcher.macroTab.actionTriggerMode.always="always"
|
||||||
|
AdvSceneSwitcher.macroTab.actionTriggerMode.onOverallChange="only when result changes"
|
||||||
|
AdvSceneSwitcher.macroTab.actionTriggerMode.onAnyConditionChange="only when any condition changes"
|
||||||
|
AdvSceneSwitcher.macroTab.actionTriggerMode.onAnyConditionTriggered="only when any condition becomes true"
|
||||||
AdvSceneSwitcher.macroTab.defaultname="Macro %1"
|
AdvSceneSwitcher.macroTab.defaultname="Macro %1"
|
||||||
AdvSceneSwitcher.macroTab.defaultGroupName="Group %1"
|
AdvSceneSwitcher.macroTab.defaultGroupName="Group %1"
|
||||||
AdvSceneSwitcher.macroTab.macroNameExists="The name \"%1\" is already used by a macro."
|
AdvSceneSwitcher.macroTab.macroNameExists="The name \"%1\" is already used by a macro."
|
||||||
@@ -196,6 +209,13 @@ AdvSceneSwitcher.macroTab.remove="Remove"
|
|||||||
AdvSceneSwitcher.macroTab.export="Export"
|
AdvSceneSwitcher.macroTab.export="Export"
|
||||||
AdvSceneSwitcher.macroTab.export.info="Paste the string below into the import dialog to import the selected macros:"
|
AdvSceneSwitcher.macroTab.export.info="Paste the string below into the import dialog to import the selected macros:"
|
||||||
AdvSceneSwitcher.macroTab.export.usePlainText="Use plain text"
|
AdvSceneSwitcher.macroTab.export.usePlainText="Use plain text"
|
||||||
|
AdvSceneSwitcher.macroTab.export.additionalContent="Export Additional Content"
|
||||||
|
AdvSceneSwitcher.macroTab.export.variables="Variables"
|
||||||
|
AdvSceneSwitcher.macroTab.export.actionQueues="Action Queues"
|
||||||
|
AdvSceneSwitcher.macroTab.export.httpServers="HTTP Servers"
|
||||||
|
AdvSceneSwitcher.macroTab.export.macroScheduleEntries="Macro Schedule"
|
||||||
|
AdvSceneSwitcher.macroTab.export.twitchConnections="Twitch Connections"
|
||||||
|
AdvSceneSwitcher.macroTab.export.websocketConnections="Websocket Connections"
|
||||||
AdvSceneSwitcher.macroTab.import="Import"
|
AdvSceneSwitcher.macroTab.import="Import"
|
||||||
AdvSceneSwitcher.macroTab.import.info="Paste the export string into the below text box to import macros:"
|
AdvSceneSwitcher.macroTab.import.info="Paste the export string into the below text box to import macros:"
|
||||||
AdvSceneSwitcher.macroTab.import.invalid="Invalid import data provided!"
|
AdvSceneSwitcher.macroTab.import.invalid="Invalid import data provided!"
|
||||||
@@ -300,7 +320,6 @@ AdvSceneSwitcher.macroList.deleted="deleted"
|
|||||||
AdvSceneSwitcher.macroList.duplicate="\"%1\" is alreay selected!"
|
AdvSceneSwitcher.macroList.duplicate="\"%1\" is alreay selected!"
|
||||||
|
|
||||||
# Macro Logic
|
# Macro Logic
|
||||||
AdvSceneSwitcher.logic.none="Ignore entry"
|
|
||||||
AdvSceneSwitcher.logic.and="And"
|
AdvSceneSwitcher.logic.and="And"
|
||||||
AdvSceneSwitcher.logic.or="Or"
|
AdvSceneSwitcher.logic.or="Or"
|
||||||
AdvSceneSwitcher.logic.andNot="And not"
|
AdvSceneSwitcher.logic.andNot="And not"
|
||||||
@@ -363,11 +382,7 @@ AdvSceneSwitcher.condition.file.type.dateChange="modification date changed"
|
|||||||
AdvSceneSwitcher.condition.file.type.exists="exists"
|
AdvSceneSwitcher.condition.file.type.exists="exists"
|
||||||
AdvSceneSwitcher.condition.file.type.isFile="is a file"
|
AdvSceneSwitcher.condition.file.type.isFile="is a file"
|
||||||
AdvSceneSwitcher.condition.file.type.isFolder="is a folder"
|
AdvSceneSwitcher.condition.file.type.isFolder="is a folder"
|
||||||
AdvSceneSwitcher.condition.file.remote="Remote file"
|
AdvSceneSwitcher.condition.file.layout="{{filePath}}{{conditions}}{{regex}}"
|
||||||
AdvSceneSwitcher.condition.file.local="Local file"
|
|
||||||
AdvSceneSwitcher.condition.file.entry.line1="{{fileType}}{{filePath}}{{conditions}}{{useRegex}}"
|
|
||||||
AdvSceneSwitcher.condition.file.entry.line2="{{matchText}}"
|
|
||||||
AdvSceneSwitcher.condition.file.entry.line3="{{checkModificationDate}}{{checkFileContent}}"
|
|
||||||
AdvSceneSwitcher.condition.media="Media"
|
AdvSceneSwitcher.condition.media="Media"
|
||||||
AdvSceneSwitcher.condition.media.checkType.state="State matches"
|
AdvSceneSwitcher.condition.media.checkType.state="State matches"
|
||||||
AdvSceneSwitcher.condition.media.checkType.time="Time restriction matches"
|
AdvSceneSwitcher.condition.media.checkType.time="Time restriction matches"
|
||||||
@@ -482,8 +497,9 @@ AdvSceneSwitcher.condition.record.state.stop="Recording stopped"
|
|||||||
AdvSceneSwitcher.condition.record.state.duration="Recording duration is longer than"
|
AdvSceneSwitcher.condition.record.state.duration="Recording duration is longer than"
|
||||||
AdvSceneSwitcher.condition.record.entry="{{condition}}{{duration}}"
|
AdvSceneSwitcher.condition.record.entry="{{condition}}{{duration}}"
|
||||||
AdvSceneSwitcher.condition.process="Process"
|
AdvSceneSwitcher.condition.process="Process"
|
||||||
AdvSceneSwitcher.condition.process.entry="{{processes}}{{regex}}is running{{focused}}and is focused"
|
AdvSceneSwitcher.condition.process.layout="{{processes}}{{regex}}is running{{focused}}and is focused"
|
||||||
AdvSceneSwitcher.condition.process.entry.focus="Current foreground process:{{focusProcess}}"
|
AdvSceneSwitcher.condition.process.layout.focus="Current foreground process:{{focusProcess}}"
|
||||||
|
AdvSceneSwitcher.condition.process.layout.path="{{checkPath}}Match binary path:{{path}}{{pathRegex}}"
|
||||||
AdvSceneSwitcher.condition.idle="Idle"
|
AdvSceneSwitcher.condition.idle="Idle"
|
||||||
AdvSceneSwitcher.condition.idle.entry="No keyboard or mouse inputs for{{duration}}"
|
AdvSceneSwitcher.condition.idle.entry="No keyboard or mouse inputs for{{duration}}"
|
||||||
AdvSceneSwitcher.condition.pluginState="Plugin state"
|
AdvSceneSwitcher.condition.pluginState="Plugin state"
|
||||||
@@ -671,6 +687,34 @@ AdvSceneSwitcher.condition.websocket.type.event="Scene Switcher Event"
|
|||||||
AdvSceneSwitcher.condition.websocket.useRegex="Use regular expressions"
|
AdvSceneSwitcher.condition.websocket.useRegex="Use regular expressions"
|
||||||
AdvSceneSwitcher.condition.websocket.entry.request="{{type}}was received:"
|
AdvSceneSwitcher.condition.websocket.entry.request="{{type}}was received:"
|
||||||
AdvSceneSwitcher.condition.websocket.entry.event="{{type}}was received from{{connection}}:"
|
AdvSceneSwitcher.condition.websocket.entry.event="{{type}}was received from{{connection}}:"
|
||||||
|
AdvSceneSwitcher.condition.http="HTTP"
|
||||||
|
AdvSceneSwitcher.condition.http.layout="Receive{{method}}request on{{server}}"
|
||||||
|
AdvSceneSwitcher.condition.http.layout.path="Path:{{path}}{{regex}}"
|
||||||
|
AdvSceneSwitcher.condition.http.layout.body="Body:{{body}}{{regex}}"
|
||||||
|
AdvSceneSwitcher.condition.http.method.any="any"
|
||||||
|
AdvSceneSwitcher.condition.http.method.get="GET"
|
||||||
|
AdvSceneSwitcher.condition.http.method.post="POST"
|
||||||
|
AdvSceneSwitcher.condition.http.method.put="PUT"
|
||||||
|
AdvSceneSwitcher.condition.http.method.patch="PATCH"
|
||||||
|
AdvSceneSwitcher.condition.http.method.delete="DELETE"
|
||||||
|
AdvSceneSwitcher.httpServer.select="Select HTTP server"
|
||||||
|
AdvSceneSwitcher.httpServer.add="Add HTTP server"
|
||||||
|
AdvSceneSwitcher.httpServer.configure="Configure HTTP server"
|
||||||
|
AdvSceneSwitcher.httpServer.invalid="Invalid HTTP server"
|
||||||
|
AdvSceneSwitcher.httpServer.name="Name:"
|
||||||
|
AdvSceneSwitcher.httpServer.port="Port:"
|
||||||
|
AdvSceneSwitcher.httpServer.startOnLoad="Start on load"
|
||||||
|
AdvSceneSwitcher.httpServer.status.listening="Listening"
|
||||||
|
AdvSceneSwitcher.httpServer.status.stopped="Stopped"
|
||||||
|
AdvSceneSwitcher.httpServerTab.title="HTTP Servers"
|
||||||
|
AdvSceneSwitcher.httpServerTab.help="No HTTP servers configured.\nAdd one to receive incoming HTTP requests in conditions."
|
||||||
|
AdvSceneSwitcher.httpServerTab.addButton.tooltip="Add HTTP server"
|
||||||
|
AdvSceneSwitcher.httpServerTab.removeButton.tooltip="Remove HTTP server"
|
||||||
|
AdvSceneSwitcher.httpServerTab.name.header="Name"
|
||||||
|
AdvSceneSwitcher.httpServerTab.port.header="Port"
|
||||||
|
AdvSceneSwitcher.httpServerTab.status.header="Status"
|
||||||
|
AdvSceneSwitcher.httpServerTab.removeSingle.text="Are you sure you want to remove \"%1\"?"
|
||||||
|
AdvSceneSwitcher.httpServerTab.removeMultiple.text="Are you sure you want to remove %1 HTTP servers?"
|
||||||
AdvSceneSwitcher.condition.temporaryVariable="Macro property"
|
AdvSceneSwitcher.condition.temporaryVariable="Macro property"
|
||||||
AdvSceneSwitcher.condition.variable="Variable"
|
AdvSceneSwitcher.condition.variable="Variable"
|
||||||
AdvSceneSwitcher.condition.variable.type.compare="equals"
|
AdvSceneSwitcher.condition.variable.type.compare="equals"
|
||||||
@@ -825,6 +869,7 @@ AdvSceneSwitcher.condition.streamDeck.stopListen="Stop listening"
|
|||||||
AdvSceneSwitcher.condition.streamDeck.pluginDownload="<html><head/><body><p>The Stream Deck plugin can be found <a href=\"https://github.com/WarmUpTill/advanced-scene-switcher-streamdeck-plugin/releases\"><span style=\" text-decoration: underline; color:#268bd2;\">here on GitHub</span></a>.</p></body></html>"
|
AdvSceneSwitcher.condition.streamDeck.pluginDownload="<html><head/><body><p>The Stream Deck plugin can be found <a href=\"https://github.com/WarmUpTill/advanced-scene-switcher-streamdeck-plugin/releases\"><span style=\" text-decoration: underline; color:#268bd2;\">here on GitHub</span></a>.</p></body></html>"
|
||||||
AdvSceneSwitcher.condition.gameCapture="Game capture"
|
AdvSceneSwitcher.condition.gameCapture="Game capture"
|
||||||
AdvSceneSwitcher.condition.gameCapture.entry="{{sources}}hooked a game."
|
AdvSceneSwitcher.condition.gameCapture.entry="{{sources}}hooked a game."
|
||||||
|
|
||||||
AdvSceneSwitcher.condition.screenshot="Screenshot"
|
AdvSceneSwitcher.condition.screenshot="Screenshot"
|
||||||
AdvSceneSwitcher.condition.screenshot.entry="A screenshot was taken"
|
AdvSceneSwitcher.condition.screenshot.entry="A screenshot was taken"
|
||||||
AdvSceneSwitcher.condition.mqtt="MQTT"
|
AdvSceneSwitcher.condition.mqtt="MQTT"
|
||||||
@@ -874,6 +919,15 @@ AdvSceneSwitcher.action.audio.fade.rate="{{fade}}Fade{{fadeTypes}}{{rate}}per se
|
|||||||
AdvSceneSwitcher.action.audio.fade.wait="Wait for fade to complete."
|
AdvSceneSwitcher.action.audio.fade.wait="Wait for fade to complete."
|
||||||
AdvSceneSwitcher.action.audio.fade.abort="Abort already active fade."
|
AdvSceneSwitcher.action.audio.fade.abort="Abort already active fade."
|
||||||
AdvSceneSwitcher.action.audio.entry="{{actions}}{{audioSources}}{{volume}}{{volumeDB}}{{percentDBToggle}}{{syncOffset}}{{monitorTypes}}{{track}}"
|
AdvSceneSwitcher.action.audio.entry="{{actions}}{{audioSources}}{{volume}}{{volumeDB}}{{percentDBToggle}}{{syncOffset}}{{monitorTypes}}{{track}}"
|
||||||
|
AdvSceneSwitcher.action.playAudio="Play Audio File"
|
||||||
|
AdvSceneSwitcher.action.playAudio.file.browse="Browse for audio file"
|
||||||
|
AdvSceneSwitcher.action.playAudio.layout.volume="Volume{{volumeDB}}"
|
||||||
|
AdvSceneSwitcher.action.playAudio.layout.monitor="Monitoring{{monitorTypes}}"
|
||||||
|
AdvSceneSwitcher.action.playAudio.wait="Wait for playback to complete"
|
||||||
|
AdvSceneSwitcher.action.playAudio.monitorUnavailable="Audio monitoring not available"
|
||||||
|
AdvSceneSwitcher.action.playAudio.tracks="Tracks"
|
||||||
|
AdvSceneSwitcher.action.playAudio.layout.startOffset="{{useStartOffset}}Start at{{startOffset}}"
|
||||||
|
AdvSceneSwitcher.action.playAudio.layout.playbackDuration="{{useDuration}}Play for{{playbackDuration}}(0 = until end)"
|
||||||
AdvSceneSwitcher.action.recording="Recording"
|
AdvSceneSwitcher.action.recording="Recording"
|
||||||
AdvSceneSwitcher.action.recording.type.stop="Stop recording"
|
AdvSceneSwitcher.action.recording.type.stop="Stop recording"
|
||||||
AdvSceneSwitcher.action.recording.type.start="Start recording"
|
AdvSceneSwitcher.action.recording.type.start="Start recording"
|
||||||
@@ -882,9 +936,10 @@ AdvSceneSwitcher.action.recording.type.unpause="Unpause recording"
|
|||||||
AdvSceneSwitcher.action.recording.type.split="Split recording file"
|
AdvSceneSwitcher.action.recording.type.split="Split recording file"
|
||||||
AdvSceneSwitcher.action.recording.type.changeOutputFolder="Change output folder"
|
AdvSceneSwitcher.action.recording.type.changeOutputFolder="Change output folder"
|
||||||
AdvSceneSwitcher.action.recording.type.changeOutputFileFormat="Change filename formatting"
|
AdvSceneSwitcher.action.recording.type.changeOutputFileFormat="Change filename formatting"
|
||||||
|
AdvSceneSwitcher.action.recording.type.addChapter="Add chapter"
|
||||||
AdvSceneSwitcher.action.recording.pause.hint="Note that depending on your recording settings you might not be able to pause recording"
|
AdvSceneSwitcher.action.recording.pause.hint="Note that depending on your recording settings you might not be able to pause recording"
|
||||||
AdvSceneSwitcher.action.recording.split.hint="Make sure to enable automatic file splitting in the OBS settings first!"
|
AdvSceneSwitcher.action.recording.split.hint="Make sure to enable automatic file splitting in the OBS settings first!"
|
||||||
AdvSceneSwitcher.action.recording.entry="{{actions}}{{recordFolder}}{{recordFileFormat}}{{pauseHint}}{{splitHint}}"
|
AdvSceneSwitcher.action.recording.entry="{{actions}}{{recordFolder}}{{recordFileFormat}}{{chapterName}}{{pauseHint}}{{splitHint}}"
|
||||||
AdvSceneSwitcher.action.replay="Replay buffer"
|
AdvSceneSwitcher.action.replay="Replay buffer"
|
||||||
AdvSceneSwitcher.action.replay.saveWarn="Warning: Saving too frequently might result in the replay buffer not actually being saved!"
|
AdvSceneSwitcher.action.replay.saveWarn="Warning: Saving too frequently might result in the replay buffer not actually being saved!"
|
||||||
AdvSceneSwitcher.action.replay.durationWarn="Warning: Changing the maximum replay time will only apply the next time the replay buffer is started!"
|
AdvSceneSwitcher.action.replay.durationWarn="Warning: Changing the maximum replay time will only apply the next time the replay buffer is started!"
|
||||||
@@ -901,7 +956,8 @@ AdvSceneSwitcher.action.streaming.type.server="Set server URL"
|
|||||||
AdvSceneSwitcher.action.streaming.type.streamKey="Set stream key"
|
AdvSceneSwitcher.action.streaming.type.streamKey="Set stream key"
|
||||||
AdvSceneSwitcher.action.streaming.type.username="Set username"
|
AdvSceneSwitcher.action.streaming.type.username="Set username"
|
||||||
AdvSceneSwitcher.action.streaming.type.password="Set password"
|
AdvSceneSwitcher.action.streaming.type.password="Set password"
|
||||||
AdvSceneSwitcher.action.streaming.entry="{{actions}}{{keyFrameInterval}}{{stringValue}}{{showPassword}}"
|
AdvSceneSwitcher.action.streaming.getCurrentValue="Get current value"
|
||||||
|
AdvSceneSwitcher.action.streaming.layout="{{actions}}{{keyFrameInterval}}{{stringValue}}{{showPassword}}{{getCurrentValue}}"
|
||||||
AdvSceneSwitcher.action.run="Run"
|
AdvSceneSwitcher.action.run="Run"
|
||||||
AdvSceneSwitcher.action.run.wait.entry="{{wait}}Wait for process exit or at most {{timeout}}{{waitHelp}}"
|
AdvSceneSwitcher.action.run.wait.entry="{{wait}}Wait for process exit or at most {{timeout}}{{waitHelp}}"
|
||||||
AdvSceneSwitcher.action.run.wait.help.tooltip="Note that macro properties won't work if you leave this unticked, as the process spawns detached from the rest of logic and there's no control over it."
|
AdvSceneSwitcher.action.run.wait.help.tooltip="Note that macro properties won't work if you leave this unticked, as the process spawns detached from the rest of logic and there's no control over it."
|
||||||
@@ -944,6 +1000,8 @@ AdvSceneSwitcher.action.source.type.openPropertiesDialog="Open properties dialog
|
|||||||
AdvSceneSwitcher.action.source.type.closeInteractionDialog="Close interaction dialog"
|
AdvSceneSwitcher.action.source.type.closeInteractionDialog="Close interaction dialog"
|
||||||
AdvSceneSwitcher.action.source.type.closeFilterDialog="Close filter dialog"
|
AdvSceneSwitcher.action.source.type.closeFilterDialog="Close filter dialog"
|
||||||
AdvSceneSwitcher.action.source.type.closePropertiesDialog="Close properties dialog"
|
AdvSceneSwitcher.action.source.type.closePropertiesDialog="Close properties dialog"
|
||||||
|
AdvSceneSwitcher.action.source.type.getSetting="Get setting value"
|
||||||
|
AdvSceneSwitcher.action.source.type.getSettings="Get settings JSON"
|
||||||
AdvSceneSwitcher.action.source.entry="{{actions}}{{sources}}{{settingsButtons}}{{deinterlaceMode}}{{deinterlaceOrder}}{{refresh}}"
|
AdvSceneSwitcher.action.source.entry="{{actions}}{{sources}}{{settingsButtons}}{{deinterlaceMode}}{{deinterlaceOrder}}{{refresh}}"
|
||||||
AdvSceneSwitcher.action.source.entry.settings="{{settings}}{{settingsInputMethod}}{{settingValue}}{{tempVar}}"
|
AdvSceneSwitcher.action.source.entry.settings="{{settings}}{{settingsInputMethod}}{{settingValue}}{{tempVar}}"
|
||||||
AdvSceneSwitcher.action.source.warning="Warning: Enabling and disabling sources globally cannot be controlled by the OBS UI\nYou might be looking for \"Scene item visibility\""
|
AdvSceneSwitcher.action.source.warning="Warning: Enabling and disabling sources globally cannot be controlled by the OBS UI\nYou might be looking for \"Scene item visibility\""
|
||||||
@@ -966,6 +1024,49 @@ AdvSceneSwitcher.action.source.inputMethod.json="Set setting JSON string"
|
|||||||
AdvSceneSwitcher.action.source.refresh="Refresh"
|
AdvSceneSwitcher.action.source.refresh="Refresh"
|
||||||
AdvSceneSwitcher.action.source.refresh.tooltip="Repopulate the source settings selection with the settings of the source which's name matches the variable value."
|
AdvSceneSwitcher.action.source.refresh.tooltip="Repopulate the source settings selection with the settings of the source which's name matches the variable value."
|
||||||
AdvSceneSwitcher.action.source.dialog.accept="Accept changes"
|
AdvSceneSwitcher.action.source.dialog.accept="Accept changes"
|
||||||
|
AdvSceneSwitcher.action.sourceInteraction="Source Interaction"
|
||||||
|
AdvSceneSwitcher.action.sourceInteraction.source="Source"
|
||||||
|
AdvSceneSwitcher.action.sourceInteraction.noSelection="Select a step to edit it"
|
||||||
|
AdvSceneSwitcher.action.sourceInteraction.record="Record interaction ..."
|
||||||
|
AdvSceneSwitcher.action.sourceInteraction.step.listEntry.mouseMove="Mouse move (%1, %2)"
|
||||||
|
AdvSceneSwitcher.action.sourceInteraction.step.listEntry.mouseUp="up"
|
||||||
|
AdvSceneSwitcher.action.sourceInteraction.step.listEntry.mouseDown="down"
|
||||||
|
AdvSceneSwitcher.action.sourceInteraction.step.listEntry.mouseClick="Mouse %1 %2 (%3, %4)"
|
||||||
|
AdvSceneSwitcher.action.sourceInteraction.step.listEntry.mouseClickCount=" x%1"
|
||||||
|
AdvSceneSwitcher.action.sourceInteraction.step.listEntry.mouseWheel="Mouse wheel (%1, %2) dx=%3 dy=%4"
|
||||||
|
AdvSceneSwitcher.action.sourceInteraction.step.listEntry.keyUp="up"
|
||||||
|
AdvSceneSwitcher.action.sourceInteraction.step.listEntry.keyDown="down"
|
||||||
|
AdvSceneSwitcher.action.sourceInteraction.step.listEntry.keyPress="Key %1"
|
||||||
|
AdvSceneSwitcher.action.sourceInteraction.step.listEntry.keyPressWithText="Key %1 '%2'"
|
||||||
|
AdvSceneSwitcher.action.sourceInteraction.step.listEntry.typeText="Type \"%1\""
|
||||||
|
AdvSceneSwitcher.action.sourceInteraction.step.listEntry.wait="Wait %1 ms"
|
||||||
|
AdvSceneSwitcher.action.sourceInteraction.step.edit.type="Type"
|
||||||
|
AdvSceneSwitcher.action.sourceInteraction.step.edit.mouseMove="Mouse move"
|
||||||
|
AdvSceneSwitcher.action.sourceInteraction.step.edit.mouseClick="Mouse click"
|
||||||
|
AdvSceneSwitcher.action.sourceInteraction.step.edit.mouseWheel="Mouse wheel"
|
||||||
|
AdvSceneSwitcher.action.sourceInteraction.step.edit.keyPress="Key press"
|
||||||
|
AdvSceneSwitcher.action.sourceInteraction.step.edit.typeText="Type text"
|
||||||
|
AdvSceneSwitcher.action.sourceInteraction.step.edit.wait="Wait"
|
||||||
|
AdvSceneSwitcher.action.sourceInteraction.step.edit.x="X"
|
||||||
|
AdvSceneSwitcher.action.sourceInteraction.step.edit.y="Y"
|
||||||
|
AdvSceneSwitcher.action.sourceInteraction.step.edit.button="Button"
|
||||||
|
AdvSceneSwitcher.action.sourceInteraction.step.edit.mouseUp="Mouse up"
|
||||||
|
AdvSceneSwitcher.action.sourceInteraction.step.edit.clickCount="Click count"
|
||||||
|
AdvSceneSwitcher.action.sourceInteraction.step.edit.wheelDx="Delta X"
|
||||||
|
AdvSceneSwitcher.action.sourceInteraction.step.edit.wheelDy="Delta Y"
|
||||||
|
AdvSceneSwitcher.action.sourceInteraction.step.edit.vkey="Virtual key"
|
||||||
|
AdvSceneSwitcher.action.sourceInteraction.step.edit.keyUp="Key up"
|
||||||
|
AdvSceneSwitcher.action.sourceInteraction.step.edit.text="Text"
|
||||||
|
AdvSceneSwitcher.action.sourceInteraction.step.edit.waitMs="Duration (ms)"
|
||||||
|
AdvSceneSwitcher.action.sourceInteraction.button.left="Left"
|
||||||
|
AdvSceneSwitcher.action.sourceInteraction.button.middle="Middle"
|
||||||
|
AdvSceneSwitcher.action.sourceInteraction.button.right="Right"
|
||||||
|
AdvSceneSwitcher.action.sourceInteraction.record.title="Record Source Interactions"
|
||||||
|
AdvSceneSwitcher.action.sourceInteraction.record.start="Start recording"
|
||||||
|
AdvSceneSwitcher.action.sourceInteraction.record.stop="Stop recording"
|
||||||
|
AdvSceneSwitcher.action.sourceInteraction.record.accept="Accept"
|
||||||
|
AdvSceneSwitcher.action.sourceInteraction.record.placeholder="Start recording and interact with the source to capture steps"
|
||||||
|
AdvSceneSwitcher.action.sourceInteraction.record.invalidSource="No valid source is selected.\nPlease select a source that supports interaction before recording."
|
||||||
AdvSceneSwitcher.action.media="Media"
|
AdvSceneSwitcher.action.media="Media"
|
||||||
AdvSceneSwitcher.action.media.type.play="Play"
|
AdvSceneSwitcher.action.media.type.play="Play"
|
||||||
AdvSceneSwitcher.action.media.type.pause="Pause"
|
AdvSceneSwitcher.action.media.type.pause="Pause"
|
||||||
@@ -985,12 +1086,12 @@ AdvSceneSwitcher.action.macro.type.pause="Pause"
|
|||||||
AdvSceneSwitcher.action.macro.type.unpause="Unpause"
|
AdvSceneSwitcher.action.macro.type.unpause="Unpause"
|
||||||
AdvSceneSwitcher.action.macro.type.togglePause="Toggle pause"
|
AdvSceneSwitcher.action.macro.type.togglePause="Toggle pause"
|
||||||
AdvSceneSwitcher.action.macro.type.resetCounter="Reset counter"
|
AdvSceneSwitcher.action.macro.type.resetCounter="Reset counter"
|
||||||
AdvSceneSwitcher.action.macro.type.run="Run macro"
|
AdvSceneSwitcher.action.macro.type.runActions="Run macro actions"
|
||||||
AdvSceneSwitcher.action.macro.type.run.conditions.ignore="Do not consider condition state"
|
AdvSceneSwitcher.action.macro.type.run.conditions.ignore="Do not consider condition state"
|
||||||
AdvSceneSwitcher.action.macro.type.run.conditions.true="Only if conditions evaluate to true"
|
AdvSceneSwitcher.action.macro.type.run.conditions.true="Only if conditions evaluate to true"
|
||||||
AdvSceneSwitcher.action.macro.type.run.conditions.false="Only if conditions evaluate to false"
|
AdvSceneSwitcher.action.macro.type.run.conditions.false="Only if conditions evaluate to false"
|
||||||
AdvSceneSwitcher.action.macro.type.run.updateConditionMatchState="Reevaluate the condition state before executing this action"
|
AdvSceneSwitcher.action.macro.type.run.updateConditionMatchState="Check conditions now, even if macro is paused"
|
||||||
AdvSceneSwitcher.action.macro.type.run.updateConditionMatchState.help="The plugin operates in phases:\n * The phase evaluating the macro conditions\n * The phase running macro actions\nMacros executed before this particular action might have side effects on the condition state of macros.\nCheck this option if you want those side effects to be taken into account when evaluating the condition state."
|
AdvSceneSwitcher.action.macro.type.run.updateConditionMatchState.help="The plugin operates in phases:\n * The phase evaluating the macro conditions\n * The phase running macro actions\nMacros executed before this particular action might have side effects on the condition state of macros.\nAdditionally, paused macros are assumed to not match their conditions.\nCheck this option to force a fresh condition evaluation before running this action, regardless of whether the macro is paused."
|
||||||
AdvSceneSwitcher.action.macro.type.run.actionType.regular="actions"
|
AdvSceneSwitcher.action.macro.type.run.actionType.regular="actions"
|
||||||
AdvSceneSwitcher.action.macro.type.run.actionType.else="else-actions"
|
AdvSceneSwitcher.action.macro.type.run.actionType.else="else-actions"
|
||||||
AdvSceneSwitcher.action.macro.type.run.skipWhenPaused="Skip execution when macro is paused"
|
AdvSceneSwitcher.action.macro.type.run.skipWhenPaused="Skip execution when macro is paused"
|
||||||
@@ -1000,6 +1101,10 @@ AdvSceneSwitcher.action.macro.type.stop="Stop actions"
|
|||||||
AdvSceneSwitcher.action.macro.type.disableAction="Disable action"
|
AdvSceneSwitcher.action.macro.type.disableAction="Disable action"
|
||||||
AdvSceneSwitcher.action.macro.type.enableAction="Enable action"
|
AdvSceneSwitcher.action.macro.type.enableAction="Enable action"
|
||||||
AdvSceneSwitcher.action.macro.type.toggleAction="Toggle action"
|
AdvSceneSwitcher.action.macro.type.toggleAction="Toggle action"
|
||||||
|
AdvSceneSwitcher.action.macro.type.getInfo="Get macro info"
|
||||||
|
AdvSceneSwitcher.action.macro.type.runMacro="Run macro"
|
||||||
|
AdvSceneSwitcher.action.macro.type.runMacro.noConditionsWarning="Warning: The selected macro has no conditions!"
|
||||||
|
AdvSceneSwitcher.action.macro.type.runMacro.help="Unlike \"Run macro actions\", this option will immediately re-evaluate the conditions of the selected macro and then run either its actions or else-actions depending on the result."
|
||||||
AdvSceneSwitcher.action.macro.type.nestedMacro="Nested macro"
|
AdvSceneSwitcher.action.macro.type.nestedMacro="Nested macro"
|
||||||
AdvSceneSwitcher.action.macro.actionSelectionType.index="at index"
|
AdvSceneSwitcher.action.macro.actionSelectionType.index="at index"
|
||||||
AdvSceneSwitcher.action.macro.actionSelectionType.label="with label"
|
AdvSceneSwitcher.action.macro.actionSelectionType.label="with label"
|
||||||
@@ -1010,6 +1115,7 @@ AdvSceneSwitcher.action.macro.type.nestedMacro.elseActionHelp="This section allo
|
|||||||
AdvSceneSwitcher.action.macro.layout.run="{{actions}}{{actionSections}}of{{macros}}"
|
AdvSceneSwitcher.action.macro.layout.run="{{actions}}{{actionSections}}of{{macros}}"
|
||||||
AdvSceneSwitcher.action.macro.layout.run.condition="{{conditionBehaviors}}of{{conditionMacros}}"
|
AdvSceneSwitcher.action.macro.layout.run.condition="{{conditionBehaviors}}of{{conditionMacros}}"
|
||||||
AdvSceneSwitcher.action.macro.layout.actionState="{{actions}}{{actionSelectionType}}{{actionIndex}}{{label}}{{regex}}{{actionTypes}}in{{actionSections}}section of{{macros}}"
|
AdvSceneSwitcher.action.macro.layout.actionState="{{actions}}{{actionSelectionType}}{{actionIndex}}{{label}}{{regex}}{{actionTypes}}in{{actionSections}}section of{{macros}}"
|
||||||
|
AdvSceneSwitcher.action.macro.layout.runMacro="{{actions}}{{runMacroHelp}}{{macros}}"
|
||||||
AdvSceneSwitcher.action.macro.layout.other="{{actions}}{{macros}}"
|
AdvSceneSwitcher.action.macro.layout.other="{{actions}}{{macros}}"
|
||||||
AdvSceneSwitcher.action.pluginState="Plugin state"
|
AdvSceneSwitcher.action.pluginState="Plugin state"
|
||||||
AdvSceneSwitcher.action.pluginState.type.stop="Stop the Advanced Scene Switcher plugin"
|
AdvSceneSwitcher.action.pluginState.type.stop="Stop the Advanced Scene Switcher plugin"
|
||||||
@@ -1082,13 +1188,16 @@ AdvSceneSwitcher.action.studioMode.type.enable="Enable studio mode"
|
|||||||
AdvSceneSwitcher.action.studioMode.type.disable="Disable studio mode"
|
AdvSceneSwitcher.action.studioMode.type.disable="Disable studio mode"
|
||||||
AdvSceneSwitcher.action.studioMode.entry="{{actions}}{{scenes}}"
|
AdvSceneSwitcher.action.studioMode.entry="{{actions}}{{scenes}}"
|
||||||
AdvSceneSwitcher.action.transition="Transition"
|
AdvSceneSwitcher.action.transition="Transition"
|
||||||
AdvSceneSwitcher.action.transition.type.scene="scene transition"
|
AdvSceneSwitcher.action.transition.type.scene="Modify scene transition"
|
||||||
AdvSceneSwitcher.action.transition.type.sceneOverride="scene transition override"
|
AdvSceneSwitcher.action.transition.type.sceneOverride="Modify scene transition override"
|
||||||
AdvSceneSwitcher.action.transition.type.sourceShow="source show transition"
|
AdvSceneSwitcher.action.transition.type.sourceShow="Modify source show transition"
|
||||||
AdvSceneSwitcher.action.transition.type.sourceHide="source hide transition"
|
AdvSceneSwitcher.action.transition.type.sourceHide="Modify source hide transition"
|
||||||
AdvSceneSwitcher.action.transition.entry.line1="Modify{{type}}{{scenes}}{{sources}}"
|
AdvSceneSwitcher.action.transition.type.tbar="Modify T-Bar position"
|
||||||
AdvSceneSwitcher.action.transition.entry.line2="{{setTransition}}Set transition type to{{transitions}}"
|
AdvSceneSwitcher.action.transition.type.releaseTbar="Release T-Bar"
|
||||||
AdvSceneSwitcher.action.transition.entry.line3="{{setDuration}}Set transition duration to{{duration}}seconds"
|
AdvSceneSwitcher.action.transition.layout.type="{{type}}{{scenes}}{{sources}}"
|
||||||
|
AdvSceneSwitcher.action.transition.layout.transition="{{setTransition}}Set transition type to{{transitions}}"
|
||||||
|
AdvSceneSwitcher.action.transition.layout.duration="{{setDuration}}Set transition duration to{{duration}}seconds"
|
||||||
|
AdvSceneSwitcher.action.transition.layout.tbar="Set T-Bar position to{{tbarPosition}}"
|
||||||
AdvSceneSwitcher.action.timer="Timer"
|
AdvSceneSwitcher.action.timer="Timer"
|
||||||
AdvSceneSwitcher.action.timer.type.pause="Pause"
|
AdvSceneSwitcher.action.timer.type.pause="Pause"
|
||||||
AdvSceneSwitcher.action.timer.type.continue="Continue"
|
AdvSceneSwitcher.action.timer.type.continue="Continue"
|
||||||
@@ -1248,23 +1357,52 @@ AdvSceneSwitcher.action.twitch.type.channel.info.category.set="Set stream catego
|
|||||||
AdvSceneSwitcher.action.twitch.type.channel.info.tags.set="Set stream tags"
|
AdvSceneSwitcher.action.twitch.type.channel.info.tags.set="Set stream tags"
|
||||||
AdvSceneSwitcher.action.twitch.type.channel.info.language.set="Set stream language"
|
AdvSceneSwitcher.action.twitch.type.channel.info.language.set="Set stream language"
|
||||||
AdvSceneSwitcher.action.twitch.type.raid.start="Start raid"
|
AdvSceneSwitcher.action.twitch.type.raid.start="Start raid"
|
||||||
|
AdvSceneSwitcher.action.twitch.type.raid.end="Cancel raid"
|
||||||
|
AdvSceneSwitcher.action.twitch.type.shoutout.send="Send shoutout"
|
||||||
|
AdvSceneSwitcher.action.twitch.type.shieldMode.start="Enable shield mode"
|
||||||
|
AdvSceneSwitcher.action.twitch.type.shieldMode.end="Disable shield mode"
|
||||||
AdvSceneSwitcher.action.twitch.type.commercial.start="Start commercial"
|
AdvSceneSwitcher.action.twitch.type.commercial.start="Start commercial"
|
||||||
|
AdvSceneSwitcher.action.twitch.type.commercial.snooze="Snooze next ad"
|
||||||
AdvSceneSwitcher.action.twitch.type.marker.create="Create stream marker"
|
AdvSceneSwitcher.action.twitch.type.marker.create="Create stream marker"
|
||||||
AdvSceneSwitcher.action.twitch.type.clip.create="Create stream clip"
|
AdvSceneSwitcher.action.twitch.type.clip.create="Create stream clip"
|
||||||
AdvSceneSwitcher.action.twitch.type.chat.announcement.send="Send chat announcement"
|
AdvSceneSwitcher.action.twitch.type.chat.announcement.send="Send chat announcement"
|
||||||
AdvSceneSwitcher.action.twitch.type.chat.emoteOnly.enable="Enable chat's emote-only mode"
|
AdvSceneSwitcher.action.twitch.type.chat.emoteOnly.enable="Enable chat's emote-only mode"
|
||||||
AdvSceneSwitcher.action.twitch.type.chat.emoteOnly.disable="Disable chat's emote-only mode"
|
AdvSceneSwitcher.action.twitch.type.chat.emoteOnly.disable="Disable chat's emote-only mode"
|
||||||
|
AdvSceneSwitcher.action.twitch.type.chat.followerOnly.enable="Enable chat's follower-only mode"
|
||||||
|
AdvSceneSwitcher.action.twitch.type.chat.followerOnly.disable="Disable chat's follower-only mode"
|
||||||
|
AdvSceneSwitcher.action.twitch.type.chat.subscriberOnly.enable="Enable chat's subscriber-only mode"
|
||||||
|
AdvSceneSwitcher.action.twitch.type.chat.subscriberOnly.disable="Disable chat's subscriber-only mode"
|
||||||
|
AdvSceneSwitcher.action.twitch.type.chat.slowMode.enable="Enable chat's slow mode"
|
||||||
|
AdvSceneSwitcher.action.twitch.type.chat.slowMode.disable="Disable chat's slow mode"
|
||||||
|
AdvSceneSwitcher.action.twitch.type.chat.nonModeratorDelay.enable="Enable chat's non-moderator message delay"
|
||||||
|
AdvSceneSwitcher.action.twitch.type.chat.nonModeratorDelay.disable="Disable chat's non-moderator message delay"
|
||||||
|
AdvSceneSwitcher.action.twitch.type.chat.uniqueMode.enable="Enable chat's unique message mode"
|
||||||
|
AdvSceneSwitcher.action.twitch.type.chat.uniqueMode.disable="Disable chat's unique message mode"
|
||||||
AdvSceneSwitcher.action.twitch.type.chat.sendMessage="Send chat message"
|
AdvSceneSwitcher.action.twitch.type.chat.sendMessage="Send chat message"
|
||||||
AdvSceneSwitcher.action.twitch.type.user.getInfo="Get user information"
|
AdvSceneSwitcher.action.twitch.type.user.getInfo="Get user information"
|
||||||
|
AdvSceneSwitcher.action.twitch.type.user.ban="Ban user"
|
||||||
|
AdvSceneSwitcher.action.twitch.type.user.unban="Unban user"
|
||||||
|
AdvSceneSwitcher.action.twitch.type.user.block="Block user"
|
||||||
|
AdvSceneSwitcher.action.twitch.type.user.unblock="Unblock user"
|
||||||
|
AdvSceneSwitcher.action.twitch.type.user.moderator.add="Add user as moderator"
|
||||||
|
AdvSceneSwitcher.action.twitch.type.user.moderator.delete="Remove user as moderator"
|
||||||
|
AdvSceneSwitcher.action.twitch.type.user.vip.add="Add user as VIP"
|
||||||
|
AdvSceneSwitcher.action.twitch.type.user.vip.delete="Remove user as VIP"
|
||||||
AdvSceneSwitcher.action.twitch.type.reward.getInfo="Get channel points reward information"
|
AdvSceneSwitcher.action.twitch.type.reward.getInfo="Get channel points reward information"
|
||||||
AdvSceneSwitcher.action.twitch.type.channel.getInfo="Get channel information"
|
AdvSceneSwitcher.action.twitch.type.channel.getInfo="Get channel information"
|
||||||
AdvSceneSwitcher.action.twitch.reward.toggleControl="Toggle reward name / variable selection control"
|
AdvSceneSwitcher.action.twitch.reward.toggleControl="Toggle reward name / variable selection control"
|
||||||
AdvSceneSwitcher.action.twitch.categorySelectionDisabled="Cannot select category without selecting a Twitch account first!"
|
AdvSceneSwitcher.action.twitch.categorySelectionDisabled="Cannot select category without selecting a Twitch account first!"
|
||||||
AdvSceneSwitcher.action.twitch.layout.default="On{{account}}{{actions}}{{streamTitle}}{{category}}{{markerDescription}}{{clipHasDelay}}{{duration}}{{announcementColor}}{{channel}}{{pointsReward}}"
|
AdvSceneSwitcher.action.twitch.layout.default="On{{account}}{{actions}}{{streamTitle}}{{category}}{{markerDescription}}{{clipHasDelay}}{{duration}}{{announcementColor}}{{nonModDelayDuration}}{{channel}}{{pointsReward}}"
|
||||||
AdvSceneSwitcher.action.twitch.layout.chat="Using account{{account}}{{actions}}on{{channel}}"
|
AdvSceneSwitcher.action.twitch.layout.chat="Using account{{account}}{{actions}}on{{channel}}"
|
||||||
AdvSceneSwitcher.action.twitch.layout.channel.getInfo="Using account{{account}}{{actions}}of{{channel}}"
|
AdvSceneSwitcher.action.twitch.layout.channel.getInfo="Using account{{account}}{{actions}}of{{channel}}"
|
||||||
AdvSceneSwitcher.action.twitch.layout.user.getInfo="Using account{{account}}{{actions}}for{{userInfoQueryType}}{{userLogin}}{{userId}}"
|
AdvSceneSwitcher.action.twitch.layout.user.getInfo.row1="Using account{{account}}{{actions}}"
|
||||||
AdvSceneSwitcher.action.twitch.layout.reward.getInfo="Using account{{account}}{{actions}}for channel{{channel}}{{pointsReward}}{{rewardVariable}}{{toggleRewardSelection}}"
|
AdvSceneSwitcher.action.twitch.layout.user.getInfo.row2="for{{userInfoQueryType}}{{userLogin}}{{userId}}"
|
||||||
|
AdvSceneSwitcher.action.twitch.layout.user.moderation.row1="Using account{{account}}{{actions}}"
|
||||||
|
AdvSceneSwitcher.action.twitch.layout.user.moderation.row2="on channel{{channel}}for{{userInfoQueryType}}{{userLogin}}{{userId}}"
|
||||||
|
AdvSceneSwitcher.action.twitch.layout.user.ban.row1="Using account{{account}}{{actions}}timeout{{duration}}"
|
||||||
|
AdvSceneSwitcher.action.twitch.layout.user.ban.row2="on channel{{channel}}for{{userInfoQueryType}}{{userLogin}}{{userId}}reason{{banReason}}"
|
||||||
|
AdvSceneSwitcher.action.twitch.layout.reward.getInfo.row1="Using account{{account}}{{actions}}for channel{{channel}}"
|
||||||
|
AdvSceneSwitcher.action.twitch.layout.reward.getInfo.row2="{{pointsReward}}{{rewardVariable}}{{toggleRewardSelection}}"
|
||||||
AdvSceneSwitcher.action.twitch.title.title="Enter title"
|
AdvSceneSwitcher.action.twitch.title.title="Enter title"
|
||||||
AdvSceneSwitcher.action.twitch.marker.description="Describe marker"
|
AdvSceneSwitcher.action.twitch.marker.description="Describe marker"
|
||||||
AdvSceneSwitcher.action.twitch.clip.hasDelay="Add a slight delay before capturing the clip"
|
AdvSceneSwitcher.action.twitch.clip.hasDelay="Add a slight delay before capturing the clip"
|
||||||
@@ -1285,6 +1423,8 @@ AdvSceneSwitcher.action.twitch.tags.duplicate.info="This tag is already in the l
|
|||||||
AdvSceneSwitcher.action.twitch.tags.limit="Tag Limit Reached"
|
AdvSceneSwitcher.action.twitch.tags.limit="Tag Limit Reached"
|
||||||
AdvSceneSwitcher.action.twitch.tags.limit.info="You can only have up to %1 tags."
|
AdvSceneSwitcher.action.twitch.tags.limit.info="You can only have up to %1 tags."
|
||||||
AdvSceneSwitcher.action.twitch.type.channel.info.contentClassification.set="Set content classification labels"
|
AdvSceneSwitcher.action.twitch.type.channel.info.contentClassification.set="Set content classification labels"
|
||||||
|
AdvSceneSwitcher.action.twitch.type.channel.info.brandedContent.enable="Enable branded content"
|
||||||
|
AdvSceneSwitcher.action.twitch.type.channel.info.brandedContent.disable="Disable branded content"
|
||||||
AdvSceneSwitcher.action.twitch.contentClassification.debatedSocialIssuesAndPolitics="Discussions or debates about politics or sensitive social issues such as elections, civic integrity, military conflict, and civil rights."
|
AdvSceneSwitcher.action.twitch.contentClassification.debatedSocialIssuesAndPolitics="Discussions or debates about politics or sensitive social issues such as elections, civic integrity, military conflict, and civil rights."
|
||||||
AdvSceneSwitcher.action.twitch.contentClassification.drugsIntoxication="Excessive tobacco glorification or promotion, any marijuana consumption/use, legal drug and alcohol induced intoxication, discussions of illegal drugs."
|
AdvSceneSwitcher.action.twitch.contentClassification.drugsIntoxication="Excessive tobacco glorification or promotion, any marijuana consumption/use, legal drug and alcohol induced intoxication, discussions of illegal drugs."
|
||||||
AdvSceneSwitcher.action.twitch.contentClassification.sexualThemes="Content that focuses on sexualized activities, sexual topics, or experiences."
|
AdvSceneSwitcher.action.twitch.contentClassification.sexualThemes="Content that focuses on sexualized activities, sexual topics, or experiences."
|
||||||
@@ -1390,6 +1530,7 @@ AdvSceneSwitcher.askBackup="Detected a new version of the Advanced Scene Switche
|
|||||||
AdvSceneSwitcher.askForMacro="Select macro{{macroSelection}}"
|
AdvSceneSwitcher.askForMacro="Select macro{{macroSelection}}"
|
||||||
|
|
||||||
AdvSceneSwitcher.crashDetected="OBS did not shut down cleanly (for example, due to a crash or freeze).\n\nThe Advanced Scene Switcher plugin would normally start automatically.\nWould you like to keep it stopped for now?"
|
AdvSceneSwitcher.crashDetected="OBS did not shut down cleanly (for example, due to a crash or freeze).\n\nThe Advanced Scene Switcher plugin would normally start automatically.\nWould you like to keep it stopped for now?"
|
||||||
|
AdvSceneSwitcher.crashDetected.suppressCheckbox="Do not show this dialog again"
|
||||||
|
|
||||||
AdvSceneSwitcher.close="Close"
|
AdvSceneSwitcher.close="Close"
|
||||||
AdvSceneSwitcher.browse="Browse"
|
AdvSceneSwitcher.browse="Browse"
|
||||||
@@ -1659,6 +1800,7 @@ AdvSceneSwitcher.script.language.lua="LUA"
|
|||||||
AdvSceneSwitcher.script.language.select="--select language--"
|
AdvSceneSwitcher.script.language.select="--select language--"
|
||||||
AdvSceneSwitcher.script.language.layout="Script language:{{language}}"
|
AdvSceneSwitcher.script.language.layout="Script language:{{language}}"
|
||||||
AdvSceneSwitcher.script.file.open="Open"
|
AdvSceneSwitcher.script.file.open="Open"
|
||||||
|
AdvSceneSwitcher.script.file.select="Select Script File"
|
||||||
AdvSceneSwitcher.script.file.open.failed="Could not open script file!"
|
AdvSceneSwitcher.script.file.open.failed="Could not open script file!"
|
||||||
AdvSceneSwitcher.script.file.warning.notFound="Warning: The given file path was not found!"
|
AdvSceneSwitcher.script.file.warning.notFound="Warning: The given file path was not found!"
|
||||||
AdvSceneSwitcher.script.file.warning.openFail="Warning: Could not open the script file!"
|
AdvSceneSwitcher.script.file.warning.openFail="Warning: Could not open the script file!"
|
||||||
@@ -1667,6 +1809,10 @@ AdvSceneSwitcher.script.file.layout="Script file:{{path}}{{open}}"
|
|||||||
|
|
||||||
AdvSceneSwitcher.tempVar.select="--select value--"
|
AdvSceneSwitcher.tempVar.select="--select value--"
|
||||||
AdvSceneSwitcher.tempVar.selectionInfo.lastValues="Last values:"
|
AdvSceneSwitcher.tempVar.selectionInfo.lastValues="Last values:"
|
||||||
|
AdvSceneSwitcher.tempVar.outputMappings="Save outputs to variables:"
|
||||||
|
AdvSceneSwitcher.tempVar.outputMappings.add="+ Add output mapping"
|
||||||
|
AdvSceneSwitcher.tempVar.outputMappings.toggle="Assign outputs to variables"
|
||||||
|
AdvSceneSwitcher.tempVar.outputMappings.remove="Remove output mapping"
|
||||||
|
|
||||||
AdvSceneSwitcher.tempVar.twitch.broadcaster_user_id="Twitch broadcaster user ID"
|
AdvSceneSwitcher.tempVar.twitch.broadcaster_user_id="Twitch broadcaster user ID"
|
||||||
AdvSceneSwitcher.tempVar.twitch.broadcaster_user_id.description="The numerical Twitch user ID of the broadcaster."
|
AdvSceneSwitcher.tempVar.twitch.broadcaster_user_id.description="The numerical Twitch user ID of the broadcaster."
|
||||||
@@ -2148,6 +2294,14 @@ AdvSceneSwitcher.tempVar.scene.position="Position in scenes list"
|
|||||||
|
|
||||||
AdvSceneSwitcher.tempVar.window.window="Window title"
|
AdvSceneSwitcher.tempVar.window.window="Window title"
|
||||||
AdvSceneSwitcher.tempVar.window.window.description="The window title of the matching window."
|
AdvSceneSwitcher.tempVar.window.window.description="The window title of the matching window."
|
||||||
|
AdvSceneSwitcher.tempVar.window.windowX="Window X position"
|
||||||
|
AdvSceneSwitcher.tempVar.window.windowX.description="The X position (left edge) of the matching window in screen coordinates."
|
||||||
|
AdvSceneSwitcher.tempVar.window.windowY="Window Y position"
|
||||||
|
AdvSceneSwitcher.tempVar.window.windowY.description="The Y position (top edge) of the matching window in screen coordinates."
|
||||||
|
AdvSceneSwitcher.tempVar.window.windowWidth="Window width"
|
||||||
|
AdvSceneSwitcher.tempVar.window.windowWidth.description="The width of the matching window in pixels."
|
||||||
|
AdvSceneSwitcher.tempVar.window.windowHeight="Window height"
|
||||||
|
AdvSceneSwitcher.tempVar.window.windowHeight.description="The height of the matching window in pixels."
|
||||||
AdvSceneSwitcher.tempVar.window.windowClass="Window class"
|
AdvSceneSwitcher.tempVar.window.windowClass="Window class"
|
||||||
AdvSceneSwitcher.tempVar.window.windowClass.description="The window class of the matching window."
|
AdvSceneSwitcher.tempVar.window.windowClass.description="The window class of the matching window."
|
||||||
AdvSceneSwitcher.tempVar.window.windowText="Window text"
|
AdvSceneSwitcher.tempVar.window.windowText="Window text"
|
||||||
@@ -2176,8 +2330,21 @@ AdvSceneSwitcher.tempVar.macro.runCount="Run count"
|
|||||||
AdvSceneSwitcher.tempVar.macro.runCount.description="The number of times a macro was executed."
|
AdvSceneSwitcher.tempVar.macro.runCount.description="The number of times a macro was executed."
|
||||||
AdvSceneSwitcher.tempVar.macro.matchedCount="Matched count"
|
AdvSceneSwitcher.tempVar.macro.matchedCount="Matched count"
|
||||||
AdvSceneSwitcher.tempVar.macro.matchedCount.description="The number of macros of which the condition state was true."
|
AdvSceneSwitcher.tempVar.macro.matchedCount.description="The number of macros of which the condition state was true."
|
||||||
|
AdvSceneSwitcher.tempVar.macro.info.conditionCount="Condition count"
|
||||||
|
AdvSceneSwitcher.tempVar.macro.info.conditionCount.description="The number of conditions in the macro."
|
||||||
|
AdvSceneSwitcher.tempVar.macro.info.actionCount="Action count"
|
||||||
|
AdvSceneSwitcher.tempVar.macro.info.actionCount.description="The number of actions in the macro."
|
||||||
|
AdvSceneSwitcher.tempVar.macro.info.elseActionCount="Else-action count"
|
||||||
|
AdvSceneSwitcher.tempVar.macro.info.elseActionCount.description="The number of else-actions in the macro."
|
||||||
|
AdvSceneSwitcher.tempVar.macro.info.paused="Paused"
|
||||||
|
AdvSceneSwitcher.tempVar.macro.info.paused.description="Whether the macro is currently paused. Value is \"true\" or \"false\"."
|
||||||
|
AdvSceneSwitcher.tempVar.macro.info.runCount="Run count"
|
||||||
|
AdvSceneSwitcher.tempVar.macro.info.runCount.description="The number of times the macro has been executed."
|
||||||
|
AdvSceneSwitcher.tempVar.macro.info.secondsSinceLastRun="Seconds since last run"
|
||||||
|
AdvSceneSwitcher.tempVar.macro.info.secondsSinceLastRun.description="The number of seconds elapsed since the macro was last executed. Value is -1 if the macro has never been executed."
|
||||||
|
|
||||||
AdvSceneSwitcher.tempVar.process.name="Process name"
|
AdvSceneSwitcher.tempVar.process.name="Process name"
|
||||||
|
AdvSceneSwitcher.tempVar.process.path="Process path"
|
||||||
|
|
||||||
AdvSceneSwitcher.tempVar.run.process.id="Process ID"
|
AdvSceneSwitcher.tempVar.run.process.id="Process ID"
|
||||||
AdvSceneSwitcher.tempVar.run.process.id.description="PID of the process assigned by the system."
|
AdvSceneSwitcher.tempVar.run.process.id.description="PID of the process assigned by the system."
|
||||||
@@ -2196,8 +2363,18 @@ AdvSceneSwitcher.tempVar.recording.durationSeconds.description="Recording durati
|
|||||||
AdvSceneSwitcher.tempVar.recording.lastSavePath="Last save path"
|
AdvSceneSwitcher.tempVar.recording.lastSavePath="Last save path"
|
||||||
AdvSceneSwitcher.tempVar.recording.lastSavePath.description="The file path of the last saved recording."
|
AdvSceneSwitcher.tempVar.recording.lastSavePath.description="The file path of the last saved recording."
|
||||||
|
|
||||||
|
AdvSceneSwitcher.tempVar.video.similarity="Similarity Rating"
|
||||||
|
AdvSceneSwitcher.tempVar.video.similarity.description="Values range from 0 to 1, where 0 means dissimilar and 1 means highly similar."
|
||||||
AdvSceneSwitcher.tempVar.video.patternCount="Pattern count"
|
AdvSceneSwitcher.tempVar.video.patternCount="Pattern count"
|
||||||
AdvSceneSwitcher.tempVar.video.patternCount.description="The number of times the given pattern has been found in a given video input frame."
|
AdvSceneSwitcher.tempVar.video.patternCount.description="The number of times the given pattern has been found in a given video input frame."
|
||||||
|
AdvSceneSwitcher.tempVar.video.matchX="Match X coordinate"
|
||||||
|
AdvSceneSwitcher.tempVar.video.matchX.description="The X coordinate of the top-left corner of the best pattern match.\nIf the 'check area' option is enabled, the coordinate is relative to the video source, not the area.\nSet to -1 if no match was found."
|
||||||
|
AdvSceneSwitcher.tempVar.video.matchY="Match Y coordinate"
|
||||||
|
AdvSceneSwitcher.tempVar.video.matchY.description="The Y coordinate of the top-left corner of the best pattern match.\nIf the 'check area' option is enabled, the coordinate is relative to the video source, not the area.\nSet to -1 if no match was found."
|
||||||
|
AdvSceneSwitcher.tempVar.video.matchWidth="Match width"
|
||||||
|
AdvSceneSwitcher.tempVar.video.matchWidth.description="The width of the matched pattern in pixels."
|
||||||
|
AdvSceneSwitcher.tempVar.video.matchHeight="Match height"
|
||||||
|
AdvSceneSwitcher.tempVar.video.matchHeight.description="The height of the matched pattern in pixels."
|
||||||
AdvSceneSwitcher.tempVar.video.objectCount="Object count"
|
AdvSceneSwitcher.tempVar.video.objectCount="Object count"
|
||||||
AdvSceneSwitcher.tempVar.video.objectCount.description="The number of objects the given model has identified in a given video input frame."
|
AdvSceneSwitcher.tempVar.video.objectCount.description="The number of objects the given model has identified in a given video input frame."
|
||||||
AdvSceneSwitcher.tempVar.video.brightness="Average brightness"
|
AdvSceneSwitcher.tempVar.video.brightness="Average brightness"
|
||||||
@@ -2206,6 +2383,8 @@ AdvSceneSwitcher.tempVar.video.text="OCR text"
|
|||||||
AdvSceneSwitcher.tempVar.video.text.description="The text detected in a given video input frame."
|
AdvSceneSwitcher.tempVar.video.text.description="The text detected in a given video input frame."
|
||||||
AdvSceneSwitcher.tempVar.video.color="Average color"
|
AdvSceneSwitcher.tempVar.video.color="Average color"
|
||||||
AdvSceneSwitcher.tempVar.video.color.description="The average RGB color in a given video input frame in HexArgb format."
|
AdvSceneSwitcher.tempVar.video.color.description="The average RGB color in a given video input frame in HexArgb format."
|
||||||
|
AdvSceneSwitcher.tempVar.video.dominantColor="Dominant color"
|
||||||
|
AdvSceneSwitcher.tempVar.video.dominantColor.description="The most dominant RGB color in a given video input frame in HexArgb format.\nDetermined using k-means clustering, which groups similar colors and returns the center of the largest group.\nDue to the nature of the algorithm the result may vary slightly between evaluations."
|
||||||
|
|
||||||
AdvSceneSwitcher.tempVar.websocket.message="Received websocket message"
|
AdvSceneSwitcher.tempVar.websocket.message="Received websocket message"
|
||||||
AdvSceneSwitcher.tempVar.websocket.message.description="The received websocket message, which matched the given pattern"
|
AdvSceneSwitcher.tempVar.websocket.message.description="The received websocket message, which matched the given pattern"
|
||||||
@@ -2335,9 +2514,14 @@ AdvSceneSwitcher.tempVar.gameCapture.executable="Executable"
|
|||||||
AdvSceneSwitcher.tempVar.gameCapture.executable.description="Executable name of the application captured by the source."
|
AdvSceneSwitcher.tempVar.gameCapture.executable.description="Executable name of the application captured by the source."
|
||||||
|
|
||||||
AdvSceneSwitcher.tempVar.http.status="Status code"
|
AdvSceneSwitcher.tempVar.http.status="Status code"
|
||||||
AdvSceneSwitcher.tempVar.http.body="Message body"
|
|
||||||
AdvSceneSwitcher.tempVar.http.error="Error"
|
AdvSceneSwitcher.tempVar.http.error="Error"
|
||||||
AdvSceneSwitcher.tempVar.http.error.description="Empty when no error occurred.\nOther possible values:\n\n * Could not establish connection\n * Failed to bind IP address\n * Failed to read connection\n * Failed to write connection\n * Maximum redirect count exceeded\n * Connection handling canceled\n * SSL connection failed\n * SSL certificate loading failed\n * SSL server verification failed\n * Unsupported HTTP multipart boundary characters\n * Compression failed\n * Connection timed out\n * Proxy connection failed\n * Unknown"
|
AdvSceneSwitcher.tempVar.http.error.description="Empty when no error occurred.\nOther possible values:\n\n * Could not establish connection\n * Failed to bind IP address\n * Failed to read connection\n * Failed to write connection\n * Maximum redirect count exceeded\n * Connection handling canceled\n * SSL connection failed\n * SSL certificate loading failed\n * SSL server verification failed\n * Unsupported HTTP multipart boundary characters\n * Compression failed\n * Connection timed out\n * Proxy connection failed\n * Unknown"
|
||||||
|
AdvSceneSwitcher.tempVar.http.method="Method"
|
||||||
|
AdvSceneSwitcher.tempVar.http.method.description="Received HTTP request method"
|
||||||
|
AdvSceneSwitcher.tempVar.http.path="Request path"
|
||||||
|
AdvSceneSwitcher.tempVar.http.path.description="Received HTTP request path"
|
||||||
|
AdvSceneSwitcher.tempVar.http.body="Message body"
|
||||||
|
AdvSceneSwitcher.tempVar.http.body.description="Received HTTP request body"
|
||||||
|
|
||||||
AdvSceneSwitcher.tempVar.mqtt.message="Message"
|
AdvSceneSwitcher.tempVar.mqtt.message="Message"
|
||||||
|
|
||||||
@@ -2347,6 +2531,14 @@ AdvSceneSwitcher.tempVar.cursor.y="Cursor position (Y)"
|
|||||||
AdvSceneSwitcher.tempVar.replay.lastSavePath="Last save path"
|
AdvSceneSwitcher.tempVar.replay.lastSavePath="Last save path"
|
||||||
AdvSceneSwitcher.tempVar.replay.lastSavePath.description="The file path of the last replay buffer saved."
|
AdvSceneSwitcher.tempVar.replay.lastSavePath.description="The file path of the last replay buffer saved."
|
||||||
|
|
||||||
|
AdvSceneSwitcher.tempVar.sequence.macro="Macro"
|
||||||
|
AdvSceneSwitcher.tempVar.sequence.macro.description="The name of the macro executed by the \"Sequence\" action.\nIf no macro was executed the returned value is the empty string."
|
||||||
|
AdvSceneSwitcher.tempVar.sequence.nextMacro="Next Macro"
|
||||||
|
AdvSceneSwitcher.tempVar.sequence.nextMacro.description="The name of the macro which will be executed next after the index was set.\nIf no macro will be executed the returned value is the empty string."
|
||||||
|
|
||||||
|
AdvSceneSwitcher.tempVar.random.macro="Macro"
|
||||||
|
AdvSceneSwitcher.tempVar.random.macro.description="The name of the macro executed by the \"Random\" action.\nIf no macro was executed the returned value is the empty string."
|
||||||
|
|
||||||
AdvSceneSwitcher.selectScene="--select scene--"
|
AdvSceneSwitcher.selectScene="--select scene--"
|
||||||
AdvSceneSwitcher.selectCanvas="--select canvas--"
|
AdvSceneSwitcher.selectCanvas="--select canvas--"
|
||||||
AdvSceneSwitcher.selectPreviousScene="Previous Scene"
|
AdvSceneSwitcher.selectPreviousScene="Previous Scene"
|
||||||
@@ -2376,6 +2568,9 @@ AdvSceneSwitcher.selectDisplay="--select display--"
|
|||||||
AdvSceneSwitcher.invaildEntriesWillNotBeSaved="invalid entries will not be saved"
|
AdvSceneSwitcher.invaildEntriesWillNotBeSaved="invalid entries will not be saved"
|
||||||
AdvSceneSwitcher.selectWindowTip="Use \"OBS\" to specify OBS window\nUse \"Task Switching\"to specify ALT + TAB"
|
AdvSceneSwitcher.selectWindowTip="Use \"OBS\" to specify OBS window\nUse \"Task Switching\"to specify ALT + TAB"
|
||||||
|
|
||||||
|
AdvSceneSwitcher.keepSourceActive="Keep source active"
|
||||||
|
AdvSceneSwitcher.keepSourceActive.help="When a source is not visible in the active scene it becomes inactive, which can cause it to stop producing output (e.g. video frames or game capture hooks).\nEnabling this option forces the source to remain active at all times, ensuring it continues to produce output even when not displayed.\n\nNote: Keeping a source permanently active may increase CPU and GPU usage, as the source continues to run even when not shown."
|
||||||
|
|
||||||
AdvSceneSwitcher.settings.suffix.type.invalid=" (Invalid)"
|
AdvSceneSwitcher.settings.suffix.type.invalid=" (Invalid)"
|
||||||
AdvSceneSwitcher.settings.suffix.type.bool=" (Bool)"
|
AdvSceneSwitcher.settings.suffix.type.bool=" (Bool)"
|
||||||
AdvSceneSwitcher.settings.suffix.type.int=" (Int)"
|
AdvSceneSwitcher.settings.suffix.type.int=" (Int)"
|
||||||
@@ -2436,8 +2631,6 @@ AdvSceneSwitcher.status.inactive="Inactive"
|
|||||||
AdvSceneSwitcher.running="Plugin running"
|
AdvSceneSwitcher.running="Plugin running"
|
||||||
AdvSceneSwitcher.stopped="Plugin stopped"
|
AdvSceneSwitcher.stopped="Plugin stopped"
|
||||||
|
|
||||||
AdvSceneSwitcher.firstBootMessage="<html><head/><body><p>This seems to be the first time the Advanced Scene Switcher was started.<br>Please have a look at the <a href=\"https://github.com/WarmUpTill/SceneSwitcher/wiki\"><span style=\" text-decoration: underline; color:#268bd2;\">Wiki</span></a> for a list of guides and examples.<br>Do not hesitate to ask questions in the plugin's <a href=\"https://obsproject.com/forum/threads/advanced-scene-switcher.48264\"><span style=\" text-decoration: underline; color:#268bd2;\">thread</span></a> on the OBS forums!</p></body></html>"
|
|
||||||
|
|
||||||
AdvSceneSwitcher.deprecatedTabWarning="Development for this tab stopped!\nPlease consider transitioning to using Macros instead.\nThis hint can be disabled on the General tab."
|
AdvSceneSwitcher.deprecatedTabWarning="Development for this tab stopped!\nPlease consider transitioning to using Macros instead.\nThis hint can be disabled on the General tab."
|
||||||
|
|
||||||
AdvSceneSwitcher.unit.milliseconds="milliseconds"
|
AdvSceneSwitcher.unit.milliseconds="milliseconds"
|
||||||
@@ -2477,6 +2670,37 @@ AdvSceneSwitcher.day.sunday="Sunday"
|
|||||||
AdvSceneSwitcher.day.none="No day"
|
AdvSceneSwitcher.day.none="No day"
|
||||||
AdvSceneSwitcher.day.any="Any day"
|
AdvSceneSwitcher.day.any="Any day"
|
||||||
|
|
||||||
|
# First run wizard
|
||||||
|
FirstRunWizard.windowTitle="Advanced Scene Switcher - Setup Wizard"
|
||||||
|
|
||||||
|
FirstRunWizard.welcome.title="Welcome to Advanced Scene Switcher"
|
||||||
|
FirstRunWizard.welcome.subtitle="Let's create your first automation in a few easy steps."
|
||||||
|
FirstRunWizard.welcome.body="<p>Advanced Scene Switcher lets you build <b>Macros</b> - rules of the form:</p><blockquote><i>When [condition] -> perform [action]</i></blockquote><p>This wizard creates a macro that <b>switches to a chosen OBS scene whenever a specific window comes into focus</b>.</p><p>You can skip at any time. Re-open this wizard later from the <b>General</b> tab inside the Advanced Scene Switcher dialog.</p>"
|
||||||
|
|
||||||
|
FirstRunWizard.scene.title="Choose a Target Scene"
|
||||||
|
FirstRunWizard.scene.subtitle="Which OBS scene should become active when your chosen window comes into focus?"
|
||||||
|
FirstRunWizard.scene.label="Switch to scene:"
|
||||||
|
|
||||||
|
FirstRunWizard.window.title="Choose a Trigger Window"
|
||||||
|
FirstRunWizard.window.subtitle="Enter the title of the window that should trigger the scene switch. Partial matches are fine - \"Firefox\" will match any Firefox window."
|
||||||
|
FirstRunWizard.window.label="Window title contains:"
|
||||||
|
FirstRunWizard.window.placeholder="e.g. \"Firefox\", \"Visual Studio Code\""
|
||||||
|
FirstRunWizard.window.autoDetect="Auto-detect focused window"
|
||||||
|
FirstRunWizard.window.autoDetectTooltip="Click, then switch to the target window. The title will be captured automatically after 3 seconds."
|
||||||
|
FirstRunWizard.window.autoDetectCountdown="Detecting in %1 s - focus your window now..."
|
||||||
|
FirstRunWizard.window.hint="<small>Tip: a short partial title is more robust than the full title, which often changes when you switch tabs.</small>"
|
||||||
|
|
||||||
|
FirstRunWizard.review.title="Review Your Macro"
|
||||||
|
FirstRunWizard.review.subtitle="Click Back to make changes, or Finish to create the macro."
|
||||||
|
FirstRunWizard.review.summary="<b>Macro name:</b> Window -> %1<br><br><b>Condition:</b> Focused window title contains <i>\"%2\"</i> (case-insensitive)<br><br><b>Action:</b> Switch to scene <i>\"%1\"</i>"
|
||||||
|
FirstRunWizard.review.errorTitle="Macro Creation Failed"
|
||||||
|
FirstRunWizard.review.errorBody="The macro could not be created automatically.\n\nYou can create it manually on the Macros tab:\n Condition: Window -> contains \"%1\"\n Action: Switch scene -> \"%2\""
|
||||||
|
|
||||||
|
FirstRunWizard.done.title="You're all set!"
|
||||||
|
FirstRunWizard.done.subtitle="Your first macro has been created and is now active."
|
||||||
|
FirstRunWizard.done.body="<p>You can view and edit it on the <b>Macros</b> tab of the Advanced Scene Switcher dialog.</p><p>To learn more:</p><ul><li><a href=\"https://github.com/WarmUpTill/SceneSwitcher/wiki\">Plugin wiki</a></li><li><a href=\"https://obsproject.com/forum/resources/automatic-scene-switching.395/\">OBS forum thread</a></li></ul>"
|
||||||
|
|
||||||
|
FirstRunWizard.openButton="Open Setup Wizard..."
|
||||||
# This secion is copied from the OBS locale files
|
# This secion is copied from the OBS locale files
|
||||||
|
|
||||||
# OBS commonly shared locale
|
# OBS commonly shared locale
|
||||||
@@ -2514,6 +2738,64 @@ Basic.Settings.Video.FPSCommon="Common FPS Values"
|
|||||||
Basic.Settings.Video.FPSInteger="Integer FPS Value"
|
Basic.Settings.Video.FPSInteger="Integer FPS Value"
|
||||||
Basic.Settings.Video.FPSFraction="Fractional FPS Value"
|
Basic.Settings.Video.FPSFraction="Fractional FPS Value"
|
||||||
|
|
||||||
|
# Calendar widget
|
||||||
|
AdvSceneSwitcher.calendar.today="Today"
|
||||||
|
AdvSceneSwitcher.calendar.month="Month"
|
||||||
|
AdvSceneSwitcher.calendar.week="Week"
|
||||||
|
AdvSceneSwitcher.calendar.day="Day"
|
||||||
|
AdvSceneSwitcher.calendar.moreEvents="+%1 more"
|
||||||
|
|
||||||
|
# Macro Schedule tab
|
||||||
|
AdvSceneSwitcher.macroScheduleTab.title="Macro Schedule"
|
||||||
|
AdvSceneSwitcher.macroScheduleTab.help="No scheduled entries.\nClick '+' to schedule a macro."
|
||||||
|
AdvSceneSwitcher.macroScheduleTab.add="Add"
|
||||||
|
AdvSceneSwitcher.macroScheduleTab.add.tooltip="Add schedule entry"
|
||||||
|
AdvSceneSwitcher.macroScheduleTab.edit="Edit"
|
||||||
|
AdvSceneSwitcher.macroScheduleTab.remove="Remove"
|
||||||
|
AdvSceneSwitcher.macroScheduleTab.remove.tooltip="Remove schedule entry"
|
||||||
|
AdvSceneSwitcher.macroScheduleTab.enable="Enable"
|
||||||
|
AdvSceneSwitcher.macroScheduleTab.disable="Disable"
|
||||||
|
AdvSceneSwitcher.macroScheduleTab.showAll="Show All"
|
||||||
|
AdvSceneSwitcher.macroScheduleTab.column.name="Name"
|
||||||
|
AdvSceneSwitcher.macroScheduleTab.column.macro="Macro"
|
||||||
|
AdvSceneSwitcher.macroScheduleTab.column.schedule="Schedule"
|
||||||
|
AdvSceneSwitcher.macroScheduleTab.column.nextTrigger="Next Trigger"
|
||||||
|
AdvSceneSwitcher.macroScheduleTab.column.status="Status"
|
||||||
|
AdvSceneSwitcher.macroScheduleTab.remove.confirm="Are you sure you want to remove \"%1\"?"
|
||||||
|
AdvSceneSwitcher.macroScheduleTab.remove.confirmMultiple="Are you sure you want to remove %1 entries?"
|
||||||
|
AdvSceneSwitcher.macroScheduleTab.status.active="Active"
|
||||||
|
AdvSceneSwitcher.macroScheduleTab.status.disabled="Disabled"
|
||||||
|
AdvSceneSwitcher.macroScheduleTab.status.expired="Expired"
|
||||||
|
|
||||||
|
# Macro Schedule entry dialog
|
||||||
|
AdvSceneSwitcher.macroScheduleEntry.dialog.title.add="Add Schedule Entry"
|
||||||
|
AdvSceneSwitcher.macroScheduleEntry.dialog.title.edit="Edit Schedule Entry"
|
||||||
|
AdvSceneSwitcher.macroScheduleEntry.name="Name (optional):"
|
||||||
|
AdvSceneSwitcher.macroScheduleEntry.name.placeholder="e.g. Daily stream start"
|
||||||
|
AdvSceneSwitcher.macroScheduleEntry.macro="Macro:"
|
||||||
|
AdvSceneSwitcher.macroScheduleEntry.startDateTime="Start:"
|
||||||
|
AdvSceneSwitcher.macroScheduleEntry.endDate="End date:"
|
||||||
|
AdvSceneSwitcher.macroScheduleEntry.endDate.help="Controls how far the entry spans visually in the calendar and optionally triggers an action when the date is reached."
|
||||||
|
AdvSceneSwitcher.macroScheduleEntry.endDate.action.none="No action"
|
||||||
|
AdvSceneSwitcher.macroScheduleEntry.endDate.action.disableEntry="Disable schedule entry"
|
||||||
|
AdvSceneSwitcher.macroScheduleEntry.endDate.action.pauseMacro="Pause macro"
|
||||||
|
AdvSceneSwitcher.macroScheduleEntry.endDate.action.stopMacro="Stop macro"
|
||||||
|
AdvSceneSwitcher.macroScheduleEntry.repeat="Repeat"
|
||||||
|
AdvSceneSwitcher.macroScheduleEntry.repeat.once="Once"
|
||||||
|
AdvSceneSwitcher.macroScheduleEntry.repeat.every="Every %1"
|
||||||
|
AdvSceneSwitcher.macroScheduleEntry.repeat.interval="Repeat interval:"
|
||||||
|
AdvSceneSwitcher.macroScheduleEntry.noMacro="(no macro)"
|
||||||
|
AdvSceneSwitcher.macroScheduleEntry.repeatEnd="End repeat:"
|
||||||
|
AdvSceneSwitcher.macroScheduleEntry.repeatEnd.never="Never"
|
||||||
|
AdvSceneSwitcher.macroScheduleEntry.repeatEnd.afterNTimes="After"
|
||||||
|
AdvSceneSwitcher.macroScheduleEntry.repeatEnd.afterNTimes.suffix="occurrence(s)"
|
||||||
|
AdvSceneSwitcher.macroScheduleEntry.repeatEnd.untilDate="Until"
|
||||||
|
AdvSceneSwitcher.macroScheduleEntry.color="Color:"
|
||||||
|
AdvSceneSwitcher.macroScheduleEntry.color.dialog="Pick entry color"
|
||||||
|
AdvSceneSwitcher.macroScheduleEntry.checkConditions="Check macro conditions before running"
|
||||||
|
AdvSceneSwitcher.macroScheduleEntry.runElseActionsOnConditionFailure="Run else actions if conditions are not met"
|
||||||
|
AdvSceneSwitcher.macroScheduleEntry.enabled="Enabled"
|
||||||
|
|
||||||
# Legacy tabs below - please don't waste your time adding translations for these :)
|
# Legacy tabs below - please don't waste your time adding translations for these :)
|
||||||
# Transition Tab
|
# Transition Tab
|
||||||
AdvSceneSwitcher.transitionTab.title="Transition"
|
AdvSceneSwitcher.transitionTab.title="Transition"
|
||||||
|
|||||||
@@ -72,7 +72,6 @@ AdvSceneSwitcher.macroTab.add="Agregar nueva macro"
|
|||||||
AdvSceneSwitcher.macroTab.name="Nombre:"
|
AdvSceneSwitcher.macroTab.name="Nombre:"
|
||||||
AdvSceneSwitcher.macroTab.run="Ejecutar macro"
|
AdvSceneSwitcher.macroTab.run="Ejecutar macro"
|
||||||
AdvSceneSwitcher.macroTab.runInParallel="Ejecutar macro en paralelo a otras macros"
|
AdvSceneSwitcher.macroTab.runInParallel="Ejecutar macro en paralelo a otras macros"
|
||||||
AdvSceneSwitcher.macroTab.onChange="Realizar acciones solo en el cambio de condición"
|
|
||||||
AdvSceneSwitcher.macroTab.defaultname="Macro %1"
|
AdvSceneSwitcher.macroTab.defaultname="Macro %1"
|
||||||
AdvSceneSwitcher.macroTab.copy="Crear copia"
|
AdvSceneSwitcher.macroTab.copy="Crear copia"
|
||||||
AdvSceneSwitcher.macroTab.expandAll="Expandir todo"
|
AdvSceneSwitcher.macroTab.expandAll="Expandir todo"
|
||||||
@@ -84,7 +83,6 @@ AdvSceneSwitcher.macroTab.highlightTrueConditions="Resaltar condiciones de la ma
|
|||||||
AdvSceneSwitcher.macroTab.highlightPerformedActions="Resaltar acciones realizadas recientemente de la macro seleccionada actualmente"
|
AdvSceneSwitcher.macroTab.highlightPerformedActions="Resaltar acciones realizadas recientemente de la macro seleccionada actualmente"
|
||||||
|
|
||||||
; Lógica de macros
|
; Lógica de macros
|
||||||
AdvSceneSwitcher.logic.none="Omitir entrada"
|
|
||||||
AdvSceneSwitcher.logic.and="Y"
|
AdvSceneSwitcher.logic.and="Y"
|
||||||
AdvSceneSwitcher.logic.or="O"
|
AdvSceneSwitcher.logic.or="O"
|
||||||
AdvSceneSwitcher.logic.andNot="Y no"
|
AdvSceneSwitcher.logic.andNot="Y no"
|
||||||
@@ -118,9 +116,7 @@ AdvSceneSwitcher.condition.scene.currentSceneTransitionBehaviour="Durante la tra
|
|||||||
AdvSceneSwitcher.condition.scene.previousSceneTransitionBehaviour="Durante la transición, verifique la escena de origen de la transición"
|
AdvSceneSwitcher.condition.scene.previousSceneTransitionBehaviour="Durante la transición, verifique la escena de origen de la transición"
|
||||||
AdvSceneSwitcher.condition.window="Ventana"
|
AdvSceneSwitcher.condition.window="Ventana"
|
||||||
AdvSceneSwitcher.condition.file="Archivo"
|
AdvSceneSwitcher.condition.file="Archivo"
|
||||||
AdvSceneSwitcher.condition.file.entry.line1="Contenido de{{fileType}}{{filePath}}{{conditions}}{{useRegex}}"
|
AdvSceneSwitcher.condition.file.layout="Contenido de{{filePath}}{{conditions}}{{regex}}"
|
||||||
AdvSceneSwitcher.condition.file.entry.line2="{{matchText}}"
|
|
||||||
AdvSceneSwitcher.condition.file.entry.line3="{{checkModificationDate}}{{checkFileContent}}"
|
|
||||||
AdvSceneSwitcher.condition.media="Medios"
|
AdvSceneSwitcher.condition.media="Medios"
|
||||||
AdvSceneSwitcher.condition.media.anyOnScene="Cualquier fuente multimedia activada"
|
AdvSceneSwitcher.condition.media.anyOnScene="Cualquier fuente multimedia activada"
|
||||||
AdvSceneSwitcher.condition.media.allOnScene="Todas las fuentes de medios activadas"
|
AdvSceneSwitcher.condition.media.allOnScene="Todas las fuentes de medios activadas"
|
||||||
@@ -176,7 +172,7 @@ AdvSceneSwitcher.condition.record.state.start="Grabación en ejecución"
|
|||||||
AdvSceneSwitcher.condition.record.state.pause="Grabación en pausa"
|
AdvSceneSwitcher.condition.record.state.pause="Grabación en pausa"
|
||||||
AdvSceneSwitcher.condition.record.state.stop="Grabación detenida"
|
AdvSceneSwitcher.condition.record.state.stop="Grabación detenida"
|
||||||
AdvSceneSwitcher.condition.process="Proceso"
|
AdvSceneSwitcher.condition.process="Proceso"
|
||||||
AdvSceneSwitcher.condition.process.entry="{{processes}}{{regex}}se está ejecutando{{focused}}y está enfocado"
|
AdvSceneSwitcher.condition.process.layout="{{processes}}{{regex}}se está ejecutando{{focused}}y está enfocado"
|
||||||
AdvSceneSwitcher.condition.idle="Inactivo"
|
AdvSceneSwitcher.condition.idle="Inactivo"
|
||||||
AdvSceneSwitcher.condition.idle.entry="No hay entradas de teclado o ratón durante {{duration}}"
|
AdvSceneSwitcher.condition.idle.entry="No hay entradas de teclado o ratón durante {{duration}}"
|
||||||
AdvSceneSwitcher.condition.pluginState="Estado del complemento"
|
AdvSceneSwitcher.condition.pluginState="Estado del complemento"
|
||||||
@@ -335,7 +331,6 @@ AdvSceneSwitcher.action.recording.type.start="Iniciar grabación"
|
|||||||
AdvSceneSwitcher.action.recording.type.pause="Pausar grabación"
|
AdvSceneSwitcher.action.recording.type.pause="Pausar grabación"
|
||||||
AdvSceneSwitcher.action.recording.type.unpause="Reanudar grabación"
|
AdvSceneSwitcher.action.recording.type.unpause="Reanudar grabación"
|
||||||
AdvSceneSwitcher.action.recording.pause.hint="Tenga en cuenta que, dependiendo de la configuración de grabación, es posible que no pueda pausar la grabación"
|
AdvSceneSwitcher.action.recording.pause.hint="Tenga en cuenta que, dependiendo de la configuración de grabación, es posible que no pueda pausar la grabación"
|
||||||
AdvSceneSwitcher.action.recording.entry="{{actions}}{{recordFolder}}{{recordFileFormat}}{{pauseHint}}{{splitHint}}"
|
|
||||||
AdvSceneSwitcher.action.replay="Búfer de reproducción"
|
AdvSceneSwitcher.action.replay="Búfer de reproducción"
|
||||||
AdvSceneSwitcher.action.replay.saveWarn="Advertencia: ¡Guardar con demasiada frecuencia puede hacer que el búfer de reproducción no se guarde realmente!"
|
AdvSceneSwitcher.action.replay.saveWarn="Advertencia: ¡Guardar con demasiada frecuencia puede hacer que el búfer de reproducción no se guarde realmente!"
|
||||||
AdvSceneSwitcher.action.replay.type.stop="Detener el búfer de reproducción"
|
AdvSceneSwitcher.action.replay.type.stop="Detener el búfer de reproducción"
|
||||||
@@ -344,7 +339,6 @@ AdvSceneSwitcher.action.replay.type.save="Guardar búfer de reproducción"
|
|||||||
AdvSceneSwitcher.action.streaming="Transmisión"
|
AdvSceneSwitcher.action.streaming="Transmisión"
|
||||||
AdvSceneSwitcher.action.streaming.type.stop="Detener transmisión"
|
AdvSceneSwitcher.action.streaming.type.stop="Detener transmisión"
|
||||||
AdvSceneSwitcher.action.streaming.type.start="Iniciar transmisión"
|
AdvSceneSwitcher.action.streaming.type.start="Iniciar transmisión"
|
||||||
AdvSceneSwitcher.action.streaming.entry="{{actions}}{{keyFrameInterval}}{{stringValue}}{{showPassword}}"
|
|
||||||
AdvSceneSwitcher.action.run="Ejecutar"
|
AdvSceneSwitcher.action.run="Ejecutar"
|
||||||
AdvSceneSwitcher.action.sceneVisibility="Visibilidad del elemento de escena"
|
AdvSceneSwitcher.action.sceneVisibility="Visibilidad del elemento de escena"
|
||||||
AdvSceneSwitcher.action.sceneVisibility.type.show="Mostrar"
|
AdvSceneSwitcher.action.sceneVisibility.type.show="Mostrar"
|
||||||
@@ -376,7 +370,7 @@ AdvSceneSwitcher.action.macro="Macro"
|
|||||||
AdvSceneSwitcher.action.macro.type.pause="Pausa"
|
AdvSceneSwitcher.action.macro.type.pause="Pausa"
|
||||||
AdvSceneSwitcher.action.macro.type.unpause="Reanudar"
|
AdvSceneSwitcher.action.macro.type.unpause="Reanudar"
|
||||||
AdvSceneSwitcher.action.macro.type.resetCounter="Reiniciar contador"
|
AdvSceneSwitcher.action.macro.type.resetCounter="Reiniciar contador"
|
||||||
AdvSceneSwitcher.action.macro.type.run="Ejecutar"
|
AdvSceneSwitcher.action.macro.type.runActions="Ejecutar"
|
||||||
AdvSceneSwitcher.action.macro.type.stop="Detener"
|
AdvSceneSwitcher.action.macro.type.stop="Detener"
|
||||||
AdvSceneSwitcher.action.pluginState="Estado del complemento"
|
AdvSceneSwitcher.action.pluginState="Estado del complemento"
|
||||||
AdvSceneSwitcher.action.pluginState.type.stop="Detener el complemento Advanced Scene Switcher"
|
AdvSceneSwitcher.action.pluginState.type.stop="Detener el complemento Advanced Scene Switcher"
|
||||||
@@ -424,9 +418,9 @@ AdvSceneSwitcher.action.transition.type.scene="transición de escena"
|
|||||||
AdvSceneSwitcher.action.transition.type.sceneOverride="anulación de transición de escena"
|
AdvSceneSwitcher.action.transition.type.sceneOverride="anulación de transición de escena"
|
||||||
AdvSceneSwitcher.action.transition.type.sourceShow="transición del programa de origen"
|
AdvSceneSwitcher.action.transition.type.sourceShow="transición del programa de origen"
|
||||||
AdvSceneSwitcher.action.transition.type.sourceHide="fuente ocultar transición"
|
AdvSceneSwitcher.action.transition.type.sourceHide="fuente ocultar transición"
|
||||||
AdvSceneSwitcher.action.transition.entry.line1="Modificar {{type}}{{scenes}}{{sources}}"
|
AdvSceneSwitcher.action.transition.layout.type="Modificar {{type}}{{scenes}}{{sources}}"
|
||||||
AdvSceneSwitcher.action.transition.entry.line2="{{setTransition}}Establecer el tipo de transición en {{transitions}}"
|
AdvSceneSwitcher.action.transition.layout.transition="{{setTransition}}Establecer el tipo de transición en {{transitions}}"
|
||||||
AdvSceneSwitcher.action.transition.entry.line3="{{setDuration}}Establecer la duración de la transición en {{duration}}segundos"
|
AdvSceneSwitcher.action.transition.layout.duration="{{setDuration}}Establecer la duración de la transición en {{duration}}segundos"
|
||||||
AdvSceneSwitcher.action.timer="Temporizador"
|
AdvSceneSwitcher.action.timer="Temporizador"
|
||||||
AdvSceneSwitcher.action.timer.type.pause="Pausa"
|
AdvSceneSwitcher.action.timer.type.pause="Pausa"
|
||||||
AdvSceneSwitcher.action.timer.type.continue="Continuar"
|
AdvSceneSwitcher.action.timer.type.continue="Continuar"
|
||||||
@@ -681,8 +675,6 @@ AdvSceneSwitcher.status.inactive="Inactivo"
|
|||||||
AdvSceneSwitcher.running="Iniciar complemento"
|
AdvSceneSwitcher.running="Iniciar complemento"
|
||||||
AdvSceneSwitcher.stopped="Complemento de detención"
|
AdvSceneSwitcher.stopped="Complemento de detención"
|
||||||
|
|
||||||
AdvSceneSwitcher.firstBootMessage="<html><head/><body><p>Esta parece ser la primera vez que se inicia el conmutador de escena avanzado.<br>Por favor, eche un vistazo a <a href=\"https:/ /github.com/WarmUpTill/SceneSwitcher/wiki\"><span style=\" text-decoration: underline; color:#268bd2;\">Wiki</span></a> para obtener una lista de guías y ejemplos.<br>No dude en hacer preguntas en el complemento <a href=\"https://obsproject.com /forum/threads/advanced-scene-switcher.48264\"><span style=\" text-decoration: underline; color:#268bd2;\">hilo</span></a> en los foros de OBS!</p></body></html>"
|
|
||||||
|
|
||||||
AdvSceneSwitcher.deprecatedTabWarning="¡Se detuvo el desarrollo de esta pestaña!\nConsidere cambiar a macros en su lugar.\nEsta sugerencia se puede desactivar en la pestaña General".
|
AdvSceneSwitcher.deprecatedTabWarning="¡Se detuvo el desarrollo de esta pestaña!\nConsidere cambiar a macros en su lugar.\nEsta sugerencia se puede desactivar en la pestaña General".
|
||||||
|
|
||||||
AdvSceneSwitcher.unit.milliseconds="milisegundos"
|
AdvSceneSwitcher.unit.milliseconds="milisegundos"
|
||||||
|
|||||||
@@ -78,7 +78,6 @@ AdvSceneSwitcher.macroTab.add="Ajouter une nouvelle macro"
|
|||||||
AdvSceneSwitcher.macroTab.name="Nom :"
|
AdvSceneSwitcher.macroTab.name="Nom :"
|
||||||
AdvSceneSwitcher.macroTab.run="Exécuter la macro"
|
AdvSceneSwitcher.macroTab.run="Exécuter la macro"
|
||||||
AdvSceneSwitcher.macroTab.runInParallel="Exécuter la macro en parallèle avec d'autres macros"
|
AdvSceneSwitcher.macroTab.runInParallel="Exécuter la macro en parallèle avec d'autres macros"
|
||||||
AdvSceneSwitcher.macroTab.onChange="Exécuter des actions uniquement en cas de changement de condition"
|
|
||||||
AdvSceneSwitcher.macroTab.defaultname="Macro %1"
|
AdvSceneSwitcher.macroTab.defaultname="Macro %1"
|
||||||
AdvSceneSwitcher.macroTab.defaultGroupName="Groupe %1"
|
AdvSceneSwitcher.macroTab.defaultGroupName="Groupe %1"
|
||||||
AdvSceneSwitcher.macroTab.removeSingleMacroPopup.text="Êtes-vous sûr de vouloir supprimer \"%1\" ?"
|
AdvSceneSwitcher.macroTab.removeSingleMacroPopup.text="Êtes-vous sûr de vouloir supprimer \"%1\" ?"
|
||||||
@@ -132,7 +131,6 @@ AdvSceneSwitcher.macroList.deleted="supprimé"
|
|||||||
AdvSceneSwitcher.macroList.duplicate="\"%1\" est déjà sélectionné !"
|
AdvSceneSwitcher.macroList.duplicate="\"%1\" est déjà sélectionné !"
|
||||||
|
|
||||||
; Macro Logic
|
; Macro Logic
|
||||||
AdvSceneSwitcher.logic.none="Ignorer l'entrée"
|
|
||||||
AdvSceneSwitcher.logic.and="Et"
|
AdvSceneSwitcher.logic.and="Et"
|
||||||
AdvSceneSwitcher.logic.or="Ou"
|
AdvSceneSwitcher.logic.or="Ou"
|
||||||
AdvSceneSwitcher.logic.andNot="Et pas"
|
AdvSceneSwitcher.logic.andNot="Et pas"
|
||||||
@@ -188,8 +186,6 @@ AdvSceneSwitcher.condition.file="Fichier"
|
|||||||
AdvSceneSwitcher.condition.file.type.match="correspond à"
|
AdvSceneSwitcher.condition.file.type.match="correspond à"
|
||||||
AdvSceneSwitcher.condition.file.type.contentChange="a changé de contenu"
|
AdvSceneSwitcher.condition.file.type.contentChange="a changé de contenu"
|
||||||
AdvSceneSwitcher.condition.file.type.dateChange="a changé de date de modification"
|
AdvSceneSwitcher.condition.file.type.dateChange="a changé de date de modification"
|
||||||
AdvSceneSwitcher.condition.file.remote="Fichier distant"
|
|
||||||
AdvSceneSwitcher.condition.file.local="Fichier local"
|
|
||||||
AdvSceneSwitcher.condition.media="Média"
|
AdvSceneSwitcher.condition.media="Média"
|
||||||
AdvSceneSwitcher.condition.media.source="Source"
|
AdvSceneSwitcher.condition.media.source="Source"
|
||||||
AdvSceneSwitcher.condition.media.anyOnScene="Toute source média sur la scène"
|
AdvSceneSwitcher.condition.media.anyOnScene="Toute source média sur la scène"
|
||||||
@@ -282,8 +278,8 @@ AdvSceneSwitcher.condition.record.state.start="Enregistrement en cours"
|
|||||||
AdvSceneSwitcher.condition.record.state.pause="Enregistrement en pause"
|
AdvSceneSwitcher.condition.record.state.pause="Enregistrement en pause"
|
||||||
AdvSceneSwitcher.condition.record.state.stop="Arrêt de l'enregistrement"
|
AdvSceneSwitcher.condition.record.state.stop="Arrêt de l'enregistrement"
|
||||||
AdvSceneSwitcher.condition.process="Processus"
|
AdvSceneSwitcher.condition.process="Processus"
|
||||||
AdvSceneSwitcher.condition.process.entry="{{processes}}{{regex}}en cours d'exécution{{focused}}et est au premier plan"
|
AdvSceneSwitcher.condition.process.layout="{{processes}}{{regex}}en cours d'exécution{{focused}}et est au premier plan"
|
||||||
AdvSceneSwitcher.condition.process.entry.focus="Processus au premier plan actuel :{{focusProcess}}"
|
AdvSceneSwitcher.condition.process.layout.focus="Processus au premier plan actuel :{{focusProcess}}"
|
||||||
AdvSceneSwitcher.condition.idle="Inactif"
|
AdvSceneSwitcher.condition.idle="Inactif"
|
||||||
AdvSceneSwitcher.condition.idle.entry="Aucune entrée de clavier ou de souris pendant{{duration}}"
|
AdvSceneSwitcher.condition.idle.entry="Aucune entrée de clavier ou de souris pendant{{duration}}"
|
||||||
AdvSceneSwitcher.condition.pluginState="État du plugin"
|
AdvSceneSwitcher.condition.pluginState="État du plugin"
|
||||||
@@ -554,7 +550,7 @@ AdvSceneSwitcher.action.macro="Macro"
|
|||||||
AdvSceneSwitcher.action.macro.type.pause="Pause"
|
AdvSceneSwitcher.action.macro.type.pause="Pause"
|
||||||
AdvSceneSwitcher.action.macro.type.unpause="Reprendre"
|
AdvSceneSwitcher.action.macro.type.unpause="Reprendre"
|
||||||
AdvSceneSwitcher.action.macro.type.resetCounter="Réinitialiser le compteur"
|
AdvSceneSwitcher.action.macro.type.resetCounter="Réinitialiser le compteur"
|
||||||
AdvSceneSwitcher.action.macro.type.run="Exécuter les actions"
|
AdvSceneSwitcher.action.macro.type.runActions="Exécuter les actions"
|
||||||
AdvSceneSwitcher.action.macro.type.stop="Arrêter les actions"
|
AdvSceneSwitcher.action.macro.type.stop="Arrêter les actions"
|
||||||
AdvSceneSwitcher.action.macro.type.disableAction="Désactiver l'action"
|
AdvSceneSwitcher.action.macro.type.disableAction="Désactiver l'action"
|
||||||
AdvSceneSwitcher.action.macro.type.enableAction="Activer l'action"
|
AdvSceneSwitcher.action.macro.type.enableAction="Activer l'action"
|
||||||
@@ -623,9 +619,9 @@ AdvSceneSwitcher.action.transition.type.scene="Transition de scène"
|
|||||||
AdvSceneSwitcher.action.transition.type.sceneOverride="Remplacement de la transition de scène"
|
AdvSceneSwitcher.action.transition.type.sceneOverride="Remplacement de la transition de scène"
|
||||||
AdvSceneSwitcher.action.transition.type.sourceShow="Transition d'affichage de la source"
|
AdvSceneSwitcher.action.transition.type.sourceShow="Transition d'affichage de la source"
|
||||||
AdvSceneSwitcher.action.transition.type.sourceHide="Transition de masquage de la source"
|
AdvSceneSwitcher.action.transition.type.sourceHide="Transition de masquage de la source"
|
||||||
AdvSceneSwitcher.action.transition.entry.line1="Modifier{{type}}{{scenes}}{{sources}}"
|
AdvSceneSwitcher.action.transition.layout.type="Modifier{{type}}{{scenes}}{{sources}}"
|
||||||
AdvSceneSwitcher.action.transition.entry.line2="{{setTransition}}Définir le type de transition sur{{transitions}}"
|
AdvSceneSwitcher.action.transition.layout.transition="{{setTransition}}Définir le type de transition sur{{transitions}}"
|
||||||
AdvSceneSwitcher.action.transition.entry.line3="{{setDuration}}Définir la durée de la transition à{{duration}}secondes"
|
AdvSceneSwitcher.action.transition.layout.duration="{{setDuration}}Définir la durée de la transition à{{duration}}secondes"
|
||||||
AdvSceneSwitcher.action.timer="Minuterie"
|
AdvSceneSwitcher.action.timer="Minuterie"
|
||||||
AdvSceneSwitcher.action.timer.type.pause="Mettre en pause"
|
AdvSceneSwitcher.action.timer.type.pause="Mettre en pause"
|
||||||
AdvSceneSwitcher.action.timer.type.continue="Continuer"
|
AdvSceneSwitcher.action.timer.type.continue="Continuer"
|
||||||
@@ -1123,8 +1119,6 @@ AdvSceneSwitcher.status.inactive="Inactif"
|
|||||||
AdvSceneSwitcher.running="Plugin en cours d'exécution"
|
AdvSceneSwitcher.running="Plugin en cours d'exécution"
|
||||||
AdvSceneSwitcher.stopped="Plugin arrêté"
|
AdvSceneSwitcher.stopped="Plugin arrêté"
|
||||||
|
|
||||||
AdvSceneSwitcher.firstBootMessage="<html><head/><body><p>Il semble que ce soit la première fois que l'Advanced Scene Switcher est démarré.<br>Veuillez consulter le <a href=\"https://github.com/WarmUpTill/SceneSwitcher/wiki\"><span style=\" text-decoration: underline; color:#268bd2;\">Wiki</span></a> pour obtenir une liste de guides et d'exemples.<br>N'hésitez pas à poser des questions dans le <a href=\"https://obsproject.com/forum/threads/advanced-scene-switcher.48264\"><span style=\" text-decoration: underline; color:#268bd2;\">fil de discussion</span></a> du plugin sur les forums OBS !</p></body></html>"
|
|
||||||
|
|
||||||
AdvSceneSwitcher.deprecatedTabWarning="Le développement de cet onglet est terminé !\nVeuillez envisager de passer à l'utilisation des Macros à la place.\nCette astuce peut être désactivée dans l'onglet Général."
|
AdvSceneSwitcher.deprecatedTabWarning="Le développement de cet onglet est terminé !\nVeuillez envisager de passer à l'utilisation des Macros à la place.\nCette astuce peut être désactivée dans l'onglet Général."
|
||||||
|
|
||||||
AdvSceneSwitcher.unit.milliseconds="millisecondes"
|
AdvSceneSwitcher.unit.milliseconds="millisecondes"
|
||||||
|
|||||||
@@ -164,7 +164,6 @@ AdvSceneSwitcher.macroTab.run.tooltip="条件に関係なくすべてのマク
|
|||||||
AdvSceneSwitcher.macroTab.runElse="マクロ実行(else)"
|
AdvSceneSwitcher.macroTab.runElse="マクロ実行(else)"
|
||||||
AdvSceneSwitcher.macroTab.runFail="\"%1\" の実行に失敗しました!\nいずれかのアクションが失敗したか、マクロがすでに実行されています。\n停止しますか?"
|
AdvSceneSwitcher.macroTab.runFail="\"%1\" の実行に失敗しました!\nいずれかのアクションが失敗したか、マクロがすでに実行されています。\n停止しますか?"
|
||||||
AdvSceneSwitcher.macroTab.runInParallel="他のマクロと並行してマクロを実行する"
|
AdvSceneSwitcher.macroTab.runInParallel="他のマクロと並行してマクロを実行する"
|
||||||
AdvSceneSwitcher.macroTab.onChange="条件変更時のみアクションを実行"
|
|
||||||
AdvSceneSwitcher.macroTab.defaultname="マクロ %1"
|
AdvSceneSwitcher.macroTab.defaultname="マクロ %1"
|
||||||
AdvSceneSwitcher.macroTab.defaultGroupName="グループ %1"
|
AdvSceneSwitcher.macroTab.defaultGroupName="グループ %1"
|
||||||
AdvSceneSwitcher.macroTab.macroNameExists="名前 \"%1\" は既にマクロで使用されています。"
|
AdvSceneSwitcher.macroTab.macroNameExists="名前 \"%1\" は既にマクロで使用されています。"
|
||||||
@@ -276,7 +275,6 @@ AdvSceneSwitcher.macroList.deleted="削除"
|
|||||||
AdvSceneSwitcher.macroList.duplicate="\"%1\" はすでに選択されています!"
|
AdvSceneSwitcher.macroList.duplicate="\"%1\" はすでに選択されています!"
|
||||||
|
|
||||||
# Macro Logic
|
# Macro Logic
|
||||||
AdvSceneSwitcher.logic.none="入力無視"
|
|
||||||
; AdvSceneSwitcher.logic.and="And"
|
; AdvSceneSwitcher.logic.and="And"
|
||||||
; AdvSceneSwitcher.logic.or="Or"
|
; AdvSceneSwitcher.logic.or="Or"
|
||||||
; AdvSceneSwitcher.logic.andNot="And not"
|
; AdvSceneSwitcher.logic.andNot="And not"
|
||||||
@@ -332,14 +330,6 @@ AdvSceneSwitcher.condition.window.entry.text="{{checkText}}ウィンドウにテ
|
|||||||
AdvSceneSwitcher.condition.window.entry.text.note="このオプションは、ウィンドウに表示されているすべてのテキストに対して機能するとは限りません。\nその場合は、代わりにビデオ条件 OCR チェックの使用を検討してください。"
|
AdvSceneSwitcher.condition.window.entry.text.note="このオプションは、ウィンドウに表示されているすべてのテキストに対して機能するとは限りません。\nその場合は、代わりにビデオ条件 OCR チェックの使用を検討してください。"
|
||||||
AdvSceneSwitcher.condition.window.entry.currentFocus="現在のフォーカスウィンドウ:{{focusWindow}}"
|
AdvSceneSwitcher.condition.window.entry.currentFocus="現在のフォーカスウィンドウ:{{focusWindow}}"
|
||||||
AdvSceneSwitcher.condition.file="ファイル"
|
AdvSceneSwitcher.condition.file="ファイル"
|
||||||
; AdvSceneSwitcher.condition.file.type.match="matches"
|
|
||||||
AdvSceneSwitcher.condition.file.type.contentChange="内容変更しました"
|
|
||||||
AdvSceneSwitcher.condition.file.type.dateChange="更新日変更"
|
|
||||||
AdvSceneSwitcher.condition.file.remote="リモートファイル"
|
|
||||||
AdvSceneSwitcher.condition.file.local="ローカルファイル"
|
|
||||||
; AdvSceneSwitcher.condition.file.entry.line1="{{fileType}}{{filePath}}{{conditions}}{{useRegex}}"
|
|
||||||
; AdvSceneSwitcher.condition.file.entry.line2="{{matchText}}"
|
|
||||||
; AdvSceneSwitcher.condition.file.entry.line3="{{checkModificationDate}}{{checkFileContent}}"
|
|
||||||
; AdvSceneSwitcher.condition.media="Media"
|
; AdvSceneSwitcher.condition.media="Media"
|
||||||
AdvSceneSwitcher.condition.media.checkType.state="状態が一致"
|
AdvSceneSwitcher.condition.media.checkType.state="状態が一致"
|
||||||
AdvSceneSwitcher.condition.media.checkType.time="時間が一致"
|
AdvSceneSwitcher.condition.media.checkType.time="時間が一致"
|
||||||
@@ -454,8 +444,8 @@ AdvSceneSwitcher.condition.stream.service.tooltip="現在のサービス名: %1"
|
|||||||
AdvSceneSwitcher.condition.record.state.duration="録音時間が長くなっています。"
|
AdvSceneSwitcher.condition.record.state.duration="録音時間が長くなっています。"
|
||||||
; AdvSceneSwitcher.condition.record.entry="{{condition}}{{duration}}"
|
; AdvSceneSwitcher.condition.record.entry="{{condition}}{{duration}}"
|
||||||
AdvSceneSwitcher.condition.process="プロセス"
|
AdvSceneSwitcher.condition.process="プロセス"
|
||||||
AdvSceneSwitcher.condition.process.entry="{{processes}}{{regex}}が実行中{{focused}}に集中しています"
|
AdvSceneSwitcher.condition.process.layout="{{processes}}{{regex}}が実行中{{focused}}に集中しています"
|
||||||
AdvSceneSwitcher.condition.process.entry.focus="現在のフォアグラウンドプロセス:{{focusProcess}}"
|
AdvSceneSwitcher.condition.process.layout.focus="現在のフォアグラウンドプロセス:{{focusProcess}}"
|
||||||
AdvSceneSwitcher.condition.idle="アイドル"
|
AdvSceneSwitcher.condition.idle="アイドル"
|
||||||
AdvSceneSwitcher.condition.idle.entry="{{duration}}の間、キーボードまたはマウスの入力がありません"
|
AdvSceneSwitcher.condition.idle.entry="{{duration}}の間、キーボードまたはマウスの入力がありません"
|
||||||
AdvSceneSwitcher.condition.pluginState="プラグインの状態"
|
AdvSceneSwitcher.condition.pluginState="プラグインの状態"
|
||||||
@@ -932,7 +922,7 @@ AdvSceneSwitcher.action.macro.type.pause="一時停止"
|
|||||||
AdvSceneSwitcher.action.macro.type.unpause="一時停止解除"
|
AdvSceneSwitcher.action.macro.type.unpause="一時停止解除"
|
||||||
AdvSceneSwitcher.action.macro.type.togglePause="一時停止を切り替え"
|
AdvSceneSwitcher.action.macro.type.togglePause="一時停止を切り替え"
|
||||||
AdvSceneSwitcher.action.macro.type.resetCounter="カウンターリセット"
|
AdvSceneSwitcher.action.macro.type.resetCounter="カウンターリセット"
|
||||||
AdvSceneSwitcher.action.macro.type.run="マクロを実行"
|
AdvSceneSwitcher.action.macro.type.runActions="マクロを実行"
|
||||||
AdvSceneSwitcher.action.macro.type.run.conditions.ignore="条件の状態を考慮しない"
|
AdvSceneSwitcher.action.macro.type.run.conditions.ignore="条件の状態を考慮しない"
|
||||||
AdvSceneSwitcher.action.macro.type.run.conditions.true="条件が true と評価された場合のみ"
|
AdvSceneSwitcher.action.macro.type.run.conditions.true="条件が true と評価された場合のみ"
|
||||||
AdvSceneSwitcher.action.macro.type.run.conditions.false="条件が false と評価された場合のみ"
|
AdvSceneSwitcher.action.macro.type.run.conditions.false="条件が false と評価された場合のみ"
|
||||||
@@ -1021,9 +1011,9 @@ AdvSceneSwitcher.action.transition="トランジション"
|
|||||||
; AdvSceneSwitcher.action.transition.type.sceneOverride="シーントランジションオーバーライド"
|
; AdvSceneSwitcher.action.transition.type.sceneOverride="シーントランジションオーバーライド"
|
||||||
; AdvSceneSwitcher.action.transition.type.sourceShow="ソース表示トランジション"
|
; AdvSceneSwitcher.action.transition.type.sourceShow="ソース表示トランジション"
|
||||||
; AdvSceneSwitcher.action.transition.type.sourceHide="ソース非表示トランジション"
|
; AdvSceneSwitcher.action.transition.type.sourceHide="ソース非表示トランジション"
|
||||||
; AdvSceneSwitcher.action.transition.entry.line1="{{type}}{{scenes}}{{sources}} の変更"
|
; AdvSceneSwitcher.action.transition.layout.type="{{type}}{{scenes}}{{sources}} の変更"
|
||||||
AdvSceneSwitcher.action.transition.entry.line2="{{setTransition}}トランジションタイプを{{transitions}}に設定します"
|
AdvSceneSwitcher.action.transition.layout.transition="{{setTransition}}トランジションタイプを{{transitions}}に設定します"
|
||||||
AdvSceneSwitcher.action.transition.entry.line3="{{setDuration}}移行時間を {{duration}} 秒に設定します"
|
AdvSceneSwitcher.action.transition.layout.duration="{{setDuration}}移行時間を {{duration}} 秒に設定します"
|
||||||
AdvSceneSwitcher.action.timer="タイマー"
|
AdvSceneSwitcher.action.timer="タイマー"
|
||||||
AdvSceneSwitcher.action.timer.type.pause="一時停止"
|
AdvSceneSwitcher.action.timer.type.pause="一時停止"
|
||||||
AdvSceneSwitcher.action.timer.type.continue="続行"
|
AdvSceneSwitcher.action.timer.type.continue="続行"
|
||||||
@@ -1191,8 +1181,15 @@ AdvSceneSwitcher.action.twitch.reward.toggleControl="リワード名/変数選
|
|||||||
AdvSceneSwitcher.action.twitch.categorySelectionDisabled="Twitchアカウントを選択しないとカテゴリを選択できません!"
|
AdvSceneSwitcher.action.twitch.categorySelectionDisabled="Twitchアカウントを選択しないとカテゴリを選択できません!"
|
||||||
; AdvSceneSwitcher.action.twitch.layout.default="On{{account}}{{actions}}{{streamTitle}}{{category}}{{markerDescription}}{{clipHasDelay}}{{duration}}{{announcementColor}}{{channel}}"
|
; AdvSceneSwitcher.action.twitch.layout.default="On{{account}}{{actions}}{{streamTitle}}{{category}}{{markerDescription}}{{clipHasDelay}}{{duration}}{{announcementColor}}{{channel}}"
|
||||||
AdvSceneSwitcher.action.twitch.layout.chat="{{channel}}でアカウント{{account}}{{actions}}を使用しています"
|
AdvSceneSwitcher.action.twitch.layout.chat="{{channel}}でアカウント{{account}}{{actions}}を使用しています"
|
||||||
AdvSceneSwitcher.action.twitch.layout.user.getInfo="{{userInfoQueryType}}{{userLogin}}{{userId}}でアカウント{{account}}{{actions}}を使用"
|
AdvSceneSwitcher.action.twitch.layout.channel.getInfo="チャンネル{{channel}}でアカウント{{account}}{{actions}}を使用"
|
||||||
AdvSceneSwitcher.action.twitch.layout.reward.getInfo="チャンネル{{channel}}{{pointsReward}}{{rewardVariable}}{{toggleRewardSelection}}でアカウント{{account}}{{actions}}を使用"
|
AdvSceneSwitcher.action.twitch.layout.user.getInfo.row1="アカウント{{account}}{{actions}}を使用"
|
||||||
|
AdvSceneSwitcher.action.twitch.layout.user.getInfo.row2="{{userInfoQueryType}}{{userLogin}}{{userId}}"
|
||||||
|
AdvSceneSwitcher.action.twitch.layout.user.moderation.row1="アカウント{{account}}{{actions}}を使用"
|
||||||
|
AdvSceneSwitcher.action.twitch.layout.user.moderation.row2="チャンネル{{channel}}{{userInfoQueryType}}{{userLogin}}{{userId}}"
|
||||||
|
AdvSceneSwitcher.action.twitch.layout.user.ban.row1="アカウント{{account}}{{actions}}を使用 タイムアウト{{duration}}"
|
||||||
|
AdvSceneSwitcher.action.twitch.layout.user.ban.row2="チャンネル{{channel}}{{userInfoQueryType}}{{userLogin}}{{userId}} 理由{{banReason}}"
|
||||||
|
AdvSceneSwitcher.action.twitch.layout.reward.getInfo.row1="チャンネル{{channel}}でアカウント{{account}}{{actions}}を使用"
|
||||||
|
AdvSceneSwitcher.action.twitch.layout.reward.getInfo.row2="{{pointsReward}}{{rewardVariable}}{{toggleRewardSelection}}"
|
||||||
AdvSceneSwitcher.action.twitch.title.title="タイトルを入力"
|
AdvSceneSwitcher.action.twitch.title.title="タイトルを入力"
|
||||||
AdvSceneSwitcher.action.twitch.marker.description="マーカーの説明"
|
AdvSceneSwitcher.action.twitch.marker.description="マーカーの説明"
|
||||||
AdvSceneSwitcher.action.twitch.clip.hasDelay="クリップをキャプチャする前にわずかな遅延を追加します"
|
AdvSceneSwitcher.action.twitch.clip.hasDelay="クリップをキャプチャする前にわずかな遅延を追加します"
|
||||||
@@ -2252,8 +2249,6 @@ AdvSceneSwitcher.status.inactive="停止中"
|
|||||||
AdvSceneSwitcher.running="プラグイン実行中"
|
AdvSceneSwitcher.running="プラグイン実行中"
|
||||||
AdvSceneSwitcher.stopped="プラグイン停止しました"
|
AdvSceneSwitcher.stopped="プラグイン停止しました"
|
||||||
|
|
||||||
AdvSceneSwitcher.firstBootMessage="<html><head/><body><p>高機能シーンスイッチャーが初めて起動したようです。<br>ガイドと使用例については <a href=\"https://github.com/WarmUpTill/SceneSwitcher/wiki\"><span style=\" text-decoration: underline; color:#268bd2;\">Wiki</span></a> をご覧ください。<br>質問は <a href=\"https://obsproject.com/forum/threads/advanced-scene-switcher.48264\"><span style=\" text-decoration: underline; color:#268bd2;\">OBSフォーラムのプラグインのスレッド</span></a> で遠慮なくどうぞ!</p></body></html>"
|
|
||||||
|
|
||||||
AdvSceneSwitcher.deprecatedTabWarning="このタブの開発は停止しました!\n代わりにマクロの使用に移行することを検討してください。\nこのヒントは [全般] タブで無効にすることができます。"
|
AdvSceneSwitcher.deprecatedTabWarning="このタブの開発は停止しました!\n代わりにマクロの使用に移行することを検討してください。\nこのヒントは [全般] タブで無効にすることができます。"
|
||||||
|
|
||||||
AdvSceneSwitcher.unit.milliseconds="ミリ秒"
|
AdvSceneSwitcher.unit.milliseconds="ミリ秒"
|
||||||
|
|||||||
@@ -147,7 +147,6 @@ AdvSceneSwitcher.macroTab.run.tooltip="Execute todas as ações da macro indepen
|
|||||||
AdvSceneSwitcher.macroTab.runElse="Executar macro (alternativa)"
|
AdvSceneSwitcher.macroTab.runElse="Executar macro (alternativa)"
|
||||||
AdvSceneSwitcher.macroTab.runFail="Falha ao executar \"%1\"!\nUma das ações falhou ou a macro já está em execução.\nDeseja interrompê-la?"
|
AdvSceneSwitcher.macroTab.runFail="Falha ao executar \"%1\"!\nUma das ações falhou ou a macro já está em execução.\nDeseja interrompê-la?"
|
||||||
AdvSceneSwitcher.macroTab.runInParallel="Executar macro em paralelo com outras macros"
|
AdvSceneSwitcher.macroTab.runInParallel="Executar macro em paralelo com outras macros"
|
||||||
AdvSceneSwitcher.macroTab.onChange="Executar ações apenas quando houver mudança na condição"
|
|
||||||
AdvSceneSwitcher.macroTab.defaultname="Macro %1"
|
AdvSceneSwitcher.macroTab.defaultname="Macro %1"
|
||||||
AdvSceneSwitcher.macroTab.defaultGroupName="Grupo %1"
|
AdvSceneSwitcher.macroTab.defaultGroupName="Grupo %1"
|
||||||
AdvSceneSwitcher.macroTab.macroNameExists="O nome \"%1\" já está em uso por uma macro."
|
AdvSceneSwitcher.macroTab.macroNameExists="O nome \"%1\" já está em uso por uma macro."
|
||||||
@@ -240,7 +239,6 @@ AdvSceneSwitcher.macroList.deleted="excluída"
|
|||||||
AdvSceneSwitcher.macroList.duplicate="\"%1\" já está selecionada!"
|
AdvSceneSwitcher.macroList.duplicate="\"%1\" já está selecionada!"
|
||||||
|
|
||||||
; Macro Logic
|
; Macro Logic
|
||||||
AdvSceneSwitcher.logic.none="Ignorar entrada"
|
|
||||||
AdvSceneSwitcher.logic.and="E"
|
AdvSceneSwitcher.logic.and="E"
|
||||||
AdvSceneSwitcher.logic.or="Ou"
|
AdvSceneSwitcher.logic.or="Ou"
|
||||||
AdvSceneSwitcher.logic.andNot="E não"
|
AdvSceneSwitcher.logic.andNot="E não"
|
||||||
@@ -296,11 +294,6 @@ AdvSceneSwitcher.condition.file="Arquivo"
|
|||||||
AdvSceneSwitcher.condition.file.type.match="corresponde"
|
AdvSceneSwitcher.condition.file.type.match="corresponde"
|
||||||
AdvSceneSwitcher.condition.file.type.contentChange="conteúdo mudou"
|
AdvSceneSwitcher.condition.file.type.contentChange="conteúdo mudou"
|
||||||
AdvSceneSwitcher.condition.file.type.dateChange="data de modificação mudou"
|
AdvSceneSwitcher.condition.file.type.dateChange="data de modificação mudou"
|
||||||
AdvSceneSwitcher.condition.file.remote="Arquivo remoto"
|
|
||||||
AdvSceneSwitcher.condition.file.local="Arquivo local"
|
|
||||||
AdvSceneSwitcher.condition.file.entry.line1="{{fileType}}{{filePath}}{{conditions}}{{useRegex}}"
|
|
||||||
AdvSceneSwitcher.condition.file.entry.line2="{{matchText}}"
|
|
||||||
AdvSceneSwitcher.condition.file.entry.line3="{{checkModificationDate}}{{checkFileContent}}"
|
|
||||||
AdvSceneSwitcher.condition.media="Mídia"
|
AdvSceneSwitcher.condition.media="Mídia"
|
||||||
AdvSceneSwitcher.condition.media.checkType.state="Estado corresponde"
|
AdvSceneSwitcher.condition.media.checkType.state="Estado corresponde"
|
||||||
AdvSceneSwitcher.condition.media.checkType.time="Restrição de tempo corresponde"
|
AdvSceneSwitcher.condition.media.checkType.time="Restrição de tempo corresponde"
|
||||||
@@ -401,8 +394,8 @@ AdvSceneSwitcher.condition.record.state.stop="Gravação parada"
|
|||||||
AdvSceneSwitcher.condition.record.state.duration="Duração da gravação é maior que"
|
AdvSceneSwitcher.condition.record.state.duration="Duração da gravação é maior que"
|
||||||
AdvSceneSwitcher.condition.record.entry="{{condition}}{{duration}}"
|
AdvSceneSwitcher.condition.record.entry="{{condition}}{{duration}}"
|
||||||
AdvSceneSwitcher.condition.process="Processo"
|
AdvSceneSwitcher.condition.process="Processo"
|
||||||
AdvSceneSwitcher.condition.process.entry="{{processes}}{{regex}}está em execução{{focused}}e está em foco"
|
AdvSceneSwitcher.condition.process.layout="{{processes}}{{regex}}está em execução{{focused}}e está em foco"
|
||||||
AdvSceneSwitcher.condition.process.entry.focus="Processo atual em primeiro plano:{{focusProcess}}"
|
AdvSceneSwitcher.condition.process.layout.focus="Processo atual em primeiro plano:{{focusProcess}}"
|
||||||
AdvSceneSwitcher.condition.idle="Inativo"
|
AdvSceneSwitcher.condition.idle="Inativo"
|
||||||
AdvSceneSwitcher.condition.idle.entry="Sem entradas de teclado ou mouse por {{duration}}"
|
AdvSceneSwitcher.condition.idle.entry="Sem entradas de teclado ou mouse por {{duration}}"
|
||||||
AdvSceneSwitcher.condition.pluginState="Estado do plugin"
|
AdvSceneSwitcher.condition.pluginState="Estado do plugin"
|
||||||
@@ -755,7 +748,6 @@ AdvSceneSwitcher.action.recording.type.changeOutputFolder="Alterar pasta de saí
|
|||||||
AdvSceneSwitcher.action.recording.type.changeOutputFileFormat="Alterar formatação do nome do arquivo"
|
AdvSceneSwitcher.action.recording.type.changeOutputFileFormat="Alterar formatação do nome do arquivo"
|
||||||
AdvSceneSwitcher.action.recording.pause.hint="Observe que dependendo das suas configurações de gravação, você pode não conseguir pausar a gravação"
|
AdvSceneSwitcher.action.recording.pause.hint="Observe que dependendo das suas configurações de gravação, você pode não conseguir pausar a gravação"
|
||||||
AdvSceneSwitcher.action.recording.split.hint="Certifique-se de habilitar a divisão automática de arquivos nas configurações do OBS primeiro!"
|
AdvSceneSwitcher.action.recording.split.hint="Certifique-se de habilitar a divisão automática de arquivos nas configurações do OBS primeiro!"
|
||||||
AdvSceneSwitcher.action.recording.entry="{{actions}}{{recordFolder}}{{recordFileFormat}}{{pauseHint}}{{splitHint}}"
|
|
||||||
AdvSceneSwitcher.action.replay="Buffer de replay"
|
AdvSceneSwitcher.action.replay="Buffer de replay"
|
||||||
AdvSceneSwitcher.action.replay.saveWarn="Aviso: Salvar com muita frequência pode resultar em o buffer de replay não ser realmente salvo!"
|
AdvSceneSwitcher.action.replay.saveWarn="Aviso: Salvar com muita frequência pode resultar em o buffer de replay não ser realmente salvo!"
|
||||||
AdvSceneSwitcher.action.replay.durationWarn="Aviso: Alterar o tempo máximo de replay só se aplicará na próxima vez que o buffer de replay for iniciado!"
|
AdvSceneSwitcher.action.replay.durationWarn="Aviso: Alterar o tempo máximo de replay só se aplicará na próxima vez que o buffer de replay for iniciado!"
|
||||||
@@ -772,7 +764,6 @@ AdvSceneSwitcher.action.streaming.type.server="Definir URL do servidor"
|
|||||||
AdvSceneSwitcher.action.streaming.type.streamKey="Definir chave de transmissão"
|
AdvSceneSwitcher.action.streaming.type.streamKey="Definir chave de transmissão"
|
||||||
AdvSceneSwitcher.action.streaming.type.username="Definir nome de usuário"
|
AdvSceneSwitcher.action.streaming.type.username="Definir nome de usuário"
|
||||||
AdvSceneSwitcher.action.streaming.type.password="Definir senha"
|
AdvSceneSwitcher.action.streaming.type.password="Definir senha"
|
||||||
AdvSceneSwitcher.action.streaming.entry="{{actions}}{{keyFrameInterval}}{{stringValue}}{{showPassword}}"
|
|
||||||
AdvSceneSwitcher.action.run="Executar"
|
AdvSceneSwitcher.action.run="Executar"
|
||||||
AdvSceneSwitcher.action.run.wait.entry="{{wait}}Aguardar a saída do processo ou no máximo {{timeout}}{{waitHelp}}"
|
AdvSceneSwitcher.action.run.wait.entry="{{wait}}Aguardar a saída do processo ou no máximo {{timeout}}{{waitHelp}}"
|
||||||
AdvSceneSwitcher.action.run.wait.help.tooltip="Observe que as propriedades da macro não funcionarão se você deixar isso desmarcado, pois o processo é iniciado de forma independente do restante da lógica e não há controle sobre ele."
|
AdvSceneSwitcher.action.run.wait.help.tooltip="Observe que as propriedades da macro não funcionarão se você deixar isso desmarcado, pois o processo é iniciado de forma independente do restante da lógica e não há controle sobre ele."
|
||||||
@@ -847,7 +838,7 @@ AdvSceneSwitcher.action.macro="Macro"
|
|||||||
AdvSceneSwitcher.action.macro.type.pause="Pausar"
|
AdvSceneSwitcher.action.macro.type.pause="Pausar"
|
||||||
AdvSceneSwitcher.action.macro.type.unpause="Retomar"
|
AdvSceneSwitcher.action.macro.type.unpause="Retomar"
|
||||||
AdvSceneSwitcher.action.macro.type.resetCounter="Reiniciar contador"
|
AdvSceneSwitcher.action.macro.type.resetCounter="Reiniciar contador"
|
||||||
AdvSceneSwitcher.action.macro.type.run="Executar macro"
|
AdvSceneSwitcher.action.macro.type.runActions="Executar macro"
|
||||||
AdvSceneSwitcher.action.macro.type.run.conditions.ignore="Não considerar o estado da condição"
|
AdvSceneSwitcher.action.macro.type.run.conditions.ignore="Não considerar o estado da condição"
|
||||||
AdvSceneSwitcher.action.macro.type.run.conditions.true="Apenas se as condições forem verdadeiras"
|
AdvSceneSwitcher.action.macro.type.run.conditions.true="Apenas se as condições forem verdadeiras"
|
||||||
AdvSceneSwitcher.action.macro.type.run.conditions.false="Apenas se as condições forem falsas"
|
AdvSceneSwitcher.action.macro.type.run.conditions.false="Apenas se as condições forem falsas"
|
||||||
@@ -934,9 +925,9 @@ AdvSceneSwitcher.action.transition.type.scene="transição de cena"
|
|||||||
AdvSceneSwitcher.action.transition.type.sceneOverride="substituição de transição de cena"
|
AdvSceneSwitcher.action.transition.type.sceneOverride="substituição de transição de cena"
|
||||||
AdvSceneSwitcher.action.transition.type.sourceShow="transição de exibição de fonte"
|
AdvSceneSwitcher.action.transition.type.sourceShow="transição de exibição de fonte"
|
||||||
AdvSceneSwitcher.action.transition.type.sourceHide="transição de ocultação de fonte"
|
AdvSceneSwitcher.action.transition.type.sourceHide="transição de ocultação de fonte"
|
||||||
AdvSceneSwitcher.action.transition.entry.line1="Modificar{{type}}{{scenes}}{{sources}}"
|
AdvSceneSwitcher.action.transition.layout.type="Modificar{{type}}{{scenes}}{{sources}}"
|
||||||
AdvSceneSwitcher.action.transition.entry.line2="{{setTransition}}Definir tipo de transição para{{transitions}}"
|
AdvSceneSwitcher.action.transition.layout.transition="{{setTransition}}Definir tipo de transição para{{transitions}}"
|
||||||
AdvSceneSwitcher.action.transition.entry.line3="{{setDuration}}Definir duração da transição para{{duration}}segundos"
|
AdvSceneSwitcher.action.transition.layout.duration="{{setDuration}}Definir duração da transição para{{duration}}segundos"
|
||||||
AdvSceneSwitcher.action.timer="Temporizador"
|
AdvSceneSwitcher.action.timer="Temporizador"
|
||||||
AdvSceneSwitcher.action.timer.type.pause="Pausar"
|
AdvSceneSwitcher.action.timer.type.pause="Pausar"
|
||||||
AdvSceneSwitcher.action.timer.type.continue="Continuar"
|
AdvSceneSwitcher.action.timer.type.continue="Continuar"
|
||||||
@@ -1066,7 +1057,7 @@ AdvSceneSwitcher.action.twitch.type.chat.emoteOnly.enable="Habilitar modo apenas
|
|||||||
AdvSceneSwitcher.action.twitch.type.chat.emoteOnly.disable="Desabilitar modo apenas emotes no chat"
|
AdvSceneSwitcher.action.twitch.type.chat.emoteOnly.disable="Desabilitar modo apenas emotes no chat"
|
||||||
AdvSceneSwitcher.action.twitch.type.chat.sendMessage="Enviar mensagem de chat"
|
AdvSceneSwitcher.action.twitch.type.chat.sendMessage="Enviar mensagem de chat"
|
||||||
AdvSceneSwitcher.action.twitch.categorySelectionDisabled="Não é possível selecionar categoria sem selecionar uma conta Twitch primeiro!"
|
AdvSceneSwitcher.action.twitch.categorySelectionDisabled="Não é possível selecionar categoria sem selecionar uma conta Twitch primeiro!"
|
||||||
AdvSceneSwitcher.action.twitch.layout.default="Em{{account}}{{actions}}{{streamTitle}}{{category}}{{markerDescription}}{{clipHasDelay}}{{duration}}{{announcementColor}}{{channel}}{{pointsReward}}"
|
AdvSceneSwitcher.action.twitch.layout.default="Em{{account}}{{actions}}{{streamTitle}}{{category}}{{markerDescription}}{{clipHasDelay}}{{duration}}{{announcementColor}}{{channel}}{{pointsReward}}{{nonModDelayDuration}}"
|
||||||
AdvSceneSwitcher.action.twitch.layout.chat="Usando conta{{account}}{{actions}}em{{channel}}"
|
AdvSceneSwitcher.action.twitch.layout.chat="Usando conta{{account}}{{actions}}em{{channel}}"
|
||||||
AdvSceneSwitcher.action.twitch.title.title="Digite o título"
|
AdvSceneSwitcher.action.twitch.title.title="Digite o título"
|
||||||
AdvSceneSwitcher.action.twitch.marker.description="Descreva o marcador"
|
AdvSceneSwitcher.action.twitch.marker.description="Descreva o marcador"
|
||||||
@@ -1872,8 +1863,6 @@ AdvSceneSwitcher.status.inactive="Inativo"
|
|||||||
AdvSceneSwitcher.running="Plugin em execução"
|
AdvSceneSwitcher.running="Plugin em execução"
|
||||||
AdvSceneSwitcher.stopped="Plugin parado"
|
AdvSceneSwitcher.stopped="Plugin parado"
|
||||||
|
|
||||||
AdvSceneSwitcher.firstBootMessage="<html><head/><body><p>Parece que esta é a primeira vez que o Advanced Scene Switcher está sendo iniciado.<br>Por favor, consulte o <a href=\"https://github.com/WarmUpTill/SceneSwitcher/wiki\"><span style=\" text-decoration: underline; color:#268bd2;\">Wiki</span></a> para uma lista de guias e exemplos.<br>Não hesite em fazer perguntas no <a href=\"https://obsproject.com/forum/threads/advanced-scene-switcher.48264\"><span style=\" text-decoration: underline; color:#268bd2;\">tópico</span></a> do plugin nos fóruns do OBS!</p></body></html>"
|
|
||||||
|
|
||||||
AdvSceneSwitcher.deprecatedTabWarning="Desenvolvimento para esta aba interrompido!\nPor favor, considere a transição para o uso de Macros em vez disso.\nEsta dica pode ser desativada na aba Geral."
|
AdvSceneSwitcher.deprecatedTabWarning="Desenvolvimento para esta aba interrompido!\nPor favor, considere a transição para o uso de Macros em vez disso.\nEsta dica pode ser desativada na aba Geral."
|
||||||
|
|
||||||
AdvSceneSwitcher.unit.milliseconds="milissegundos"
|
AdvSceneSwitcher.unit.milliseconds="milissegundos"
|
||||||
|
|||||||
@@ -70,7 +70,6 @@ AdvSceneSwitcher.macroTab.name="Имя:"
|
|||||||
AdvSceneSwitcher.macroTab.defaultname="Макрос %1"
|
AdvSceneSwitcher.macroTab.defaultname="Макрос %1"
|
||||||
AdvSceneSwitcher.macroTab.copy="Создать копию"
|
AdvSceneSwitcher.macroTab.copy="Создать копию"
|
||||||
; Macro Logic
|
; Macro Logic
|
||||||
AdvSceneSwitcher.logic.none="Игнорировать вход"
|
|
||||||
AdvSceneSwitcher.logic.and="И"
|
AdvSceneSwitcher.logic.and="И"
|
||||||
AdvSceneSwitcher.logic.or="Или"
|
AdvSceneSwitcher.logic.or="Или"
|
||||||
AdvSceneSwitcher.logic.andNot="И не"
|
AdvSceneSwitcher.logic.andNot="И не"
|
||||||
@@ -85,8 +84,6 @@ AdvSceneSwitcher.condition.scene.type.current="Текущий"
|
|||||||
AdvSceneSwitcher.condition.scene.type.previous="Предыдущий"
|
AdvSceneSwitcher.condition.scene.type.previous="Предыдущий"
|
||||||
AdvSceneSwitcher.condition.window="Окно"
|
AdvSceneSwitcher.condition.window="Окно"
|
||||||
AdvSceneSwitcher.condition.file="Файл"
|
AdvSceneSwitcher.condition.file="Файл"
|
||||||
AdvSceneSwitcher.condition.file.entry.line2="{{matchText}}"
|
|
||||||
AdvSceneSwitcher.condition.file.entry.line3="{{checkModificationDate}}{{checkFileContent}}"
|
|
||||||
AdvSceneSwitcher.condition.media="Медиа"
|
AdvSceneSwitcher.condition.media="Медиа"
|
||||||
AdvSceneSwitcher.condition.video="Видео"
|
AdvSceneSwitcher.condition.video="Видео"
|
||||||
AdvSceneSwitcher.condition.video.condition.match="точно соответствует"
|
AdvSceneSwitcher.condition.video.condition.match="точно соответствует"
|
||||||
@@ -105,7 +102,7 @@ AdvSceneSwitcher.condition.record.state.start="Запись запущена"
|
|||||||
AdvSceneSwitcher.condition.record.state.pause="Запись приостановлена"
|
AdvSceneSwitcher.condition.record.state.pause="Запись приостановлена"
|
||||||
AdvSceneSwitcher.condition.record.state.stop="Запись остановлена"
|
AdvSceneSwitcher.condition.record.state.stop="Запись остановлена"
|
||||||
AdvSceneSwitcher.condition.process="Процесс"
|
AdvSceneSwitcher.condition.process="Процесс"
|
||||||
AdvSceneSwitcher.condition.process.entry="{{processes}}{{regex}}запущен{{focused}}и сфокусирован"
|
AdvSceneSwitcher.condition.process.layout="{{processes}}{{regex}}запущен{{focused}}и сфокусирован"
|
||||||
AdvSceneSwitcher.condition.idle="Простой"
|
AdvSceneSwitcher.condition.idle="Простой"
|
||||||
AdvSceneSwitcher.condition.idle.entry="Не было ни клавиатуры, ни мыши в течении{{duration}}"
|
AdvSceneSwitcher.condition.idle.entry="Не было ни клавиатуры, ни мыши в течении{{duration}}"
|
||||||
AdvSceneSwitcher.condition.pluginState="Состояние плагина"
|
AdvSceneSwitcher.condition.pluginState="Состояние плагина"
|
||||||
@@ -130,7 +127,6 @@ AdvSceneSwitcher.action.recording.type.start="Начать запись"
|
|||||||
AdvSceneSwitcher.action.recording.type.pause="Пауза записи"
|
AdvSceneSwitcher.action.recording.type.pause="Пауза записи"
|
||||||
AdvSceneSwitcher.action.recording.type.unpause="Снять запись с паузы"
|
AdvSceneSwitcher.action.recording.type.unpause="Снять запись с паузы"
|
||||||
AdvSceneSwitcher.action.recording.pause.hint="Обратите внимание, что в зависимости от настроек записи вы можете не иметь возможности приостановить запись"
|
AdvSceneSwitcher.action.recording.pause.hint="Обратите внимание, что в зависимости от настроек записи вы можете не иметь возможности приостановить запись"
|
||||||
AdvSceneSwitcher.action.recording.entry="{{actions}}{{recordFolder}}{{recordFileFormat}}{{pauseHint}}{{splitHint}}"
|
|
||||||
AdvSceneSwitcher.action.replay="Буфер воспроизведения"
|
AdvSceneSwitcher.action.replay="Буфер воспроизведения"
|
||||||
AdvSceneSwitcher.action.replay.type.stop="Остановить буфер воспроизведения"
|
AdvSceneSwitcher.action.replay.type.stop="Остановить буфер воспроизведения"
|
||||||
AdvSceneSwitcher.action.replay.type.start="Начать воспроизведение буфера"
|
AdvSceneSwitcher.action.replay.type.start="Начать воспроизведение буфера"
|
||||||
@@ -138,7 +134,6 @@ AdvSceneSwitcher.action.replay.type.save="Сохранить буфер восп
|
|||||||
AdvSceneSwitcher.action.streaming="Потоковое вещание"
|
AdvSceneSwitcher.action.streaming="Потоковое вещание"
|
||||||
AdvSceneSwitcher.action.streaming.type.stop="Остановить потоковое вещание"
|
AdvSceneSwitcher.action.streaming.type.stop="Остановить потоковое вещание"
|
||||||
AdvSceneSwitcher.action.streaming.type.start="Начать потоковое вещание"
|
AdvSceneSwitcher.action.streaming.type.start="Начать потоковое вещание"
|
||||||
AdvSceneSwitcher.action.streaming.entry="{{actions}}{{keyFrameInterval}}{{stringValue}}{{showPassword}}"
|
|
||||||
AdvSceneSwitcher.action.run="Запустить"
|
AdvSceneSwitcher.action.run="Запустить"
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -72,14 +72,12 @@ AdvSceneSwitcher.macroTab.add="Yeni Makro ekle"
|
|||||||
AdvSceneSwitcher.macroTab.name="İsim:"
|
AdvSceneSwitcher.macroTab.name="İsim:"
|
||||||
AdvSceneSwitcher.macroTab.run="Makro Çalıştırma"
|
AdvSceneSwitcher.macroTab.run="Makro Çalıştırma"
|
||||||
AdvSceneSwitcher.macroTab.runInParallel="Makroyu diğer makrolara paralel olarak çalıştırın"
|
AdvSceneSwitcher.macroTab.runInParallel="Makroyu diğer makrolara paralel olarak çalıştırın"
|
||||||
AdvSceneSwitcher.macroTab.onChange="Eylemleri yalnızca koşul değişikliğinde gerçekleştirin"
|
|
||||||
AdvSceneSwitcher.macroTab.defaultname="Makro %1"
|
AdvSceneSwitcher.macroTab.defaultname="Makro %1"
|
||||||
AdvSceneSwitcher.macroTab.copy="Kopya oluştur"
|
AdvSceneSwitcher.macroTab.copy="Kopya oluştur"
|
||||||
AdvSceneSwitcher.macroTab.expandAll="Hepsini Genişlet"
|
AdvSceneSwitcher.macroTab.expandAll="Hepsini Genişlet"
|
||||||
AdvSceneSwitcher.macroTab.collapseAll="Hepsini Küçült"
|
AdvSceneSwitcher.macroTab.collapseAll="Hepsini Küçült"
|
||||||
|
|
||||||
; Macro Logic
|
; Macro Logic
|
||||||
AdvSceneSwitcher.logic.none="Girişi yoksay"
|
|
||||||
AdvSceneSwitcher.logic.and="Ve"
|
AdvSceneSwitcher.logic.and="Ve"
|
||||||
AdvSceneSwitcher.logic.or="Ya da"
|
AdvSceneSwitcher.logic.or="Ya da"
|
||||||
AdvSceneSwitcher.logic.andNot="ve değil"
|
AdvSceneSwitcher.logic.andNot="ve değil"
|
||||||
@@ -108,9 +106,7 @@ AdvSceneSwitcher.condition.scene.type.notChanged="Sahne değişmedi"
|
|||||||
AdvSceneSwitcher.condition.scene.currentSceneTransitionBehaviour="Geçiş hedefi sahnesi için geçiş kontrolü sırasında"
|
AdvSceneSwitcher.condition.scene.currentSceneTransitionBehaviour="Geçiş hedefi sahnesi için geçiş kontrolü sırasında"
|
||||||
AdvSceneSwitcher.condition.window="Pencere"
|
AdvSceneSwitcher.condition.window="Pencere"
|
||||||
AdvSceneSwitcher.condition.file="Dosya"
|
AdvSceneSwitcher.condition.file="Dosya"
|
||||||
AdvSceneSwitcher.condition.file.entry.line1="İçerik{{fileType}}{{filePath}}{{conditions}}{{useRegex}}"
|
AdvSceneSwitcher.condition.file.layout="İçerik{{filePath}}{{conditions}}{{regex}}"
|
||||||
AdvSceneSwitcher.condition.file.entry.line2="{{matchText}}"
|
|
||||||
AdvSceneSwitcher.condition.file.entry.line3="{{checkModificationDate}}{{checkFileContent}}"
|
|
||||||
AdvSceneSwitcher.condition.media="Medya"
|
AdvSceneSwitcher.condition.media="Medya"
|
||||||
AdvSceneSwitcher.condition.media.anyOnScene="Herhangi bir medya kaynağı"
|
AdvSceneSwitcher.condition.media.anyOnScene="Herhangi bir medya kaynağı"
|
||||||
AdvSceneSwitcher.condition.media.allOnScene="Tüm medya kaynakları "
|
AdvSceneSwitcher.condition.media.allOnScene="Tüm medya kaynakları "
|
||||||
@@ -153,7 +149,7 @@ AdvSceneSwitcher.condition.record.state.start="Kayıt Çalışıyor"
|
|||||||
AdvSceneSwitcher.condition.record.state.pause="Kayıt durakladı"
|
AdvSceneSwitcher.condition.record.state.pause="Kayıt durakladı"
|
||||||
AdvSceneSwitcher.condition.record.state.stop="Kayıt durdu"
|
AdvSceneSwitcher.condition.record.state.stop="Kayıt durdu"
|
||||||
AdvSceneSwitcher.condition.process="İşlem"
|
AdvSceneSwitcher.condition.process="İşlem"
|
||||||
AdvSceneSwitcher.condition.process.entry="{{processes}}{{regex}}çalışıyor{{focused}}ve odaklandı"
|
AdvSceneSwitcher.condition.process.layout="{{processes}}{{regex}}çalışıyor{{focused}}ve odaklandı"
|
||||||
AdvSceneSwitcher.condition.idle="Boşta"
|
AdvSceneSwitcher.condition.idle="Boşta"
|
||||||
AdvSceneSwitcher.condition.idle.entry="...için klavye veya fare girişi yok {{duration}}"
|
AdvSceneSwitcher.condition.idle.entry="...için klavye veya fare girişi yok {{duration}}"
|
||||||
AdvSceneSwitcher.condition.pluginState="Eklenti durumu"
|
AdvSceneSwitcher.condition.pluginState="Eklenti durumu"
|
||||||
@@ -266,7 +262,6 @@ AdvSceneSwitcher.action.recording.type.start="Kayıt Başlat"
|
|||||||
AdvSceneSwitcher.action.recording.type.pause="Kayıt Duraklat"
|
AdvSceneSwitcher.action.recording.type.pause="Kayıt Duraklat"
|
||||||
AdvSceneSwitcher.action.recording.type.unpause="Kayıt Duraklatma"
|
AdvSceneSwitcher.action.recording.type.unpause="Kayıt Duraklatma"
|
||||||
AdvSceneSwitcher.action.recording.pause.hint="Kayıt ayarlarınıza bağlı olarak kaydı duraklatamayabileceğinizi unutmayın."
|
AdvSceneSwitcher.action.recording.pause.hint="Kayıt ayarlarınıza bağlı olarak kaydı duraklatamayabileceğinizi unutmayın."
|
||||||
AdvSceneSwitcher.action.recording.entry="{{actions}}{{recordFolder}}{{recordFileFormat}}{{pauseHint}}{{splitHint}}"
|
|
||||||
AdvSceneSwitcher.action.replay="Tekrar arabelleği"
|
AdvSceneSwitcher.action.replay="Tekrar arabelleği"
|
||||||
AdvSceneSwitcher.action.replay.type.stop="Tekrar arabelleğini durdur"
|
AdvSceneSwitcher.action.replay.type.stop="Tekrar arabelleğini durdur"
|
||||||
AdvSceneSwitcher.action.replay.type.start="Tekrar arabelleğini başlat"
|
AdvSceneSwitcher.action.replay.type.start="Tekrar arabelleğini başlat"
|
||||||
@@ -274,7 +269,6 @@ AdvSceneSwitcher.action.replay.type.save="Tekrar arabelleğini kaydet"
|
|||||||
AdvSceneSwitcher.action.streaming="Yayın"
|
AdvSceneSwitcher.action.streaming="Yayın"
|
||||||
AdvSceneSwitcher.action.streaming.type.stop="Yayın durdur"
|
AdvSceneSwitcher.action.streaming.type.stop="Yayın durdur"
|
||||||
AdvSceneSwitcher.action.streaming.type.start="Yayın başlat"
|
AdvSceneSwitcher.action.streaming.type.start="Yayın başlat"
|
||||||
AdvSceneSwitcher.action.streaming.entry="{{actions}}{{keyFrameInterval}}{{stringValue}}{{showPassword}}"
|
|
||||||
AdvSceneSwitcher.action.run="Çalıştır"
|
AdvSceneSwitcher.action.run="Çalıştır"
|
||||||
AdvSceneSwitcher.action.sceneVisibility="Sahne öğesi görünürlüğü"
|
AdvSceneSwitcher.action.sceneVisibility="Sahne öğesi görünürlüğü"
|
||||||
AdvSceneSwitcher.action.sceneVisibility.type.show="Göster"
|
AdvSceneSwitcher.action.sceneVisibility.type.show="Göster"
|
||||||
@@ -305,7 +299,7 @@ AdvSceneSwitcher.action.macro="Makro"
|
|||||||
AdvSceneSwitcher.action.macro.type.pause="Duraklat"
|
AdvSceneSwitcher.action.macro.type.pause="Duraklat"
|
||||||
AdvSceneSwitcher.action.macro.type.unpause="Duraklatma"
|
AdvSceneSwitcher.action.macro.type.unpause="Duraklatma"
|
||||||
AdvSceneSwitcher.action.macro.type.resetCounter="Sayacı sıfırla"
|
AdvSceneSwitcher.action.macro.type.resetCounter="Sayacı sıfırla"
|
||||||
AdvSceneSwitcher.action.macro.type.run="Çalıştır"
|
AdvSceneSwitcher.action.macro.type.runActions="Çalıştır"
|
||||||
AdvSceneSwitcher.action.pluginState="Eklenti durumu"
|
AdvSceneSwitcher.action.pluginState="Eklenti durumu"
|
||||||
AdvSceneSwitcher.action.pluginState.type.stop="Advanced Scene Switcher eklentisini durdurun"
|
AdvSceneSwitcher.action.pluginState.type.stop="Advanced Scene Switcher eklentisini durdurun"
|
||||||
AdvSceneSwitcher.action.pluginState.type.noMatch="Eşleşmeme davranışını değiştirin:"
|
AdvSceneSwitcher.action.pluginState.type.noMatch="Eşleşmeme davranışını değiştirin:"
|
||||||
@@ -342,8 +336,8 @@ AdvSceneSwitcher.action.file.type.write="Yaz"
|
|||||||
AdvSceneSwitcher.action.file.type.append="Ekle"
|
AdvSceneSwitcher.action.file.type.append="Ekle"
|
||||||
AdvSceneSwitcher.action.file.entry="{{actions}} {{filePath}}:"
|
AdvSceneSwitcher.action.file.entry="{{actions}} {{filePath}}:"
|
||||||
AdvSceneSwitcher.action.transition="Geçiş"
|
AdvSceneSwitcher.action.transition="Geçiş"
|
||||||
AdvSceneSwitcher.action.transition.entry.line2="{{setTransition}}Geçiş türünü ayarla {{transitions}}"
|
AdvSceneSwitcher.action.transition.layout.transition="{{setTransition}}Geçiş türünü ayarla {{transitions}}"
|
||||||
AdvSceneSwitcher.action.transition.entry.line3="{{setDuration}}Geçiş süresini şuna ayarla: {{duration}}saniyeler"
|
AdvSceneSwitcher.action.transition.layout.duration="{{setDuration}}Geçiş süresini şuna ayarla: {{duration}}saniyeler"
|
||||||
AdvSceneSwitcher.action.timer="Zamanlayıcı"
|
AdvSceneSwitcher.action.timer="Zamanlayıcı"
|
||||||
AdvSceneSwitcher.action.timer.type.pause="Duraklat"
|
AdvSceneSwitcher.action.timer.type.pause="Duraklat"
|
||||||
AdvSceneSwitcher.action.timer.type.continue="Devam et"
|
AdvSceneSwitcher.action.timer.type.continue="Devam et"
|
||||||
@@ -587,8 +581,6 @@ AdvSceneSwitcher.status.inactive="İnaktif"
|
|||||||
AdvSceneSwitcher.running="Eklenti çalışıyor"
|
AdvSceneSwitcher.running="Eklenti çalışıyor"
|
||||||
AdvSceneSwitcher.stopped="Eklenti durdu"
|
AdvSceneSwitcher.stopped="Eklenti durdu"
|
||||||
|
|
||||||
AdvSceneSwitcher.firstBootMessage="<html><head/><body><p>Gelişmiş Sahne Değiştirici ilk kez başlatılıyor gibi görünüyor.<br>Lütfen <a href=\"https://github.com/ adresine bir göz atın. WarmUpTill/SceneSwitcher/wiki\"><span style=\" text-decoration: underline; color:#268bd2;\">Wiki</span></a> için kılavuzlar ve örnekler listesi.<br>Yapmayın. eklentinin <a href=\"https://obsproject.com/forum/threads/advanced-scene-switcher.48264\"><span style=\" text-decoration: underline; color:# sayfasında soru sormaktan çekinmeyin OBS forumlarında 268bd2;\">konu</span></a>!</p></body></html>"
|
|
||||||
|
|
||||||
AdvSceneSwitcher.unit.milliseconds="millisaniye"
|
AdvSceneSwitcher.unit.milliseconds="millisaniye"
|
||||||
AdvSceneSwitcher.unit.seconds="saniye"
|
AdvSceneSwitcher.unit.seconds="saniye"
|
||||||
AdvSceneSwitcher.unit.minutes="dakika"
|
AdvSceneSwitcher.unit.minutes="dakika"
|
||||||
|
|||||||
@@ -151,7 +151,6 @@ AdvSceneSwitcher.macroTab.run.tooltip="无论条件如何,都运行所有宏
|
|||||||
AdvSceneSwitcher.macroTab.runElse="运行宏(不满足条件)"
|
AdvSceneSwitcher.macroTab.runElse="运行宏(不满足条件)"
|
||||||
AdvSceneSwitcher.macroTab.runFail="运行 \"%1\" 失败!\n要么其中一个操作失败,要么宏已在运行中.\n你想停止它吗?"
|
AdvSceneSwitcher.macroTab.runFail="运行 \"%1\" 失败!\n要么其中一个操作失败,要么宏已在运行中.\n你想停止它吗?"
|
||||||
AdvSceneSwitcher.macroTab.runInParallel="与其他宏并行运行宏"
|
AdvSceneSwitcher.macroTab.runInParallel="与其他宏并行运行宏"
|
||||||
AdvSceneSwitcher.macroTab.onChange="仅在条件结果发生变化时执行操作(条件结果不变时只执行一次操作)"
|
|
||||||
AdvSceneSwitcher.macroTab.defaultname="宏 %1"
|
AdvSceneSwitcher.macroTab.defaultname="宏 %1"
|
||||||
AdvSceneSwitcher.macroTab.defaultGroupName="分组 %1"
|
AdvSceneSwitcher.macroTab.defaultGroupName="分组 %1"
|
||||||
AdvSceneSwitcher.macroTab.macroNameExists="名称 \"%1\" 已被宏使用."
|
AdvSceneSwitcher.macroTab.macroNameExists="名称 \"%1\" 已被宏使用."
|
||||||
@@ -260,7 +259,6 @@ AdvSceneSwitcher.macroList.deleted="删除"
|
|||||||
AdvSceneSwitcher.macroList.duplicate="\"%1\" 已选择!"
|
AdvSceneSwitcher.macroList.duplicate="\"%1\" 已选择!"
|
||||||
|
|
||||||
; Macro Logic
|
; Macro Logic
|
||||||
AdvSceneSwitcher.logic.none="忽略条件"
|
|
||||||
AdvSceneSwitcher.logic.and="且"
|
AdvSceneSwitcher.logic.and="且"
|
||||||
AdvSceneSwitcher.logic.or="或"
|
AdvSceneSwitcher.logic.or="或"
|
||||||
AdvSceneSwitcher.logic.andNot="且不"
|
AdvSceneSwitcher.logic.andNot="且不"
|
||||||
@@ -319,11 +317,7 @@ AdvSceneSwitcher.condition.file="文件"
|
|||||||
AdvSceneSwitcher.condition.file.type.match="内容匹配"
|
AdvSceneSwitcher.condition.file.type.match="内容匹配"
|
||||||
AdvSceneSwitcher.condition.file.type.contentChange="内容发生改变"
|
AdvSceneSwitcher.condition.file.type.contentChange="内容发生改变"
|
||||||
AdvSceneSwitcher.condition.file.type.dateChange="修改日期发生改变"
|
AdvSceneSwitcher.condition.file.type.dateChange="修改日期发生改变"
|
||||||
AdvSceneSwitcher.condition.file.remote="网络文件"
|
AdvSceneSwitcher.condition.file.layout="{{filePath}}{{conditions}}{{regex}}"
|
||||||
AdvSceneSwitcher.condition.file.local="本地文件"
|
|
||||||
AdvSceneSwitcher.condition.file.entry.line1="{{fileType}}{{filePath}}{{conditions}}{{useRegex}}"
|
|
||||||
AdvSceneSwitcher.condition.file.entry.line2="{{matchText}}"
|
|
||||||
AdvSceneSwitcher.condition.file.entry.line3="{{checkModificationDate}}{{checkFileContent}}"
|
|
||||||
AdvSceneSwitcher.condition.media="媒体"
|
AdvSceneSwitcher.condition.media="媒体"
|
||||||
AdvSceneSwitcher.condition.media.checkType.state="状态匹配"
|
AdvSceneSwitcher.condition.media.checkType.state="状态匹配"
|
||||||
AdvSceneSwitcher.condition.media.checkType.time="时间限制匹配"
|
AdvSceneSwitcher.condition.media.checkType.time="时间限制匹配"
|
||||||
@@ -429,8 +423,8 @@ AdvSceneSwitcher.condition.record.state.stop="录制停止"
|
|||||||
AdvSceneSwitcher.condition.record.state.duration="录制时间长于"
|
AdvSceneSwitcher.condition.record.state.duration="录制时间长于"
|
||||||
AdvSceneSwitcher.condition.record.entry="{{condition}}{{duration}}"
|
AdvSceneSwitcher.condition.record.entry="{{condition}}{{duration}}"
|
||||||
AdvSceneSwitcher.condition.process="进程"
|
AdvSceneSwitcher.condition.process="进程"
|
||||||
AdvSceneSwitcher.condition.process.entry="{{processes}}{{regex}}为正在运行中{{focused}}且为焦点"
|
AdvSceneSwitcher.condition.process.layout="{{processes}}{{regex}}为正在运行中{{focused}}且为焦点"
|
||||||
AdvSceneSwitcher.condition.process.entry.focus="当前焦点进程: {{focusProcess}}"
|
AdvSceneSwitcher.condition.process.layout.focus="当前焦点进程: {{focusProcess}}"
|
||||||
AdvSceneSwitcher.condition.idle="闲置检测"
|
AdvSceneSwitcher.condition.idle="闲置检测"
|
||||||
AdvSceneSwitcher.condition.idle.entry="{{duration}}内没有键盘或鼠标输入"
|
AdvSceneSwitcher.condition.idle.entry="{{duration}}内没有键盘或鼠标输入"
|
||||||
AdvSceneSwitcher.condition.pluginState="插件状态"
|
AdvSceneSwitcher.condition.pluginState="插件状态"
|
||||||
@@ -814,7 +808,6 @@ AdvSceneSwitcher.action.recording.type.changeOutputFolder="更改输出文件夹
|
|||||||
AdvSceneSwitcher.action.recording.type.changeOutputFileFormat="改变文件名的格式"
|
AdvSceneSwitcher.action.recording.type.changeOutputFileFormat="改变文件名的格式"
|
||||||
AdvSceneSwitcher.action.recording.pause.hint="请注意,根据您的录制设置,您可能无法暂停录制"
|
AdvSceneSwitcher.action.recording.pause.hint="请注意,根据您的录制设置,您可能无法暂停录制"
|
||||||
AdvSceneSwitcher.action.recording.split.hint="注意,请先确保在OBS设置中启用自动分割文件!"
|
AdvSceneSwitcher.action.recording.split.hint="注意,请先确保在OBS设置中启用自动分割文件!"
|
||||||
AdvSceneSwitcher.action.recording.entry="{{actions}}{{recordFolder}}{{recordFileFormat}}{{pauseHint}}{{splitHint}}"
|
|
||||||
AdvSceneSwitcher.action.replay="回放缓存"
|
AdvSceneSwitcher.action.replay="回放缓存"
|
||||||
AdvSceneSwitcher.action.replay.saveWarn="警告:保存过于频繁可能会导致回放缓存实际上未保存!"
|
AdvSceneSwitcher.action.replay.saveWarn="警告:保存过于频繁可能会导致回放缓存实际上未保存!"
|
||||||
AdvSceneSwitcher.action.replay.durationWarn="警告:更改回放缓存时长上限,仅适用于下次回放缓存开启时!"
|
AdvSceneSwitcher.action.replay.durationWarn="警告:更改回放缓存时长上限,仅适用于下次回放缓存开启时!"
|
||||||
@@ -831,7 +824,6 @@ AdvSceneSwitcher.action.streaming.type.server="设置服务器"
|
|||||||
AdvSceneSwitcher.action.streaming.type.streamKey="设置推流码"
|
AdvSceneSwitcher.action.streaming.type.streamKey="设置推流码"
|
||||||
AdvSceneSwitcher.action.streaming.type.username="设置用户名"
|
AdvSceneSwitcher.action.streaming.type.username="设置用户名"
|
||||||
AdvSceneSwitcher.action.streaming.type.password="设置密码"
|
AdvSceneSwitcher.action.streaming.type.password="设置密码"
|
||||||
AdvSceneSwitcher.action.streaming.entry="{{actions}}{{keyFrameInterval}}{{stringValue}}{{showPassword}}"
|
|
||||||
AdvSceneSwitcher.action.run="运行"
|
AdvSceneSwitcher.action.run="运行"
|
||||||
AdvSceneSwitcher.action.run.wait.entry="{{wait}}进程退出或最多等待{{timeout}}{{waitHelp}}"
|
AdvSceneSwitcher.action.run.wait.entry="{{wait}}进程退出或最多等待{{timeout}}{{waitHelp}}"
|
||||||
AdvSceneSwitcher.action.run.wait.help.tooltip="请注意,如果不勾选此选项,宏属性将不起作用,因为进程的启动会脱离逻辑的其他部分,因此无法对其进行控制."
|
AdvSceneSwitcher.action.run.wait.help.tooltip="请注意,如果不勾选此选项,宏属性将不起作用,因为进程的启动会脱离逻辑的其他部分,因此无法对其进行控制."
|
||||||
@@ -906,7 +898,7 @@ AdvSceneSwitcher.action.macro="宏"
|
|||||||
AdvSceneSwitcher.action.macro.type.pause="停用"
|
AdvSceneSwitcher.action.macro.type.pause="停用"
|
||||||
AdvSceneSwitcher.action.macro.type.unpause="启用"
|
AdvSceneSwitcher.action.macro.type.unpause="启用"
|
||||||
AdvSceneSwitcher.action.macro.type.resetCounter="重置计数器"
|
AdvSceneSwitcher.action.macro.type.resetCounter="重置计数器"
|
||||||
AdvSceneSwitcher.action.macro.type.run="运行宏"
|
AdvSceneSwitcher.action.macro.type.runActions="运行宏"
|
||||||
AdvSceneSwitcher.action.macro.type.run.conditions.ignore="忽略条件结果"
|
AdvSceneSwitcher.action.macro.type.run.conditions.ignore="忽略条件结果"
|
||||||
AdvSceneSwitcher.action.macro.type.run.conditions.true="仅当条件结果为真时"
|
AdvSceneSwitcher.action.macro.type.run.conditions.true="仅当条件结果为真时"
|
||||||
AdvSceneSwitcher.action.macro.type.run.conditions.false="仅当条件结果为假时"
|
AdvSceneSwitcher.action.macro.type.run.conditions.false="仅当条件结果为假时"
|
||||||
@@ -995,9 +987,9 @@ AdvSceneSwitcher.action.transition.type.scene="场景转场动画"
|
|||||||
AdvSceneSwitcher.action.transition.type.sceneOverride="覆盖场景转场动画"
|
AdvSceneSwitcher.action.transition.type.sceneOverride="覆盖场景转场动画"
|
||||||
AdvSceneSwitcher.action.transition.type.sourceShow="显示源转场动画"
|
AdvSceneSwitcher.action.transition.type.sourceShow="显示源转场动画"
|
||||||
AdvSceneSwitcher.action.transition.type.sourceHide="隐藏源转场动画"
|
AdvSceneSwitcher.action.transition.type.sourceHide="隐藏源转场动画"
|
||||||
AdvSceneSwitcher.action.transition.entry.line1="更改 {{type}}{{scenes}}{{sources}}"
|
AdvSceneSwitcher.action.transition.layout.type="更改 {{type}}{{scenes}}{{sources}}"
|
||||||
AdvSceneSwitcher.action.transition.entry.line2="{{setTransition}}将转场动画类型设置为 {{transitions}}"
|
AdvSceneSwitcher.action.transition.layout.transition="{{setTransition}}将转场动画类型设置为 {{transitions}}"
|
||||||
AdvSceneSwitcher.action.transition.entry.line3="{{setDuration}}将转场动画时长设置为 {{duration}}秒"
|
AdvSceneSwitcher.action.transition.layout.duration="{{setDuration}}将转场动画时长设置为 {{duration}}秒"
|
||||||
AdvSceneSwitcher.action.timer="计时器"
|
AdvSceneSwitcher.action.timer="计时器"
|
||||||
AdvSceneSwitcher.action.timer.type.pause="暂停"
|
AdvSceneSwitcher.action.timer.type.pause="暂停"
|
||||||
AdvSceneSwitcher.action.timer.type.continue="继续"
|
AdvSceneSwitcher.action.timer.type.continue="继续"
|
||||||
@@ -1140,10 +1132,17 @@ AdvSceneSwitcher.action.twitch.type.user.getInfo="获取用户信息"
|
|||||||
AdvSceneSwitcher.action.twitch.type.reward.getInfo="获取频道积分奖励信息"
|
AdvSceneSwitcher.action.twitch.type.reward.getInfo="获取频道积分奖励信息"
|
||||||
AdvSceneSwitcher.action.twitch.reward.toggleControl="切换奖励名称/变量选择控制"
|
AdvSceneSwitcher.action.twitch.reward.toggleControl="切换奖励名称/变量选择控制"
|
||||||
AdvSceneSwitcher.action.twitch.categorySelectionDisabled="在未选择 Twitch 帐户的情况下无法选择类别!"
|
AdvSceneSwitcher.action.twitch.categorySelectionDisabled="在未选择 Twitch 帐户的情况下无法选择类别!"
|
||||||
AdvSceneSwitcher.action.twitch.layout.default="{{account}}{{actions}}{{streamTitle}}{{category}}{{markerDescription}}{{clipHasDelay}}{{duration}}{{announcementColor}}{{channel}}{{pointsReward}}"
|
AdvSceneSwitcher.action.twitch.layout.default="{{account}}{{actions}}{{streamTitle}}{{category}}{{markerDescription}}{{clipHasDelay}}{{duration}}{{announcementColor}}{{channel}}{{pointsReward}}{{nonModDelayDuration}}"
|
||||||
AdvSceneSwitcher.action.twitch.layout.chat="使用账户{{account}}{{actions}}{{channel}}"
|
AdvSceneSwitcher.action.twitch.layout.chat="使用账户{{account}}{{actions}}{{channel}}"
|
||||||
AdvSceneSwitcher.action.twitch.layout.user.getInfo="使用账户{{account}}{{actions}}{{userInfoQueryType}}{{userLogin}}{{userId}}"
|
AdvSceneSwitcher.action.twitch.layout.channel.getInfo="使用账户{{account}}{{actions}}频道{{channel}}"
|
||||||
AdvSceneSwitcher.action.twitch.layout.reward.getInfo="使用账户{{account}}{{actions}} 频道{{channel}}{{pointsReward}}{{rewardVariable}}{{toggleRewardSelection}}"
|
AdvSceneSwitcher.action.twitch.layout.user.getInfo.row1="使用账户{{account}}{{actions}}"
|
||||||
|
AdvSceneSwitcher.action.twitch.layout.user.getInfo.row2="{{userInfoQueryType}}{{userLogin}}{{userId}}"
|
||||||
|
AdvSceneSwitcher.action.twitch.layout.user.moderation.row1="使用账户{{account}}{{actions}}"
|
||||||
|
AdvSceneSwitcher.action.twitch.layout.user.moderation.row2="频道{{channel}}{{userInfoQueryType}}{{userLogin}}{{userId}}"
|
||||||
|
AdvSceneSwitcher.action.twitch.layout.user.ban.row1="使用账户{{account}}{{actions}}超时{{duration}}"
|
||||||
|
AdvSceneSwitcher.action.twitch.layout.user.ban.row2="频道{{channel}}{{userInfoQueryType}}{{userLogin}}{{userId}}原因{{banReason}}"
|
||||||
|
AdvSceneSwitcher.action.twitch.layout.reward.getInfo.row1="使用账户{{account}}{{actions}} 频道{{channel}}"
|
||||||
|
AdvSceneSwitcher.action.twitch.layout.reward.getInfo.row2="{{pointsReward}}{{rewardVariable}}{{toggleRewardSelection}}"
|
||||||
AdvSceneSwitcher.action.twitch.title.title="输入标题"
|
AdvSceneSwitcher.action.twitch.title.title="输入标题"
|
||||||
AdvSceneSwitcher.action.twitch.marker.description="标记描述"
|
AdvSceneSwitcher.action.twitch.marker.description="标记描述"
|
||||||
AdvSceneSwitcher.action.twitch.clip.hasDelay="在捕捉视频片段前稍加延迟"
|
AdvSceneSwitcher.action.twitch.clip.hasDelay="在捕捉视频片段前稍加延迟"
|
||||||
@@ -2116,8 +2115,6 @@ AdvSceneSwitcher.status.inactive="已停止"
|
|||||||
AdvSceneSwitcher.running="插件正在运行"
|
AdvSceneSwitcher.running="插件正在运行"
|
||||||
AdvSceneSwitcher.stopped="插件已停止"
|
AdvSceneSwitcher.stopped="插件已停止"
|
||||||
|
|
||||||
AdvSceneSwitcher.firstBootMessage="<html><head/><body><p>这似乎是您第一次启动高级场景切换器.<br>请看一下 <a href=\"https://github.com/WarmUpTill/SceneSwitcher/wiki\"><span style=\" text-decoration: underline; color:#268bd2;\">Wiki</span></a> 查看指南和示例列表.<br>如果有问题,在在OBS论坛插件帖子内提问 <a href=\"https://obsproject.com/forum/threads/advanced-scene-switcher.48264\"><span style=\" text-decoration: underline; color:#268bd2;\">thread</span></a></p></body></html>"
|
|
||||||
|
|
||||||
AdvSceneSwitcher.deprecatedTabWarning="此选项卡的开发已停止!请考虑转换为使用宏来代替。\n可以在“常规”选项卡上禁用此提示."
|
AdvSceneSwitcher.deprecatedTabWarning="此选项卡的开发已停止!请考虑转换为使用宏来代替。\n可以在“常规”选项卡上禁用此提示."
|
||||||
|
|
||||||
AdvSceneSwitcher.unit.milliseconds="毫秒"
|
AdvSceneSwitcher.unit.milliseconds="毫秒"
|
||||||
|
|||||||
10
data/res/images/DarkVariable.svg
Normal file
10
data/res/images/DarkVariable.svg
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
||||||
|
<svg fill="#fefefe" xmlns="http://www.w3.org/2000/svg"
|
||||||
|
width="800px" height="800px" viewBox="0 0 52 52" enable-background="new 0 0 52 52" xml:space="preserve">
|
||||||
|
<path d="M42.6,17.8c2.4,0,7.2-2,7.2-8.4c0-6.4-4.6-6.8-6.1-6.8c-2.8,0-5.6,2-8.1,6.3c-2.5,4.4-5.3,9.1-5.3,9.1
|
||||||
|
l-0.1,0c-0.6-3.1-1.1-5.6-1.3-6.7c-0.5-2.7-3.6-8.4-9.9-8.4c-6.4,0-12.2,3.7-12.2,3.7l0,0C5.8,7.3,5.1,8.5,5.1,9.9
|
||||||
|
c0,2.1,1.7,3.9,3.9,3.9c0.6,0,1.2-0.2,1.7-0.4l0,0c0,0,4.8-2.7,5.9,0c0.3,0.8,0.6,1.7,0.9,2.7c1.2,4.2,2.4,9.1,3.3,13.5l-4.2,6
|
||||||
|
c0,0-4.7-1.7-7.1-1.7s-7.2,2-7.2,8.4s4.6,6.8,6.1,6.8c2.8,0,5.6-2,8.1-6.3c2.5-4.4,5.3-9.1,5.3-9.1c0.8,4,1.5,7.1,1.9,8.5
|
||||||
|
c1.6,4.5,5.3,7.2,10.1,7.2c0,0,5,0,10.9-3.3c1.4-0.6,2.4-2,2.4-3.6c0-2.1-1.7-3.9-3.9-3.9c-0.6,0-1.2,0.2-1.7,0.4l0,0
|
||||||
|
c0,0-4.2,2.4-5.6,0.5c-1-2-1.9-4.6-2.6-7.8c-0.6-2.8-1.3-6.2-2-9.5l4.3-6.2C35.5,16.1,40.2,17.8,42.6,17.8z"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 973 B |
10
data/res/images/LightVariable.svg
Normal file
10
data/res/images/LightVariable.svg
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
||||||
|
<svg fill="#202020" xmlns="http://www.w3.org/2000/svg"
|
||||||
|
width="800px" height="800px" viewBox="0 0 52 52" enable-background="new 0 0 52 52" xml:space="preserve">
|
||||||
|
<path d="M42.6,17.8c2.4,0,7.2-2,7.2-8.4c0-6.4-4.6-6.8-6.1-6.8c-2.8,0-5.6,2-8.1,6.3c-2.5,4.4-5.3,9.1-5.3,9.1
|
||||||
|
l-0.1,0c-0.6-3.1-1.1-5.6-1.3-6.7c-0.5-2.7-3.6-8.4-9.9-8.4c-6.4,0-12.2,3.7-12.2,3.7l0,0C5.8,7.3,5.1,8.5,5.1,9.9
|
||||||
|
c0,2.1,1.7,3.9,3.9,3.9c0.6,0,1.2-0.2,1.7-0.4l0,0c0,0,4.8-2.7,5.9,0c0.3,0.8,0.6,1.7,0.9,2.7c1.2,4.2,2.4,9.1,3.3,13.5l-4.2,6
|
||||||
|
c0,0-4.7-1.7-7.1-1.7s-7.2,2-7.2,8.4s4.6,6.8,6.1,6.8c2.8,0,5.6-2,8.1-6.3c2.5-4.4,5.3-9.1,5.3-9.1c0.8,4,1.5,7.1,1.9,8.5
|
||||||
|
c1.6,4.5,5.3,7.2,10.1,7.2c0,0,5,0,10.9-3.3c1.4-0.6,2.4-2,2.4-3.6c0-2.1-1.7-3.9-3.9-3.9c-0.6,0-1.2,0.2-1.7,0.4l0,0
|
||||||
|
c0,0-4.2,2.4-5.6,0.5c-1-2-1.9-4.6-2.6-7.8c-0.6-2.8-1.3-6.2-2-9.5l4.3-6.2C35.5,16.1,40.2,17.8,42.6,17.8z"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 973 B |
2
deps/cpp-httplib
vendored
2
deps/cpp-httplib
vendored
Submodule deps/cpp-httplib updated: c7ed1796a7...008e107d0f
2
deps/leptonica
vendored
2
deps/leptonica
vendored
Submodule deps/leptonica updated: b667978e86...13275a278e
2
deps/libusb
vendored
2
deps/libusb
vendored
Submodule deps/libusb updated: 15a7ebb4d4...bc368fb133
@@ -68,7 +68,7 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>962</width>
|
<width>962</width>
|
||||||
<height>1160</height>
|
<height>1190</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_19">
|
<layout class="QVBoxLayout" name="verticalLayout_19">
|
||||||
@@ -251,6 +251,20 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="suppressCrashRecoveryDialog">
|
||||||
|
<property name="text">
|
||||||
|
<string>AdvSceneSwitcher.generalTab.generalBehavior.suppressCrashRecoveryDialog</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="settingsLock">
|
||||||
|
<property name="text">
|
||||||
|
<string>AdvSceneSwitcher.generalTab.generalBehavior.settingsLock</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@@ -565,6 +579,13 @@
|
|||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="openSetupWizard">
|
||||||
|
<property name="text">
|
||||||
|
<string>FirstRunWizard.openButton</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
@@ -590,7 +611,7 @@
|
|||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Horizontal</enum>
|
<enum>Qt::Horizontal</enum>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QGroupBox" name="groupBox_5">
|
<widget class="QGroupBox" name="macroListBox">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>AdvSceneSwitcher.macroTab.macros</string>
|
<string>AdvSceneSwitcher.macroTab.macros</string>
|
||||||
</property>
|
</property>
|
||||||
@@ -786,25 +807,19 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="runMacroOnChange">
|
<widget class="QLabel" name="label_18">
|
||||||
<property name="toolTip">
|
|
||||||
<string>AdvSceneSwitcher.macroTab.onChange</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string/>
|
<string>AdvSceneSwitcher.macroTab.actionTriggerMode.label</string>
|
||||||
|
</property>
|
||||||
|
<property name="wordWrap">
|
||||||
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_18">
|
<widget class="QComboBox" name="actionTriggerMode">
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>AdvSceneSwitcher.macroTab.onChange</string>
|
<string>AdvSceneSwitcher.macroTab.actionTriggerMode.tooltip</string>
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>AdvSceneSwitcher.macroTab.onChange</string>
|
|
||||||
</property>
|
|
||||||
<property name="wordWrap">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@@ -4118,7 +4133,7 @@
|
|||||||
<tabstop>macroName</tabstop>
|
<tabstop>macroName</tabstop>
|
||||||
<tabstop>runMacro</tabstop>
|
<tabstop>runMacro</tabstop>
|
||||||
<tabstop>runMacroInParallel</tabstop>
|
<tabstop>runMacroInParallel</tabstop>
|
||||||
<tabstop>runMacroOnChange</tabstop>
|
<tabstop>actionTriggerMode</tabstop>
|
||||||
<tabstop>macroSettings</tabstop>
|
<tabstop>macroSettings</tabstop>
|
||||||
<tabstop>macroEdit</tabstop>
|
<tabstop>macroEdit</tabstop>
|
||||||
<tabstop>sceneGroups</tabstop>
|
<tabstop>sceneGroups</tabstop>
|
||||||
|
|||||||
@@ -19,8 +19,10 @@
|
|||||||
#include <obs-frontend-api.h>
|
#include <obs-frontend-api.h>
|
||||||
#include <QAction>
|
#include <QAction>
|
||||||
#include <QDirIterator>
|
#include <QDirIterator>
|
||||||
|
#include <QInputDialog>
|
||||||
#include <QLibrary>
|
#include <QLibrary>
|
||||||
#include <QMainWindow>
|
#include <QMainWindow>
|
||||||
|
#include <QMessageBox>
|
||||||
#include <QTextStream>
|
#include <QTextStream>
|
||||||
#include <regex>
|
#include <regex>
|
||||||
|
|
||||||
@@ -41,9 +43,12 @@ AdvSceneSwitcher::AdvSceneSwitcher(QWidget *parent)
|
|||||||
{
|
{
|
||||||
switcher->settingsWindowOpened = true;
|
switcher->settingsWindowOpened = true;
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
std::lock_guard<std::mutex> lock(switcher->m);
|
{
|
||||||
switcher->Prune();
|
std::lock_guard<std::mutex> lock(switcher->m);
|
||||||
LoadUI();
|
switcher->Prune();
|
||||||
|
LoadUI();
|
||||||
|
}
|
||||||
|
CheckFirstTimeSetup();
|
||||||
}
|
}
|
||||||
|
|
||||||
AdvSceneSwitcher::~AdvSceneSwitcher()
|
AdvSceneSwitcher::~AdvSceneSwitcher()
|
||||||
@@ -139,7 +144,6 @@ void AdvSceneSwitcher::LoadUI()
|
|||||||
SetTabOrder(ui->tabWidget);
|
SetTabOrder(ui->tabWidget);
|
||||||
SetCurrentTab(ui->tabWidget);
|
SetCurrentTab(ui->tabWidget);
|
||||||
RestoreWindowGeo();
|
RestoreWindowGeo();
|
||||||
CheckFirstTimeSetup();
|
|
||||||
|
|
||||||
loading = false;
|
loading = false;
|
||||||
}
|
}
|
||||||
@@ -322,8 +326,7 @@ void SwitcherData::SetPreconditions()
|
|||||||
{
|
{
|
||||||
// Window title
|
// Window title
|
||||||
lastTitle = currentTitle;
|
lastTitle = currentTitle;
|
||||||
std::string title;
|
auto title = GetCurrentWindowTitle();
|
||||||
GetCurrentWindowTitle(title);
|
|
||||||
for (auto &window : ignoreWindowsSwitches) {
|
for (auto &window : ignoreWindowsSwitches) {
|
||||||
bool equals = (title == window);
|
bool equals = (title == window);
|
||||||
bool matches = false;
|
bool matches = false;
|
||||||
@@ -343,7 +346,7 @@ void SwitcherData::SetPreconditions()
|
|||||||
currentTitle = title;
|
currentTitle = title;
|
||||||
|
|
||||||
// Process name
|
// Process name
|
||||||
GetForegroundProcessName(currentForegroundProcess);
|
currentForegroundProcess = GetForegroundProcessName();
|
||||||
|
|
||||||
// Macro
|
// Macro
|
||||||
InvalidateMacroTempVarValues();
|
InvalidateMacroTempVarValues();
|
||||||
@@ -458,12 +461,13 @@ void SwitcherData::Stop()
|
|||||||
SetMacroAbortWait(true);
|
SetMacroAbortWait(true);
|
||||||
GetMacroWaitCV().notify_all();
|
GetMacroWaitCV().notify_all();
|
||||||
GetMacroTransitionCV().notify_all();
|
GetMacroTransitionCV().notify_all();
|
||||||
StopAllMacros();
|
SignalStopAllMacros();
|
||||||
StopAndClearAllActionQueues();
|
StopAndClearAllActionQueues();
|
||||||
CloseAllInputDialogs();
|
CloseAllInputDialogs();
|
||||||
th->wait();
|
th->wait();
|
||||||
delete th;
|
delete th;
|
||||||
th = nullptr;
|
th = nullptr;
|
||||||
|
WaitForAllMacros();
|
||||||
RunStopSteps();
|
RunStopSteps();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -507,6 +511,8 @@ bool SwitcherData::AnySceneTransitionStarted()
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
extern "C" EXPORT void FreeSceneSwitcher()
|
extern "C" EXPORT void FreeSceneSwitcher()
|
||||||
{
|
{
|
||||||
|
switcher->Stop();
|
||||||
|
|
||||||
PlatformCleanup();
|
PlatformCleanup();
|
||||||
RunPluginCleanupSteps();
|
RunPluginCleanupSteps();
|
||||||
|
|
||||||
@@ -628,13 +634,20 @@ static void handleSceneCollectionCleanup()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// OBS_FRONTEND_EVENT_SCENE_COLLECTION_CLEANUP is also called on
|
||||||
|
// shutdown.
|
||||||
|
// Here we also don't want to clear the settings.
|
||||||
|
if (switcher->obsIsShuttingDown) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
SaveSceneSwitcher(nullptr, false, nullptr);
|
SaveSceneSwitcher(nullptr, false, nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Note to future self:
|
// Note to future self:
|
||||||
// be careful using switcher->m here as there is potential for deadlocks when using
|
// be careful using switcher->m here as there is potential for deadlocks when using
|
||||||
// frontend functions such as obs_frontend_set_current_scene()
|
// frontend functions such as obs_frontend_set_current_scene()
|
||||||
static void OBSEvent(enum obs_frontend_event event, void *switcher)
|
static void OBSEvent(enum obs_frontend_event event, void *)
|
||||||
{
|
{
|
||||||
if (!switcher) {
|
if (!switcher) {
|
||||||
return;
|
return;
|
||||||
@@ -708,19 +721,54 @@ static void LoadPlugins()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static bool settingsPasswordIsCorrect(QWidget *parent)
|
||||||
|
{
|
||||||
|
bool ok;
|
||||||
|
QString input = QInputDialog::getText(
|
||||||
|
parent,
|
||||||
|
obs_module_text(
|
||||||
|
"AdvSceneSwitcher.generalTab.generalBehavior.settingsLock.title"),
|
||||||
|
obs_module_text(
|
||||||
|
"AdvSceneSwitcher.generalTab.generalBehavior.settingsLock.passwordLabel"),
|
||||||
|
QLineEdit::Password, QString(), &ok);
|
||||||
|
|
||||||
|
if (!ok) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (input.toStdString() == switcher->settingsLockPassword) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
QMessageBox::warning(
|
||||||
|
parent,
|
||||||
|
obs_module_text(
|
||||||
|
"AdvSceneSwitcher.generalTab.generalBehavior.settingsLock.title"),
|
||||||
|
obs_module_text(
|
||||||
|
"AdvSceneSwitcher.generalTab.generalBehavior.settingsLock.wrongPassword"));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
void OpenSettingsWindow()
|
void OpenSettingsWindow()
|
||||||
{
|
{
|
||||||
if (switcher->settingsWindowOpened) {
|
if (switcher->settingsWindowOpened) {
|
||||||
AdvSceneSwitcher::window->show();
|
AdvSceneSwitcher::window->show();
|
||||||
AdvSceneSwitcher::window->raise();
|
AdvSceneSwitcher::window->raise();
|
||||||
AdvSceneSwitcher::window->activateWindow();
|
AdvSceneSwitcher::window->activateWindow();
|
||||||
} else {
|
return;
|
||||||
AdvSceneSwitcher::window =
|
|
||||||
new AdvSceneSwitcher(static_cast<QMainWindow *>(
|
|
||||||
obs_frontend_get_main_window()));
|
|
||||||
AdvSceneSwitcher::window->setAttribute(Qt::WA_DeleteOnClose);
|
|
||||||
AdvSceneSwitcher::window->show();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
auto parent =
|
||||||
|
static_cast<QMainWindow *>(obs_frontend_get_main_window());
|
||||||
|
if (switcher->settingsLockEnabled &&
|
||||||
|
!switcher->settingsLockPassword.empty() &&
|
||||||
|
!settingsPasswordIsCorrect(parent)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
AdvSceneSwitcher::window = new AdvSceneSwitcher(parent);
|
||||||
|
AdvSceneSwitcher::window->setAttribute(Qt::WA_DeleteOnClose);
|
||||||
|
AdvSceneSwitcher::window->show();
|
||||||
}
|
}
|
||||||
|
|
||||||
void AdvSceneSwitcher::HighlightMacroSettingsButton(bool enable)
|
void AdvSceneSwitcher::HighlightMacroSettingsButton(bool enable)
|
||||||
@@ -768,8 +816,6 @@ void HighlightMacroSettingsButton(bool enable)
|
|||||||
enable);
|
enable);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetupActionQueues();
|
|
||||||
|
|
||||||
extern "C" EXPORT void InitSceneSwitcher(obs_module_t *module,
|
extern "C" EXPORT void InitSceneSwitcher(obs_module_t *module,
|
||||||
translateFunc translate)
|
translateFunc translate)
|
||||||
{
|
{
|
||||||
@@ -781,12 +827,11 @@ extern "C" EXPORT void InitSceneSwitcher(obs_module_t *module,
|
|||||||
PlatformInit();
|
PlatformInit();
|
||||||
LoadPlugins();
|
LoadPlugins();
|
||||||
SetupDock();
|
SetupDock();
|
||||||
SetupActionQueues();
|
|
||||||
|
|
||||||
RunPluginInitSteps();
|
RunPluginInitSteps();
|
||||||
|
|
||||||
obs_frontend_add_save_callback(SaveSceneSwitcher, nullptr);
|
obs_frontend_add_save_callback(SaveSceneSwitcher, nullptr);
|
||||||
obs_frontend_add_event_callback(OBSEvent, switcher);
|
obs_frontend_add_event_callback(OBSEvent, nullptr);
|
||||||
|
|
||||||
QAction *action = (QAction *)obs_frontend_add_tools_menu_qaction(
|
QAction *action = (QAction *)obs_frontend_add_tools_menu_qaction(
|
||||||
obs_module_text("AdvSceneSwitcher.pluginName"));
|
obs_module_text("AdvSceneSwitcher.pluginName"));
|
||||||
|
|||||||
@@ -66,10 +66,13 @@ public slots:
|
|||||||
void on_uiHintsDisable_stateChanged(int state);
|
void on_uiHintsDisable_stateChanged(int state);
|
||||||
void on_disableComboBoxFilter_stateChanged(int state);
|
void on_disableComboBoxFilter_stateChanged(int state);
|
||||||
void on_warnPluginLoadFailure_stateChanged(int state);
|
void on_warnPluginLoadFailure_stateChanged(int state);
|
||||||
|
void on_suppressCrashRecoveryDialog_stateChanged(int state);
|
||||||
void on_hideLegacyTabs_stateChanged(int state);
|
void on_hideLegacyTabs_stateChanged(int state);
|
||||||
|
void on_settingsLock_stateChanged(int state);
|
||||||
void on_priorityUp_clicked();
|
void on_priorityUp_clicked();
|
||||||
void on_priorityDown_clicked();
|
void on_priorityDown_clicked();
|
||||||
void on_threadPriority_currentTextChanged(const QString &text);
|
void on_threadPriority_currentTextChanged(const QString &text);
|
||||||
|
void on_openSetupWizard_clicked();
|
||||||
|
|
||||||
/* --- End of legacy tab section --- */
|
/* --- End of legacy tab section --- */
|
||||||
|
|
||||||
@@ -107,7 +110,7 @@ public slots:
|
|||||||
void on_macroDown_clicked() const;
|
void on_macroDown_clicked() const;
|
||||||
void on_macroName_editingFinished();
|
void on_macroName_editingFinished();
|
||||||
void on_runMacroInParallel_stateChanged(int value) const;
|
void on_runMacroInParallel_stateChanged(int value) const;
|
||||||
void on_runMacroOnChange_stateChanged(int value) const;
|
void on_actionTriggerMode_currentIndexChanged(int index) const;
|
||||||
void MacroSelectionChanged();
|
void MacroSelectionChanged();
|
||||||
void ShowMacroContextMenu(const QPoint &);
|
void ShowMacroContextMenu(const QPoint &);
|
||||||
void CopyMacro();
|
void CopyMacro();
|
||||||
|
|||||||
128
lib/general.cpp
128
lib/general.cpp
@@ -1,24 +1,26 @@
|
|||||||
#include "advanced-scene-switcher.hpp"
|
#include "advanced-scene-switcher.hpp"
|
||||||
|
#include "crash-handler.hpp"
|
||||||
#include "file-selection.hpp"
|
#include "file-selection.hpp"
|
||||||
#include "filter-combo-box.hpp"
|
#include "filter-combo-box.hpp"
|
||||||
|
#include "first-run-wizard.hpp"
|
||||||
#include "layout-helpers.hpp"
|
#include "layout-helpers.hpp"
|
||||||
#include "macro.hpp"
|
#include "macro.hpp"
|
||||||
#include "macro-search.hpp"
|
#include "macro-search.hpp"
|
||||||
#include "macro-settings.hpp"
|
#include "macro-settings.hpp"
|
||||||
#include "path-helpers.hpp"
|
#include "path-helpers.hpp"
|
||||||
#include "selection-helpers.hpp"
|
|
||||||
#include "source-helpers.hpp"
|
#include "source-helpers.hpp"
|
||||||
#include "splitter-helpers.hpp"
|
#include "splitter-helpers.hpp"
|
||||||
#include "status-control.hpp"
|
#include "status-control.hpp"
|
||||||
#include "switcher-data.hpp"
|
#include "switcher-data.hpp"
|
||||||
#include "tab-helpers.hpp"
|
#include "tab-helpers.hpp"
|
||||||
#include "ui-helpers.hpp"
|
#include "ui-helpers.hpp"
|
||||||
#include "utility.hpp"
|
|
||||||
#include "variable.hpp"
|
#include "variable.hpp"
|
||||||
#include "version.h"
|
#include "version.h"
|
||||||
|
|
||||||
#include <obs-frontend-api.h>
|
#include <obs-frontend-api.h>
|
||||||
#include <QFileDialog>
|
#include <QFileDialog>
|
||||||
|
#include <QInputDialog>
|
||||||
|
#include <QMessageBox>
|
||||||
|
|
||||||
namespace advss {
|
namespace advss {
|
||||||
|
|
||||||
@@ -195,6 +197,15 @@ void AdvSceneSwitcher::on_warnPluginLoadFailure_stateChanged(int state)
|
|||||||
switcher->warnPluginLoadFailure = state;
|
switcher->warnPluginLoadFailure = state;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void AdvSceneSwitcher::on_suppressCrashRecoveryDialog_stateChanged(int state)
|
||||||
|
{
|
||||||
|
if (loading) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
SetSuppressCrashDialog(state);
|
||||||
|
}
|
||||||
|
|
||||||
static bool isLegacyTab(const QString &name)
|
static bool isLegacyTab(const QString &name)
|
||||||
{
|
{
|
||||||
return name == obs_module_text(
|
return name == obs_module_text(
|
||||||
@@ -234,6 +245,64 @@ void AdvSceneSwitcher::on_hideLegacyTabs_stateChanged(int state)
|
|||||||
ui->priorityBox->setVisible(!switcher->hideLegacyTabs);
|
ui->priorityBox->setVisible(!switcher->hideLegacyTabs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void AdvSceneSwitcher::on_settingsLock_stateChanged(int state)
|
||||||
|
{
|
||||||
|
if (loading) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!state) {
|
||||||
|
switcher->settingsLockEnabled = false;
|
||||||
|
switcher->settingsLockPassword = "";
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ok;
|
||||||
|
QString newPassword = QInputDialog::getText(
|
||||||
|
this,
|
||||||
|
obs_module_text(
|
||||||
|
"AdvSceneSwitcher.generalTab.generalBehavior.settingsLock.title"),
|
||||||
|
obs_module_text(
|
||||||
|
"AdvSceneSwitcher.generalTab.generalBehavior.settingsLock.newPasswordLabel"),
|
||||||
|
QLineEdit::Password, QString(), &ok);
|
||||||
|
|
||||||
|
const auto disablePassword = [this]() {
|
||||||
|
QSignalBlocker blocker(ui->settingsLock);
|
||||||
|
ui->settingsLock->setChecked(false);
|
||||||
|
ui->settingsLock->setCheckState(Qt::Unchecked);
|
||||||
|
switcher->settingsLockEnabled = false;
|
||||||
|
switcher->settingsLockPassword = "";
|
||||||
|
};
|
||||||
|
|
||||||
|
if (!ok || newPassword.isEmpty()) {
|
||||||
|
disablePassword();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
QString confirm = QInputDialog::getText(
|
||||||
|
this,
|
||||||
|
obs_module_text(
|
||||||
|
"AdvSceneSwitcher.generalTab.generalBehavior.settingsLock.title"),
|
||||||
|
obs_module_text(
|
||||||
|
"AdvSceneSwitcher.generalTab.generalBehavior.settingsLock.confirmPasswordLabel"),
|
||||||
|
QLineEdit::Password, QString(), &ok);
|
||||||
|
if (!ok || newPassword != confirm) {
|
||||||
|
if (ok) {
|
||||||
|
QMessageBox::warning(
|
||||||
|
this,
|
||||||
|
obs_module_text(
|
||||||
|
"AdvSceneSwitcher.generalTab.generalBehavior.settingsLock.title"),
|
||||||
|
obs_module_text(
|
||||||
|
"AdvSceneSwitcher.generalTab.generalBehavior.settingsLock.passwordMismatch"));
|
||||||
|
}
|
||||||
|
disablePassword();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
switcher->settingsLockEnabled = true;
|
||||||
|
switcher->settingsLockPassword = newPassword.toStdString();
|
||||||
|
}
|
||||||
|
|
||||||
void AdvSceneSwitcher::SetDeprecationWarnings()
|
void AdvSceneSwitcher::SetDeprecationWarnings()
|
||||||
{
|
{
|
||||||
QString toolTip =
|
QString toolTip =
|
||||||
@@ -361,14 +430,50 @@ void AdvSceneSwitcher::RestoreWindowGeo()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void renameMacroIfNecessary(const std::shared_ptr<Macro> ¯o)
|
||||||
|
{
|
||||||
|
if (!GetMacroByName(macro->Name().c_str())) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
auto name = macro->Name();
|
||||||
|
int i = 2;
|
||||||
|
while (GetMacroByName((name + " " + std::to_string(i)).c_str())) {
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
|
||||||
|
macro->SetName(name + " " + std::to_string(i));
|
||||||
|
}
|
||||||
|
|
||||||
void AdvSceneSwitcher::CheckFirstTimeSetup()
|
void AdvSceneSwitcher::CheckFirstTimeSetup()
|
||||||
{
|
{
|
||||||
if (switcher->firstBoot && !switcher->disableHints) {
|
if (!IsFirstRun() || !GetTopLevelMacros().empty()) {
|
||||||
switcher->firstBoot = false;
|
return;
|
||||||
DisplayMessage(
|
|
||||||
obs_module_text("AdvSceneSwitcher.firstBootMessage"));
|
|
||||||
switcher->Start();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool wasSkipped = false;
|
||||||
|
auto macro = FirstRunWizard::ShowWizard(this, &wasSkipped);
|
||||||
|
if (macro) {
|
||||||
|
renameMacroIfNecessary(macro);
|
||||||
|
QTimer::singleShot(0, this,
|
||||||
|
[this, macro]() { ui->macros->Add(macro); });
|
||||||
|
}
|
||||||
|
if (wasSkipped) {
|
||||||
|
ui->alwaysShowFeatureTabs->setChecked(true);
|
||||||
|
}
|
||||||
|
switcher->Start();
|
||||||
|
}
|
||||||
|
|
||||||
|
void AdvSceneSwitcher::on_openSetupWizard_clicked()
|
||||||
|
{
|
||||||
|
auto macro = FirstRunWizard::ShowWizard(this);
|
||||||
|
if (!macro) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
renameMacroIfNecessary(macro);
|
||||||
|
ui->macros->Add(macro);
|
||||||
|
ui->tabWidget->setCurrentWidget(ui->macroTab);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AdvSceneSwitcher::on_tabWidget_currentChanged(int)
|
void AdvSceneSwitcher::on_tabWidget_currentChanged(int)
|
||||||
@@ -427,7 +532,6 @@ void SwitcherData::LoadSettings(obs_data_t *obj)
|
|||||||
// Needs to be loaded before any entries which might rely on scene group
|
// Needs to be loaded before any entries which might rely on scene group
|
||||||
// selections to be available.
|
// selections to be available.
|
||||||
loadSceneGroups(obj);
|
loadSceneGroups(obj);
|
||||||
LoadVariables(obj);
|
|
||||||
|
|
||||||
RunLoadSteps(obj);
|
RunLoadSteps(obj);
|
||||||
|
|
||||||
@@ -466,7 +570,6 @@ void SwitcherData::SaveSettings(obs_data_t *obj)
|
|||||||
saveSceneGroups(obj);
|
saveSceneGroups(obj);
|
||||||
SaveMacros(obj);
|
SaveMacros(obj);
|
||||||
SaveGlobalMacroSettings(obj);
|
SaveGlobalMacroSettings(obj);
|
||||||
SaveVariables(obj);
|
|
||||||
saveWindowTitleSwitches(obj);
|
saveWindowTitleSwitches(obj);
|
||||||
saveScreenRegionSwitches(obj);
|
saveScreenRegionSwitches(obj);
|
||||||
savePauseSwitches(obj);
|
savePauseSwitches(obj);
|
||||||
@@ -524,6 +627,9 @@ void SwitcherData::SaveGeneralSettings(obs_data_t *obj)
|
|||||||
disableFilterComboboxFilter);
|
disableFilterComboboxFilter);
|
||||||
obs_data_set_bool(obj, "warnPluginLoadFailure", warnPluginLoadFailure);
|
obs_data_set_bool(obj, "warnPluginLoadFailure", warnPluginLoadFailure);
|
||||||
obs_data_set_bool(obj, "hideLegacyTabs", hideLegacyTabs);
|
obs_data_set_bool(obj, "hideLegacyTabs", hideLegacyTabs);
|
||||||
|
obs_data_set_bool(obj, "settingsLockEnabled", settingsLockEnabled);
|
||||||
|
obs_data_set_string(obj, "settingsLockPassword",
|
||||||
|
settingsLockPassword.c_str());
|
||||||
|
|
||||||
SaveFunctionPriorities(obj, functionNamesByPriority);
|
SaveFunctionPriorities(obj, functionNamesByPriority);
|
||||||
|
|
||||||
@@ -595,6 +701,8 @@ void SwitcherData::LoadGeneralSettings(obs_data_t *obj)
|
|||||||
warnPluginLoadFailure = obs_data_get_bool(obj, "warnPluginLoadFailure");
|
warnPluginLoadFailure = obs_data_get_bool(obj, "warnPluginLoadFailure");
|
||||||
obs_data_set_default_bool(obj, "hideLegacyTabs", true);
|
obs_data_set_default_bool(obj, "hideLegacyTabs", true);
|
||||||
hideLegacyTabs = obs_data_get_bool(obj, "hideLegacyTabs");
|
hideLegacyTabs = obs_data_get_bool(obj, "hideLegacyTabs");
|
||||||
|
settingsLockEnabled = obs_data_get_bool(obj, "settingsLockEnabled");
|
||||||
|
settingsLockPassword = obs_data_get_string(obj, "settingsLockPassword");
|
||||||
|
|
||||||
SetDefaultFunctionPriorities(obj);
|
SetDefaultFunctionPriorities(obj);
|
||||||
LoadFunctionPriorities(obj, functionNamesByPriority);
|
LoadFunctionPriorities(obj, functionNamesByPriority);
|
||||||
@@ -915,7 +1023,9 @@ void AdvSceneSwitcher::SetupGeneralTab()
|
|||||||
FilterComboBox::SetFilterBehaviourEnabled(
|
FilterComboBox::SetFilterBehaviourEnabled(
|
||||||
!switcher->disableFilterComboboxFilter);
|
!switcher->disableFilterComboboxFilter);
|
||||||
ui->warnPluginLoadFailure->setChecked(switcher->warnPluginLoadFailure);
|
ui->warnPluginLoadFailure->setChecked(switcher->warnPluginLoadFailure);
|
||||||
|
ui->suppressCrashRecoveryDialog->setChecked(GetSuppressCrashDialog());
|
||||||
ui->hideLegacyTabs->setChecked(switcher->hideLegacyTabs);
|
ui->hideLegacyTabs->setChecked(switcher->hideLegacyTabs);
|
||||||
|
ui->settingsLock->setChecked(switcher->settingsLockEnabled);
|
||||||
|
|
||||||
populatePriorityFunctionList(ui->priorityList);
|
populatePriorityFunctionList(ui->priorityList);
|
||||||
populateThreadPriorityList(ui->threadPriority);
|
populateThreadPriorityList(ui->threadPriority);
|
||||||
|
|||||||
@@ -92,12 +92,11 @@ bool SwitcherData::checkExeSwitch(OBSWeakSource &scene,
|
|||||||
}
|
}
|
||||||
|
|
||||||
std::string title = switcher->currentTitle;
|
std::string title = switcher->currentTitle;
|
||||||
QStringList runningProcesses;
|
|
||||||
bool ignored = false;
|
bool ignored = false;
|
||||||
bool match = false;
|
bool match = false;
|
||||||
|
|
||||||
// Check for match
|
// Check for match
|
||||||
GetProcessList(runningProcesses);
|
const auto runningProcesses = GetProcessList();
|
||||||
for (ExecutableSwitch &s : executableSwitches) {
|
for (ExecutableSwitch &s : executableSwitches) {
|
||||||
if (!s.initialized()) {
|
if (!s.initialized()) {
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
@@ -178,47 +178,19 @@ void AdvSceneSwitcher::on_ignoreWindows_currentRowChanged(int idx)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void checkWindowTitleSwitchDirect(WindowSwitch &s,
|
static bool windowInfoMatchesSwitch(const WindowInfo &info,
|
||||||
std::string ¤tWindowTitle, bool &match,
|
const WindowSwitch &s)
|
||||||
OBSWeakSource &scene,
|
|
||||||
OBSWeakSource &transition)
|
|
||||||
{
|
{
|
||||||
bool focus = (!s.focus || s.window == currentWindowTitle);
|
if (s.focus && !info.focused) {
|
||||||
bool fullscreen = (!s.fullscreen || IsFullscreen(s.window));
|
return false;
|
||||||
bool max = (!s.maximized || IsMaximized(s.window));
|
|
||||||
|
|
||||||
if (focus && fullscreen && max) {
|
|
||||||
match = true;
|
|
||||||
scene = s.getScene();
|
|
||||||
transition = s.transition;
|
|
||||||
}
|
}
|
||||||
}
|
if (s.fullscreen && !info.fullscreen) {
|
||||||
|
return false;
|
||||||
void checkWindowTitleSwitchRegex(WindowSwitch &s,
|
|
||||||
std::string ¤tWindowTitle,
|
|
||||||
std::vector<std::string> windowList,
|
|
||||||
bool &match, OBSWeakSource &scene,
|
|
||||||
OBSWeakSource &transition)
|
|
||||||
{
|
|
||||||
for (auto &window : windowList) {
|
|
||||||
try {
|
|
||||||
std::regex expr(s.window);
|
|
||||||
if (!std::regex_match(window, expr)) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
} catch (const std::regex_error &) {
|
|
||||||
}
|
|
||||||
|
|
||||||
bool focus = (!s.focus || window == currentWindowTitle);
|
|
||||||
bool fullscreen = (!s.fullscreen || IsFullscreen(window));
|
|
||||||
bool max = (!s.maximized || IsMaximized(window));
|
|
||||||
|
|
||||||
if (focus && fullscreen && max) {
|
|
||||||
match = true;
|
|
||||||
scene = s.getScene();
|
|
||||||
transition = s.transition;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
if (s.maximized && !info.maximized) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SwitcherData::checkWindowTitleSwitch(OBSWeakSource &scene,
|
bool SwitcherData::checkWindowTitleSwitch(OBSWeakSource &scene,
|
||||||
@@ -228,24 +200,37 @@ bool SwitcherData::checkWindowTitleSwitch(OBSWeakSource &scene,
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string currentWindowTitle = switcher->currentTitle;
|
|
||||||
bool match = false;
|
bool match = false;
|
||||||
std::vector<std::string> windowList;
|
|
||||||
GetWindowList(windowList);
|
WindowQueryOptions options;
|
||||||
|
options.focus = true;
|
||||||
|
options.fullscreen = true;
|
||||||
|
options.maximized = true;
|
||||||
|
const auto windows = GetWindows(options);
|
||||||
|
|
||||||
for (WindowSwitch &s : windowSwitches) {
|
for (WindowSwitch &s : windowSwitches) {
|
||||||
if (!s.initialized()) {
|
if (!s.initialized()) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (std::find(windowList.begin(), windowList.end(), s.window) !=
|
for (const auto &info : windows) {
|
||||||
windowList.end()) {
|
bool titleMatch = false;
|
||||||
checkWindowTitleSwitchDirect(s, currentWindowTitle,
|
try {
|
||||||
match, scene, transition);
|
std::regex expr(s.window);
|
||||||
} else {
|
titleMatch = info.title == s.window ||
|
||||||
checkWindowTitleSwitchRegex(s, currentWindowTitle,
|
std::regex_match(info.title, expr);
|
||||||
windowList, match, scene,
|
} catch (const std::regex_error &) {
|
||||||
transition);
|
titleMatch = info.title == s.window;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!titleMatch || !windowInfoMatchesSwitch(info, s)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
match = true;
|
||||||
|
scene = s.getScene();
|
||||||
|
transition = s.transition;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (match) {
|
if (match) {
|
||||||
|
|||||||
@@ -32,6 +32,9 @@
|
|||||||
#endif
|
#endif
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
#include <climits>
|
||||||
|
#include <dirent.h>
|
||||||
|
#include <unistd.h>
|
||||||
#include "kwin-helpers.h"
|
#include "kwin-helpers.h"
|
||||||
|
|
||||||
namespace advss {
|
namespace advss {
|
||||||
@@ -233,28 +236,89 @@ std::string getWindowName(Window window)
|
|||||||
return windowTitle;
|
return windowTitle;
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetWindowList(std::vector<std::string> &windows)
|
std::vector<WindowInfo> GetWindows(const WindowQueryOptions &options)
|
||||||
{
|
{
|
||||||
windows.resize(0);
|
const std::string foregroundTitle = GetCurrentWindowTitle();
|
||||||
for (auto window : getTopLevelWindows()) {
|
const auto topLevel = getTopLevelWindows();
|
||||||
auto name = getWindowName(window);
|
auto display = disp();
|
||||||
if (name.empty()) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
windows.emplace_back(name);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void GetWindowList(QStringList &windows)
|
std::vector<WindowInfo> result;
|
||||||
{
|
result.reserve(topLevel.size());
|
||||||
windows.clear();
|
|
||||||
for (auto window : getTopLevelWindows()) {
|
for (auto window : topLevel) {
|
||||||
auto name = getWindowName(window);
|
auto name = getWindowName(window);
|
||||||
if (name.empty()) {
|
if (name.empty()) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
windows << QString::fromStdString(name);
|
|
||||||
|
WindowInfo info;
|
||||||
|
info.title = name;
|
||||||
|
|
||||||
|
if (options.focus) {
|
||||||
|
info.focused = (name == foregroundTitle);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (options.fullscreen || options.maximized) {
|
||||||
|
QStringList states = getStates(window);
|
||||||
|
if (options.fullscreen) {
|
||||||
|
info.fullscreen = states.contains(
|
||||||
|
"_NET_WM_STATE_FULLSCREEN");
|
||||||
|
}
|
||||||
|
if (options.maximized) {
|
||||||
|
info.maximized =
|
||||||
|
states.contains(
|
||||||
|
"_NET_WM_STATE_MAXIMIZED_VERT") &&
|
||||||
|
states.contains(
|
||||||
|
"_NET_WM_STATE_MAXIMIZED_HORZ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (options.geometry && display) {
|
||||||
|
XWindowAttributes attrs;
|
||||||
|
if (XGetWindowAttributes(display, window, &attrs)) {
|
||||||
|
int x = 0;
|
||||||
|
int y = 0;
|
||||||
|
Window child;
|
||||||
|
XTranslateCoordinates(
|
||||||
|
display, window,
|
||||||
|
DefaultRootWindow(display), 0, 0, &x,
|
||||||
|
&y, &child);
|
||||||
|
info.x = x;
|
||||||
|
info.y = y;
|
||||||
|
info.width = attrs.width;
|
||||||
|
info.height = attrs.height;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// windowClass and text not implemented on Linux
|
||||||
|
result.emplace_back(std::move(info));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// When KWin compat is active, native Wayland windows are not tracked by
|
||||||
|
// X11 and therefore do not appear in the list above. Merge in any window
|
||||||
|
// reported by KWin that is not already present (matched by title) so that
|
||||||
|
// title and focus conditions work for native Wayland windows.
|
||||||
|
if (KWin) {
|
||||||
|
for (const auto &[pid, title] :
|
||||||
|
FocusNotifier::getWindowList()) {
|
||||||
|
bool found = false;
|
||||||
|
for (const auto &info : result) {
|
||||||
|
if (info.title == title) {
|
||||||
|
found = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!found) {
|
||||||
|
WindowInfo waylandWindow;
|
||||||
|
waylandWindow.title = title;
|
||||||
|
waylandWindow.focused =
|
||||||
|
(title == foregroundTitle);
|
||||||
|
result.emplace_back(std::move(waylandWindow));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
int getActiveWindow(Window *&window)
|
int getActiveWindow(Window *&window)
|
||||||
@@ -278,91 +342,24 @@ int getActiveWindow(Window *&window)
|
|||||||
&bytes, (uint8_t **)&window);
|
&bytes, (uint8_t **)&window);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetCurrentWindowTitle(std::string &title)
|
std::string GetCurrentWindowTitle()
|
||||||
{
|
{
|
||||||
if (KWin) {
|
if (KWin) {
|
||||||
title = FocusNotifier::getActiveWindowTitle();
|
return FocusNotifier::getActiveWindowTitle();
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Window *data = 0;
|
Window *data = 0;
|
||||||
if (getActiveWindow(data) != Success || !data) {
|
if (getActiveWindow(data) != Success || !data) {
|
||||||
return;
|
return {};
|
||||||
}
|
}
|
||||||
if (!data[0]) {
|
if (!data[0]) {
|
||||||
XFree(data);
|
XFree(data);
|
||||||
return;
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
auto name = getWindowName(data[0]);
|
auto name = getWindowName(data[0]);
|
||||||
XFree(data);
|
XFree(data);
|
||||||
|
return name;
|
||||||
if (name.empty()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
title = name;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool windowStatesAreSet(const std::string &windowTitle,
|
|
||||||
std::vector<QString> &expectedStates)
|
|
||||||
{
|
|
||||||
if (!ewmhIsSupported()) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
std::vector<Window> windows = getTopLevelWindows();
|
|
||||||
for (auto &window : windows) {
|
|
||||||
auto name = getWindowName(window);
|
|
||||||
if (name.empty()) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool equals = windowTitle == name;
|
|
||||||
bool matches = QString::fromStdString(name).contains(
|
|
||||||
QRegularExpression(
|
|
||||||
QString::fromStdString(windowTitle)));
|
|
||||||
|
|
||||||
if (!(equals || matches)) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
QStringList states = getStates(window);
|
|
||||||
if (states.isEmpty()) {
|
|
||||||
if (expectedStates.empty()) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (const auto &state : expectedStates) {
|
|
||||||
if (!states.contains(state)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool IsMaximized(const std::string &title)
|
|
||||||
{
|
|
||||||
std::vector<QString> states;
|
|
||||||
states.emplace_back("_NET_WM_STATE_MAXIMIZED_VERT");
|
|
||||||
states.emplace_back("_NET_WM_STATE_MAXIMIZED_HORZ");
|
|
||||||
return windowStatesAreSet(title, states);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool IsFullscreen(const std::string &title)
|
|
||||||
{
|
|
||||||
std::vector<QString> states;
|
|
||||||
states.emplace_back("_NET_WM_STATE_FULLSCREEN");
|
|
||||||
return windowStatesAreSet(title, states);
|
|
||||||
}
|
|
||||||
|
|
||||||
std::optional<std::string> GetTextInWindow(const std::string &)
|
|
||||||
{
|
|
||||||
// Not implemented
|
|
||||||
return {};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void getProcessListProcps(QStringList &processes)
|
static void getProcessListProcps(QStringList &processes)
|
||||||
@@ -409,16 +406,17 @@ static void getProcessListProcps2(QStringList &processes)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetProcessList(QStringList &processes)
|
QStringList GetProcessList()
|
||||||
{
|
{
|
||||||
processes.clear();
|
QStringList processes;
|
||||||
if (libprocpsSupported) {
|
if (libprocpsSupported) {
|
||||||
getProcessListProcps(processes);
|
getProcessListProcps(processes);
|
||||||
return;
|
return processes;
|
||||||
}
|
}
|
||||||
if (libprocps2Supported) {
|
if (libprocps2Supported) {
|
||||||
getProcessListProcps2(processes);
|
getProcessListProcps2(processes);
|
||||||
}
|
}
|
||||||
|
return processes;
|
||||||
}
|
}
|
||||||
|
|
||||||
long getForegroundProcessPid()
|
long getForegroundProcessPid()
|
||||||
@@ -469,24 +467,83 @@ std::string getProcNameFromPid(long pid)
|
|||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetForegroundProcessName(QString &proc)
|
std::string GetForegroundProcessName()
|
||||||
{
|
{
|
||||||
std::string temp;
|
auto pid = getForegroundProcessPid();
|
||||||
GetForegroundProcessName(temp);
|
return getProcNameFromPid(pid);
|
||||||
proc = QString::fromStdString(temp);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetForegroundProcessName(std::string &proc)
|
static std::string getProcessPathFromPid(long pid)
|
||||||
|
{
|
||||||
|
std::string linkPath = "/proc/" + std::to_string(pid) + "/exe";
|
||||||
|
char buf[PATH_MAX];
|
||||||
|
ssize_t len = readlink(linkPath.c_str(), buf, sizeof(buf) - 1);
|
||||||
|
if (len <= 0) {
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
buf[len] = '\0';
|
||||||
|
return buf;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string GetForegroundProcessPath()
|
||||||
{
|
{
|
||||||
proc.resize(0);
|
|
||||||
auto pid = getForegroundProcessPid();
|
auto pid = getForegroundProcessPid();
|
||||||
proc = getProcNameFromPid(pid);
|
if (pid <= 0) {
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
return getProcessPathFromPid(pid);
|
||||||
|
}
|
||||||
|
|
||||||
|
QStringList GetProcessPathsFromName(const QString &name)
|
||||||
|
{
|
||||||
|
QStringList paths;
|
||||||
|
const std::string nameStr = name.toStdString();
|
||||||
|
DIR *procDir = opendir("/proc");
|
||||||
|
if (!procDir) {
|
||||||
|
return paths;
|
||||||
|
}
|
||||||
|
|
||||||
|
struct dirent *entry;
|
||||||
|
while ((entry = readdir(procDir)) != nullptr) {
|
||||||
|
bool isPid = (entry->d_name[0] != '\0');
|
||||||
|
for (const char *c = entry->d_name; *c; c++) {
|
||||||
|
if (!isdigit(*c)) {
|
||||||
|
isPid = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!isPid) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string pid = entry->d_name;
|
||||||
|
std::string commPath = "/proc/" + pid + "/comm";
|
||||||
|
std::ifstream commFile(commPath);
|
||||||
|
if (!commFile) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
std::string comm;
|
||||||
|
std::getline(commFile, comm);
|
||||||
|
if (comm != nameStr) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string path = getProcessPathFromPid(std::stol(pid));
|
||||||
|
if (path.empty()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
QString qPath = QString::fromStdString(path);
|
||||||
|
if (!paths.contains(qPath)) {
|
||||||
|
paths.append(qPath);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
closedir(procDir);
|
||||||
|
return paths;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool IsInFocus(const QString &executable)
|
bool IsInFocus(const QString &executable)
|
||||||
{
|
{
|
||||||
std::string current;
|
const auto current = GetForegroundProcessName();
|
||||||
GetForegroundProcessName(current);
|
|
||||||
|
|
||||||
// True if executable switch equals current window
|
// True if executable switch equals current window
|
||||||
bool equals = (executable.toStdString() == current);
|
bool equals = (executable.toStdString() == current);
|
||||||
|
|||||||
@@ -12,35 +12,82 @@
|
|||||||
|
|
||||||
namespace advss {
|
namespace advss {
|
||||||
|
|
||||||
|
std::mutex FocusNotifier::_mutex;
|
||||||
int FocusNotifier::activePID = -1;
|
int FocusNotifier::activePID = -1;
|
||||||
std::string FocusNotifier::activeTitle = {};
|
std::string FocusNotifier::activeTitle = {};
|
||||||
|
std::map<std::string, std::pair<int, std::string>> FocusNotifier::_windows;
|
||||||
|
|
||||||
int FocusNotifier::getActiveWindowPID()
|
int FocusNotifier::getActiveWindowPID()
|
||||||
{
|
{
|
||||||
|
std::lock_guard<std::mutex> lock(_mutex);
|
||||||
return activePID;
|
return activePID;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string FocusNotifier::getActiveWindowTitle()
|
std::string FocusNotifier::getActiveWindowTitle()
|
||||||
{
|
{
|
||||||
|
std::lock_guard<std::mutex> lock(_mutex);
|
||||||
return activeTitle;
|
return activeTitle;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::vector<std::pair<int, std::string>> FocusNotifier::getWindowList()
|
||||||
|
{
|
||||||
|
std::lock_guard<std::mutex> lock(_mutex);
|
||||||
|
std::vector<std::pair<int, std::string>> result;
|
||||||
|
result.reserve(_windows.size());
|
||||||
|
for (const auto &entry : _windows) {
|
||||||
|
result.emplace_back(entry.second);
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
void FocusNotifier::focusChanged(const int pid)
|
void FocusNotifier::focusChanged(const int pid)
|
||||||
{
|
{
|
||||||
|
std::lock_guard<std::mutex> lock(_mutex);
|
||||||
activePID = pid;
|
activePID = pid;
|
||||||
}
|
}
|
||||||
|
|
||||||
void FocusNotifier::focusTitle(const QString &title)
|
void FocusNotifier::focusTitle(const QString &title)
|
||||||
{
|
{
|
||||||
|
std::lock_guard<std::mutex> lock(_mutex);
|
||||||
activeTitle = title.toStdString();
|
activeTitle = title.toStdString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void FocusNotifier::focusUpdate(const int pid, const QString &title)
|
||||||
|
{
|
||||||
|
std::lock_guard<std::mutex> lock(_mutex);
|
||||||
|
activePID = pid;
|
||||||
|
activeTitle = title.toStdString();
|
||||||
|
}
|
||||||
|
|
||||||
|
void FocusNotifier::windowAdded(const QString &id, const int pid,
|
||||||
|
const QString &title)
|
||||||
|
{
|
||||||
|
std::lock_guard<std::mutex> lock(_mutex);
|
||||||
|
_windows[id.toStdString()] = {pid, title.toStdString()};
|
||||||
|
}
|
||||||
|
|
||||||
|
void FocusNotifier::windowRemoved(const QString &id)
|
||||||
|
{
|
||||||
|
std::lock_guard<std::mutex> lock(_mutex);
|
||||||
|
_windows.erase(id.toStdString());
|
||||||
|
}
|
||||||
|
|
||||||
|
void FocusNotifier::windowTitleChanged(const QString &id, const QString &title)
|
||||||
|
{
|
||||||
|
std::lock_guard<std::mutex> lock(_mutex);
|
||||||
|
auto it = _windows.find(id.toStdString());
|
||||||
|
if (it != _windows.end()) {
|
||||||
|
it->second.second = title.toStdString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
bool isKWinAvailable()
|
bool isKWinAvailable()
|
||||||
{
|
{
|
||||||
const QDBusConnectionInterface *interface =
|
const QDBusConnectionInterface *interface =
|
||||||
QDBusConnection::sessionBus().interface();
|
QDBusConnection::sessionBus().interface();
|
||||||
if (!interface)
|
if (!interface) {
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
const QStringList services =
|
const QStringList services =
|
||||||
interface->registeredServiceNames().value();
|
interface->registeredServiceNames().value();
|
||||||
@@ -53,25 +100,32 @@ bool startKWinScript(QString &scriptObjectPath)
|
|||||||
"/tmp/AdvancedSceneSwitcher/KWinFocusNotifier.js";
|
"/tmp/AdvancedSceneSwitcher/KWinFocusNotifier.js";
|
||||||
|
|
||||||
const QString script =
|
const QString script =
|
||||||
R"(workspace.windowActivated.connect(function(client) {
|
R"(var adss = "com.github.AdvancedSceneSwitcher";
|
||||||
if (!client) return;
|
var adssPath = "/com/github/AdvancedSceneSwitcher";
|
||||||
if (!client.pid) return;
|
|
||||||
if (!client.caption) return;
|
|
||||||
|
|
||||||
callDBus(
|
function trackWindow(window) {
|
||||||
"com.github.AdvancedSceneSwitcher",
|
var id = window.internalId.toString();
|
||||||
"/com/github/AdvancedSceneSwitcher",
|
callDBus(adss, adssPath, adss, "windowAdded", id, window.pid, window.caption);
|
||||||
"com.github.AdvancedSceneSwitcher",
|
window.captionChanged.connect(function() {
|
||||||
"focusChanged",
|
callDBus(adss, adssPath, adss, "windowTitleChanged", id, window.caption);
|
||||||
client.pid
|
});
|
||||||
);
|
}
|
||||||
callDBus(
|
|
||||||
"com.github.AdvancedSceneSwitcher",
|
var windows = workspace.windowList();
|
||||||
"/com/github/AdvancedSceneSwitcher",
|
for (var i = 0; i < windows.length; i++) {
|
||||||
"com.github.AdvancedSceneSwitcher",
|
trackWindow(windows[i]);
|
||||||
"focusTitle",
|
}
|
||||||
client.caption
|
|
||||||
);
|
workspace.windowAdded.connect(trackWindow);
|
||||||
|
|
||||||
|
workspace.windowRemoved.connect(function(window) {
|
||||||
|
callDBus(adss, adssPath, adss, "windowRemoved", window.internalId.toString());
|
||||||
|
});
|
||||||
|
|
||||||
|
workspace.windowActivated.connect(function(client) {
|
||||||
|
callDBus(adss, adssPath, adss, "focusUpdate",
|
||||||
|
client ? client.pid : 0,
|
||||||
|
client ? client.caption : "");
|
||||||
}))";
|
}))";
|
||||||
|
|
||||||
if (const QDir dir; !dir.mkpath(QFileInfo(scriptPath).absolutePath())) {
|
if (const QDir dir; !dir.mkpath(QFileInfo(scriptPath).absolutePath())) {
|
||||||
|
|||||||
@@ -2,7 +2,11 @@
|
|||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
#include <map>
|
||||||
|
#include <mutex>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
#include <utility>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
namespace advss {
|
namespace advss {
|
||||||
|
|
||||||
@@ -10,18 +14,27 @@ class FocusNotifier final : public QObject {
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_CLASSINFO("D-Bus Interface", "com.github.AdvancedSceneSwitcher")
|
Q_CLASSINFO("D-Bus Interface", "com.github.AdvancedSceneSwitcher")
|
||||||
|
|
||||||
|
static std::mutex _mutex;
|
||||||
static int activePID;
|
static int activePID;
|
||||||
static std::string activeTitle;
|
static std::string activeTitle;
|
||||||
|
// Maps KWin internal window ID to {pid, title}
|
||||||
|
static std::map<std::string, std::pair<int, std::string>> _windows;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
using QObject::QObject;
|
using QObject::QObject;
|
||||||
|
|
||||||
static int getActiveWindowPID();
|
static int getActiveWindowPID();
|
||||||
static std::string getActiveWindowTitle();
|
static std::string getActiveWindowTitle();
|
||||||
|
static std::vector<std::pair<int, std::string>> getWindowList();
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void focusChanged(const int pid);
|
void focusChanged(const int pid);
|
||||||
void focusTitle(const QString &title);
|
void focusTitle(const QString &title);
|
||||||
|
void focusUpdate(const int pid, const QString &title);
|
||||||
|
void windowAdded(const QString &id, const int pid,
|
||||||
|
const QString &title);
|
||||||
|
void windowRemoved(const QString &id);
|
||||||
|
void windowTitleChanged(const QString &id, const QString &title);
|
||||||
};
|
};
|
||||||
|
|
||||||
bool isKWinAvailable();
|
bool isKWinAvailable();
|
||||||
|
|||||||
@@ -49,10 +49,12 @@ MacroActionEdit::MacroActionEdit(QWidget *parent,
|
|||||||
_section->AddHeaderWidget(_enable);
|
_section->AddHeaderWidget(_enable);
|
||||||
_section->AddHeaderWidget(_actionSelection);
|
_section->AddHeaderWidget(_actionSelection);
|
||||||
_section->AddHeaderWidget(_headerInfo);
|
_section->AddHeaderWidget(_headerInfo);
|
||||||
|
_section->AddHeaderWidget(_varMappingToggle);
|
||||||
|
|
||||||
auto actionLayout = new QVBoxLayout;
|
auto actionLayout = new QVBoxLayout;
|
||||||
actionLayout->setContentsMargins({7, 7, 7, 7});
|
actionLayout->setContentsMargins({7, 7, 7, 7});
|
||||||
actionLayout->addWidget(_section);
|
actionLayout->addWidget(_section);
|
||||||
|
actionLayout->addWidget(_outputMappings);
|
||||||
_contentLayout->addLayout(actionLayout);
|
_contentLayout->addLayout(actionLayout);
|
||||||
|
|
||||||
auto mainLayout = new QHBoxLayout;
|
auto mainLayout = new QHBoxLayout;
|
||||||
@@ -61,7 +63,6 @@ MacroActionEdit::MacroActionEdit(QWidget *parent,
|
|||||||
mainLayout->addWidget(_frame);
|
mainLayout->addWidget(_frame);
|
||||||
setLayout(mainLayout);
|
setLayout(mainLayout);
|
||||||
|
|
||||||
_entryData = entryData;
|
|
||||||
SetupWidgets(true);
|
SetupWidgets(true);
|
||||||
|
|
||||||
actionStateTimer->start(300);
|
actionStateTimer->start(300);
|
||||||
@@ -90,7 +91,10 @@ void MacroActionEdit::SetupWidgets(bool basicSetup)
|
|||||||
auto widget = MacroActionFactory::CreateWidget(id, this, *_entryData);
|
auto widget = MacroActionFactory::CreateWidget(id, this, *_entryData);
|
||||||
QWidget::connect(widget, SIGNAL(HeaderInfoChanged(const QString &)),
|
QWidget::connect(widget, SIGNAL(HeaderInfoChanged(const QString &)),
|
||||||
this, SLOT(HeaderInfoChanged(const QString &)));
|
this, SLOT(HeaderInfoChanged(const QString &)));
|
||||||
|
QWidget::connect(widget, SIGNAL(ShowVariableMappings(bool)), this,
|
||||||
|
SLOT(ShowVariableMappings(bool)));
|
||||||
_section->SetContent(widget, (*_entryData)->GetCollapsed());
|
_section->SetContent(widget, (*_entryData)->GetCollapsed());
|
||||||
|
SetupVarMappings((*_entryData).get());
|
||||||
SetFocusPolicyOfWidgets();
|
SetFocusPolicyOfWidgets();
|
||||||
|
|
||||||
_allWidgetsAreSetup = true;
|
_allWidgetsAreSetup = true;
|
||||||
@@ -121,7 +125,10 @@ void MacroActionEdit::ActionSelectionChanged(const QString &text)
|
|||||||
auto widget = MacroActionFactory::CreateWidget(id, this, *_entryData);
|
auto widget = MacroActionFactory::CreateWidget(id, this, *_entryData);
|
||||||
QWidget::connect(widget, SIGNAL(HeaderInfoChanged(const QString &)),
|
QWidget::connect(widget, SIGNAL(HeaderInfoChanged(const QString &)),
|
||||||
this, SLOT(HeaderInfoChanged(const QString &)));
|
this, SLOT(HeaderInfoChanged(const QString &)));
|
||||||
|
QWidget::connect(widget, SIGNAL(ShowVariableMappings(bool)), this,
|
||||||
|
SLOT(ShowVariableMappings(bool)));
|
||||||
_section->SetContent(widget);
|
_section->SetContent(widget);
|
||||||
|
SetupVarMappings((*_entryData).get());
|
||||||
SetFocusPolicyOfWidgets();
|
SetFocusPolicyOfWidgets();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -157,4 +164,9 @@ std::shared_ptr<MacroSegment> MacroActionEdit::Data() const
|
|||||||
return *_entryData;
|
return *_entryData;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MacroActionEdit::FocusTypeSelection()
|
||||||
|
{
|
||||||
|
_actionSelection->setFocus();
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace advss
|
} // namespace advss
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ public:
|
|||||||
std::shared_ptr<MacroAction> * = nullptr);
|
std::shared_ptr<MacroAction> * = nullptr);
|
||||||
void SetupWidgets(bool basicSetup = false);
|
void SetupWidgets(bool basicSetup = false);
|
||||||
void SetEntryData(std::shared_ptr<MacroAction> *);
|
void SetEntryData(std::shared_ptr<MacroAction> *);
|
||||||
|
void FocusTypeSelection() override;
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void ActionSelectionChanged(const QString &text);
|
void ActionSelectionChanged(const QString &text);
|
||||||
|
|||||||
@@ -4,6 +4,8 @@
|
|||||||
#include "macro.hpp"
|
#include "macro.hpp"
|
||||||
#include "macro-action-factory.hpp"
|
#include "macro-action-factory.hpp"
|
||||||
|
|
||||||
|
#include <chrono>
|
||||||
|
|
||||||
namespace advss {
|
namespace advss {
|
||||||
|
|
||||||
const std::string MacroActionMacro::id = "macro";
|
const std::string MacroActionMacro::id = "macro";
|
||||||
@@ -118,6 +120,45 @@ bool MacroActionMacro::PerformAction()
|
|||||||
case Action::TOGGLE_ACTION:
|
case Action::TOGGLE_ACTION:
|
||||||
AdjustActionState(macro);
|
AdjustActionState(macro);
|
||||||
break;
|
break;
|
||||||
|
case Action::RUN_MACRO: {
|
||||||
|
if (_runOptions.skipWhenPaused && macro->Paused()) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
const bool conditionsMatched =
|
||||||
|
macro->CheckConditions(true);
|
||||||
|
macro->PerformActions(conditionsMatched, false, true);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case Action::GET_INFO: {
|
||||||
|
SetTempVarValue(
|
||||||
|
"conditionCount",
|
||||||
|
std::to_string(macro->Conditions().size()));
|
||||||
|
SetTempVarValue(
|
||||||
|
"actionCount",
|
||||||
|
std::to_string(macro->Actions().size()));
|
||||||
|
SetTempVarValue(
|
||||||
|
"elseActionCount",
|
||||||
|
std::to_string(macro->ElseActions().size()));
|
||||||
|
SetTempVarValue("paused",
|
||||||
|
macro->Paused() ? "true" : "false");
|
||||||
|
SetTempVarValue("runCount",
|
||||||
|
std::to_string(macro->RunCount()));
|
||||||
|
const auto lastRun = macro->GetLastExecutionTime();
|
||||||
|
const bool hasRun =
|
||||||
|
lastRun.time_since_epoch().count() != 0;
|
||||||
|
const auto secondsSinceLastRun =
|
||||||
|
hasRun ? std::chrono::duration_cast<
|
||||||
|
std::chrono::seconds>(
|
||||||
|
std::chrono::
|
||||||
|
high_resolution_clock::
|
||||||
|
now() -
|
||||||
|
lastRun)
|
||||||
|
.count()
|
||||||
|
: -1;
|
||||||
|
SetTempVarValue("secondsSinceLastRun",
|
||||||
|
std::to_string(secondsSinceLastRun));
|
||||||
|
break;
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -175,6 +216,12 @@ void MacroActionMacro::LogAction() const
|
|||||||
case Action::NESTED_MACRO:
|
case Action::NESTED_MACRO:
|
||||||
ablog(LOG_INFO, "run nested macro");
|
ablog(LOG_INFO, "run nested macro");
|
||||||
break;
|
break;
|
||||||
|
case Action::GET_INFO:
|
||||||
|
ablog(LOG_INFO, "get info for \"%s\"", macro->Name().c_str());
|
||||||
|
break;
|
||||||
|
case Action::RUN_MACRO:
|
||||||
|
ablog(LOG_INFO, "run macro \"%s\"", macro->Name().c_str());
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -202,8 +249,8 @@ bool MacroActionMacro::Save(obs_data_t *obj) const
|
|||||||
bool MacroActionMacro::Load(obs_data_t *obj)
|
bool MacroActionMacro::Load(obs_data_t *obj)
|
||||||
{
|
{
|
||||||
MacroAction::Load(obj);
|
MacroAction::Load(obj);
|
||||||
_action = static_cast<MacroActionMacro::Action>(
|
SetAction(static_cast<MacroActionMacro::Action>(
|
||||||
obs_data_get_int(obj, "action"));
|
obs_data_get_int(obj, "action")));
|
||||||
_macro.Load(obj);
|
_macro.Load(obj);
|
||||||
_actionSelectionType = static_cast<SelectionType>(
|
_actionSelectionType = static_cast<SelectionType>(
|
||||||
obs_data_get_int(obj, "actionSelectionType"));
|
obs_data_get_int(obj, "actionSelectionType"));
|
||||||
@@ -216,6 +263,7 @@ bool MacroActionMacro::Load(obs_data_t *obj)
|
|||||||
if (obs_data_has_user_value(obj, "nestedMacro")) {
|
if (obs_data_has_user_value(obj, "nestedMacro")) {
|
||||||
OBSDataAutoRelease nestedMacroData =
|
OBSDataAutoRelease nestedMacroData =
|
||||||
obs_data_get_obj(obj, "nestedMacro");
|
obs_data_get_obj(obj, "nestedMacro");
|
||||||
|
_nestedMacro = std::make_shared<Macro>();
|
||||||
_nestedMacro->Load(nestedMacroData);
|
_nestedMacro->Load(nestedMacroData);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -262,6 +310,15 @@ void MacroActionMacro::ResolveVariablesToFixedValues()
|
|||||||
{
|
{
|
||||||
_actionIndex.ResolveVariables();
|
_actionIndex.ResolveVariables();
|
||||||
_label.ResolveVariables();
|
_label.ResolveVariables();
|
||||||
|
|
||||||
|
if (_action == Action::NESTED_MACRO) {
|
||||||
|
for (auto &action : _nestedMacro->Actions()) {
|
||||||
|
action->ResolveVariablesToFixedValues();
|
||||||
|
}
|
||||||
|
for (auto &action : _nestedMacro->ElseActions()) {
|
||||||
|
action->ResolveVariablesToFixedValues();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void runActionsHelper(Macro *macro, bool runElseActions, bool setInputs,
|
static void runActionsHelper(Macro *macro, bool runElseActions, bool setInputs,
|
||||||
@@ -303,6 +360,56 @@ void MacroActionMacro::RunActions(Macro *actionMacro) const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MacroActionMacro::SetAction(Action action)
|
||||||
|
{
|
||||||
|
_action = action;
|
||||||
|
SetupTempVars();
|
||||||
|
}
|
||||||
|
|
||||||
|
void MacroActionMacro::SetupTempVars()
|
||||||
|
{
|
||||||
|
MacroAction::SetupTempVars();
|
||||||
|
|
||||||
|
if (_action != Action::GET_INFO) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
AddTempvar(
|
||||||
|
"conditionCount",
|
||||||
|
obs_module_text(
|
||||||
|
"AdvSceneSwitcher.tempVar.macro.info.conditionCount"),
|
||||||
|
obs_module_text(
|
||||||
|
"AdvSceneSwitcher.tempVar.macro.info.conditionCount.description"));
|
||||||
|
AddTempvar(
|
||||||
|
"actionCount",
|
||||||
|
obs_module_text(
|
||||||
|
"AdvSceneSwitcher.tempVar.macro.info.actionCount"),
|
||||||
|
obs_module_text(
|
||||||
|
"AdvSceneSwitcher.tempVar.macro.info.actionCount.description"));
|
||||||
|
AddTempvar(
|
||||||
|
"elseActionCount",
|
||||||
|
obs_module_text(
|
||||||
|
"AdvSceneSwitcher.tempVar.macro.info.elseActionCount"),
|
||||||
|
obs_module_text(
|
||||||
|
"AdvSceneSwitcher.tempVar.macro.info.elseActionCount.description"));
|
||||||
|
AddTempvar(
|
||||||
|
"paused",
|
||||||
|
obs_module_text("AdvSceneSwitcher.tempVar.macro.info.paused"),
|
||||||
|
obs_module_text(
|
||||||
|
"AdvSceneSwitcher.tempVar.macro.info.paused.description"));
|
||||||
|
AddTempvar(
|
||||||
|
"runCount",
|
||||||
|
obs_module_text("AdvSceneSwitcher.tempVar.macro.info.runCount"),
|
||||||
|
obs_module_text(
|
||||||
|
"AdvSceneSwitcher.tempVar.macro.info.runCount.description"));
|
||||||
|
AddTempvar(
|
||||||
|
"secondsSinceLastRun",
|
||||||
|
obs_module_text(
|
||||||
|
"AdvSceneSwitcher.tempVar.macro.info.secondsSinceLastRun"),
|
||||||
|
obs_module_text(
|
||||||
|
"AdvSceneSwitcher.tempVar.macro.info.secondsSinceLastRun.description"));
|
||||||
|
}
|
||||||
|
|
||||||
static void populateActionSelection(QComboBox *list)
|
static void populateActionSelection(QComboBox *list)
|
||||||
{
|
{
|
||||||
static const std::vector<std::pair<MacroActionMacro::Action, std::string>>
|
static const std::vector<std::pair<MacroActionMacro::Action, std::string>>
|
||||||
@@ -318,7 +425,9 @@ static void populateActionSelection(QComboBox *list)
|
|||||||
{MacroActionMacro::Action::NESTED_MACRO,
|
{MacroActionMacro::Action::NESTED_MACRO,
|
||||||
"AdvSceneSwitcher.action.macro.type.nestedMacro"},
|
"AdvSceneSwitcher.action.macro.type.nestedMacro"},
|
||||||
{MacroActionMacro::Action::RUN_ACTIONS,
|
{MacroActionMacro::Action::RUN_ACTIONS,
|
||||||
"AdvSceneSwitcher.action.macro.type.run"},
|
"AdvSceneSwitcher.action.macro.type.runActions"},
|
||||||
|
{MacroActionMacro::Action::RUN_MACRO,
|
||||||
|
"AdvSceneSwitcher.action.macro.type.runMacro"},
|
||||||
{MacroActionMacro::Action::STOP,
|
{MacroActionMacro::Action::STOP,
|
||||||
"AdvSceneSwitcher.action.macro.type.stop"},
|
"AdvSceneSwitcher.action.macro.type.stop"},
|
||||||
{MacroActionMacro::Action::DISABLE_ACTION,
|
{MacroActionMacro::Action::DISABLE_ACTION,
|
||||||
@@ -327,6 +436,8 @@ static void populateActionSelection(QComboBox *list)
|
|||||||
"AdvSceneSwitcher.action.macro.type.enableAction"},
|
"AdvSceneSwitcher.action.macro.type.enableAction"},
|
||||||
{MacroActionMacro::Action::TOGGLE_ACTION,
|
{MacroActionMacro::Action::TOGGLE_ACTION,
|
||||||
"AdvSceneSwitcher.action.macro.type.toggleAction"},
|
"AdvSceneSwitcher.action.macro.type.toggleAction"},
|
||||||
|
{MacroActionMacro::Action::GET_INFO,
|
||||||
|
"AdvSceneSwitcher.action.macro.type.getInfo"},
|
||||||
};
|
};
|
||||||
|
|
||||||
for (const auto &[value, name] : actions) {
|
for (const auto &[value, name] : actions) {
|
||||||
@@ -396,6 +507,10 @@ MacroActionMacroEdit::MacroActionMacroEdit(
|
|||||||
_actionSections(new QComboBox(this)),
|
_actionSections(new QComboBox(this)),
|
||||||
_skipWhenPaused(new QCheckBox(obs_module_text(
|
_skipWhenPaused(new QCheckBox(obs_module_text(
|
||||||
"AdvSceneSwitcher.action.macro.type.run.skipWhenPaused"))),
|
"AdvSceneSwitcher.action.macro.type.run.skipWhenPaused"))),
|
||||||
|
_noConditionsWarning(new QLabel(obs_module_text(
|
||||||
|
"AdvSceneSwitcher.action.macro.type.runMacro.noConditionsWarning"))),
|
||||||
|
_runMacroHelp(new HelpIcon(obs_module_text(
|
||||||
|
"AdvSceneSwitcher.action.macro.type.runMacro.help"))),
|
||||||
_setInputs(new QCheckBox(obs_module_text(
|
_setInputs(new QCheckBox(obs_module_text(
|
||||||
"AdvSceneSwitcher.action.macro.type.run.setInputs"))),
|
"AdvSceneSwitcher.action.macro.type.run.setInputs"))),
|
||||||
_inputs(new MacroInputEdit()),
|
_inputs(new MacroInputEdit()),
|
||||||
@@ -469,6 +584,7 @@ MacroActionMacroEdit::MacroActionMacroEdit(
|
|||||||
layout->addLayout(_setInputsLayout);
|
layout->addLayout(_setInputsLayout);
|
||||||
layout->addWidget(_inputs);
|
layout->addWidget(_inputs);
|
||||||
layout->addWidget(_skipWhenPaused);
|
layout->addWidget(_skipWhenPaused);
|
||||||
|
layout->addWidget(_noConditionsWarning);
|
||||||
layout->addWidget(_nestedMacro);
|
layout->addWidget(_nestedMacro);
|
||||||
setLayout(layout);
|
setLayout(layout);
|
||||||
_entryData = entryData;
|
_entryData = entryData;
|
||||||
@@ -496,7 +612,7 @@ void MacroActionMacroEdit::UpdateEntryData()
|
|||||||
}
|
}
|
||||||
|
|
||||||
_actions->setCurrentIndex(
|
_actions->setCurrentIndex(
|
||||||
_actions->findData(static_cast<int>(_entryData->_action)));
|
_actions->findData(static_cast<int>(_entryData->GetAction())));
|
||||||
_actionSelectionType->setCurrentIndex(_actionSelectionType->findData(
|
_actionSelectionType->setCurrentIndex(_actionSelectionType->findData(
|
||||||
static_cast<int>(_entryData->_actionSelectionType)));
|
static_cast<int>(_entryData->_actionSelectionType)));
|
||||||
_actionIndex->SetValue(_entryData->_actionIndex);
|
_actionIndex->SetValue(_entryData->_actionIndex);
|
||||||
@@ -545,8 +661,8 @@ void MacroActionMacroEdit::MacroChanged(const QString &text)
|
|||||||
void MacroActionMacroEdit::ActionChanged(int idx)
|
void MacroActionMacroEdit::ActionChanged(int idx)
|
||||||
{
|
{
|
||||||
GUARD_LOADING_AND_LOCK();
|
GUARD_LOADING_AND_LOCK();
|
||||||
_entryData->_action = static_cast<MacroActionMacro::Action>(
|
_entryData->SetAction(static_cast<MacroActionMacro::Action>(
|
||||||
_actions->itemData(idx).toInt());
|
_actions->itemData(idx).toInt()));
|
||||||
SetWidgetVisibility();
|
SetWidgetVisibility();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -638,6 +754,7 @@ void MacroActionMacroEdit::InputsChanged(const StringList &inputs)
|
|||||||
void MacroActionMacroEdit::SetWidgetVisibility()
|
void MacroActionMacroEdit::SetWidgetVisibility()
|
||||||
{
|
{
|
||||||
_entryLayout->removeWidget(_actions);
|
_entryLayout->removeWidget(_actions);
|
||||||
|
_entryLayout->removeWidget(_runMacroHelp);
|
||||||
_entryLayout->removeWidget(_actionIndex);
|
_entryLayout->removeWidget(_actionIndex);
|
||||||
_entryLayout->removeWidget(_macros);
|
_entryLayout->removeWidget(_macros);
|
||||||
_entryLayout->removeWidget(_actionSections);
|
_entryLayout->removeWidget(_actionSections);
|
||||||
@@ -653,6 +770,7 @@ void MacroActionMacroEdit::SetWidgetVisibility()
|
|||||||
|
|
||||||
const std::unordered_map<std::string, QWidget *> placeholders = {
|
const std::unordered_map<std::string, QWidget *> placeholders = {
|
||||||
{"{{actions}}", _actions},
|
{"{{actions}}", _actions},
|
||||||
|
{"{{runMacroHelp}}", _runMacroHelp},
|
||||||
{"{{actionIndex}}", _actionIndex},
|
{"{{actionIndex}}", _actionIndex},
|
||||||
{"{{macros}}", _macros},
|
{"{{macros}}", _macros},
|
||||||
{"{{actionSections}}", _actionSections},
|
{"{{actionSections}}", _actionSections},
|
||||||
@@ -665,7 +783,7 @@ void MacroActionMacroEdit::SetWidgetVisibility()
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const auto action = _entryData->_action;
|
const auto action = _entryData->GetAction();
|
||||||
const char *layoutText = "";
|
const char *layoutText = "";
|
||||||
switch (action) {
|
switch (action) {
|
||||||
case MacroActionMacro::Action::PAUSE:
|
case MacroActionMacro::Action::PAUSE:
|
||||||
@@ -674,8 +792,12 @@ void MacroActionMacroEdit::SetWidgetVisibility()
|
|||||||
case MacroActionMacro::Action::RESET_COUNTER:
|
case MacroActionMacro::Action::RESET_COUNTER:
|
||||||
case MacroActionMacro::Action::STOP:
|
case MacroActionMacro::Action::STOP:
|
||||||
case MacroActionMacro::Action::NESTED_MACRO:
|
case MacroActionMacro::Action::NESTED_MACRO:
|
||||||
|
case MacroActionMacro::Action::GET_INFO:
|
||||||
layoutText = "AdvSceneSwitcher.action.macro.layout.other";
|
layoutText = "AdvSceneSwitcher.action.macro.layout.other";
|
||||||
break;
|
break;
|
||||||
|
case MacroActionMacro::Action::RUN_MACRO:
|
||||||
|
layoutText = "AdvSceneSwitcher.action.macro.layout.runMacro";
|
||||||
|
break;
|
||||||
case MacroActionMacro::Action::RUN_ACTIONS:
|
case MacroActionMacro::Action::RUN_ACTIONS:
|
||||||
layoutText = "AdvSceneSwitcher.action.macro.layout.run";
|
layoutText = "AdvSceneSwitcher.action.macro.layout.run";
|
||||||
break;
|
break;
|
||||||
@@ -702,7 +824,8 @@ void MacroActionMacroEdit::SetWidgetVisibility()
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (action == MacroActionMacro::Action::RUN_ACTIONS ||
|
if (action == MacroActionMacro::Action::RUN_ACTIONS ||
|
||||||
action == MacroActionMacro::Action::STOP) {
|
action == MacroActionMacro::Action::STOP ||
|
||||||
|
action == MacroActionMacro::Action::RUN_MACRO) {
|
||||||
_macros->HideSelectedMacro();
|
_macros->HideSelectedMacro();
|
||||||
} else {
|
} else {
|
||||||
_macros->ShowAllMacros();
|
_macros->ShowAllMacros();
|
||||||
@@ -747,8 +870,19 @@ void MacroActionMacroEdit::SetWidgetVisibility()
|
|||||||
_actionSections->setVisible(
|
_actionSections->setVisible(
|
||||||
action == MacroActionMacro::Action::RUN_ACTIONS ||
|
action == MacroActionMacro::Action::RUN_ACTIONS ||
|
||||||
isModifyingActionState);
|
isModifyingActionState);
|
||||||
_skipWhenPaused->setVisible(action ==
|
_skipWhenPaused->setVisible(
|
||||||
MacroActionMacro::Action::RUN_ACTIONS);
|
action == MacroActionMacro::Action::RUN_ACTIONS ||
|
||||||
|
action == MacroActionMacro::Action::RUN_MACRO);
|
||||||
|
|
||||||
|
if (action == MacroActionMacro::Action::RUN_MACRO) {
|
||||||
|
auto macro = _entryData->_macro.GetMacro();
|
||||||
|
_noConditionsWarning->setVisible(!macro ||
|
||||||
|
macro->Conditions().empty());
|
||||||
|
} else {
|
||||||
|
_noConditionsWarning->setVisible(false);
|
||||||
|
}
|
||||||
|
_runMacroHelp->setVisible(action ==
|
||||||
|
MacroActionMacro::Action::RUN_MACRO);
|
||||||
|
|
||||||
_nestedMacro->setVisible(action ==
|
_nestedMacro->setVisible(action ==
|
||||||
MacroActionMacro::Action::NESTED_MACRO);
|
MacroActionMacro::Action::NESTED_MACRO);
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
|
|
||||||
#include <QCheckBox>
|
#include <QCheckBox>
|
||||||
#include <QHBoxLayout>
|
#include <QHBoxLayout>
|
||||||
|
#include <QLabel>
|
||||||
|
|
||||||
namespace advss {
|
namespace advss {
|
||||||
|
|
||||||
@@ -56,11 +57,15 @@ public:
|
|||||||
TOGGLE_ACTION,
|
TOGGLE_ACTION,
|
||||||
TOGGLE_PAUSE,
|
TOGGLE_PAUSE,
|
||||||
NESTED_MACRO,
|
NESTED_MACRO,
|
||||||
|
GET_INFO,
|
||||||
|
RUN_MACRO,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
void SetAction(Action);
|
||||||
|
Action GetAction() const { return _action; }
|
||||||
|
|
||||||
enum class SelectionType { INDEX, LABEL, ID };
|
enum class SelectionType { INDEX, LABEL, ID };
|
||||||
|
|
||||||
Action _action = Action::NESTED_MACRO;
|
|
||||||
SelectionType _actionSelectionType = SelectionType::INDEX;
|
SelectionType _actionSelectionType = SelectionType::INDEX;
|
||||||
bool _useElseSection = false;
|
bool _useElseSection = false;
|
||||||
IntVariable _actionIndex = 1;
|
IntVariable _actionIndex = 1;
|
||||||
@@ -72,9 +77,12 @@ public:
|
|||||||
int _customWidgetHeight = 0;
|
int _customWidgetHeight = 0;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
void SetupTempVars();
|
||||||
void RunActions(Macro *actionMacro) const;
|
void RunActions(Macro *actionMacro) const;
|
||||||
void AdjustActionState(Macro *) const;
|
void AdjustActionState(Macro *) const;
|
||||||
|
|
||||||
|
Action _action = Action::NESTED_MACRO;
|
||||||
|
|
||||||
static bool _registered;
|
static bool _registered;
|
||||||
static const std::string id;
|
static const std::string id;
|
||||||
};
|
};
|
||||||
@@ -125,6 +133,8 @@ private:
|
|||||||
QCheckBox *_reevaluateConditionState;
|
QCheckBox *_reevaluateConditionState;
|
||||||
QComboBox *_actionSections;
|
QComboBox *_actionSections;
|
||||||
QCheckBox *_skipWhenPaused;
|
QCheckBox *_skipWhenPaused;
|
||||||
|
QLabel *_noConditionsWarning;
|
||||||
|
HelpIcon *_runMacroHelp;
|
||||||
QCheckBox *_setInputs;
|
QCheckBox *_setInputs;
|
||||||
MacroInputEdit *_inputs;
|
MacroInputEdit *_inputs;
|
||||||
QHBoxLayout *_entryLayout;
|
QHBoxLayout *_entryLayout;
|
||||||
|
|||||||
@@ -17,6 +17,15 @@ namespace advss {
|
|||||||
|
|
||||||
const std::string MacroActionVariable::id = "variable";
|
const std::string MacroActionVariable::id = "variable";
|
||||||
|
|
||||||
|
std::vector<TempVariableRef> MacroActionVariable::GetTempVarRefs() const
|
||||||
|
{
|
||||||
|
auto refs = MacroSegment::GetTempVarRefs();
|
||||||
|
if (_tempVar.HasValidID()) {
|
||||||
|
refs.push_back(_tempVar);
|
||||||
|
}
|
||||||
|
return refs;
|
||||||
|
}
|
||||||
|
|
||||||
bool MacroActionVariable::_registered = MacroActionFactory::Register(
|
bool MacroActionVariable::_registered = MacroActionFactory::Register(
|
||||||
MacroActionVariable::id,
|
MacroActionVariable::id,
|
||||||
{MacroActionVariable::Create, MacroActionVariableEdit::Create,
|
{MacroActionVariable::Create, MacroActionVariableEdit::Create,
|
||||||
@@ -1450,6 +1459,7 @@ void MacroActionVariableEdit::SelectionChanged(const TempVariableRef &var)
|
|||||||
{
|
{
|
||||||
GUARD_LOADING_AND_LOCK();
|
GUARD_LOADING_AND_LOCK();
|
||||||
_entryData->_tempVar = var;
|
_entryData->_tempVar = var;
|
||||||
|
IncrementTempVarInUseGeneration();
|
||||||
SetWidgetVisibility();
|
SetWidgetVisibility();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ public:
|
|||||||
bool PostLoad();
|
bool PostLoad();
|
||||||
std::string GetShortDesc() const;
|
std::string GetShortDesc() const;
|
||||||
std::string GetId() const { return id; };
|
std::string GetId() const { return id; };
|
||||||
|
std::vector<TempVariableRef> GetTempVarRefs() const;
|
||||||
static std::shared_ptr<MacroAction> Create(Macro *m);
|
static std::shared_ptr<MacroAction> Create(Macro *m);
|
||||||
std::shared_ptr<MacroAction> Copy() const;
|
std::shared_ptr<MacroAction> Copy() const;
|
||||||
void SetSegmentIndexValue(int);
|
void SetSegmentIndexValue(int);
|
||||||
|
|||||||
@@ -1,10 +1,12 @@
|
|||||||
#include "macro-condition-edit.hpp"
|
#include "macro-condition-edit.hpp"
|
||||||
#include "advanced-scene-switcher.hpp"
|
#include "advanced-scene-switcher.hpp"
|
||||||
|
#include "macro-signals.hpp"
|
||||||
#include "macro-settings.hpp"
|
#include "macro-settings.hpp"
|
||||||
#include "macro.hpp"
|
#include "macro.hpp"
|
||||||
#include "path-helpers.hpp"
|
#include "path-helpers.hpp"
|
||||||
#include "plugin-state-helpers.hpp"
|
#include "plugin-state-helpers.hpp"
|
||||||
#include "section.hpp"
|
#include "section.hpp"
|
||||||
|
#include "switch-button.hpp"
|
||||||
#include "ui-helpers.hpp"
|
#include "ui-helpers.hpp"
|
||||||
#include "utility.hpp"
|
#include "utility.hpp"
|
||||||
|
|
||||||
@@ -102,12 +104,15 @@ MacroConditionEdit::MacroConditionEdit(
|
|||||||
QWidget *parent, std::shared_ptr<MacroCondition> *entryData,
|
QWidget *parent, std::shared_ptr<MacroCondition> *entryData,
|
||||||
bool isRootCondition)
|
bool isRootCondition)
|
||||||
: MacroSegmentEdit(parent),
|
: MacroSegmentEdit(parent),
|
||||||
|
_enable(new SwitchButton()),
|
||||||
_logicSelection(new QComboBox()),
|
_logicSelection(new QComboBox()),
|
||||||
_conditionSelection(new FilterComboBox()),
|
_conditionSelection(new FilterComboBox()),
|
||||||
_dur(new DurationModifierEdit()),
|
_dur(new DurationModifierEdit()),
|
||||||
_entryData(entryData),
|
_entryData(entryData),
|
||||||
_isRoot(isRootCondition)
|
_isRoot(isRootCondition)
|
||||||
{
|
{
|
||||||
|
QWidget::connect(_enable, SIGNAL(checked(bool)), this,
|
||||||
|
SLOT(ConditionEnableChanged(bool)));
|
||||||
QWidget::connect(_logicSelection, SIGNAL(currentIndexChanged(int)),
|
QWidget::connect(_logicSelection, SIGNAL(currentIndexChanged(int)),
|
||||||
this, SLOT(LogicSelectionChanged(int)));
|
this, SLOT(LogicSelectionChanged(int)));
|
||||||
QWidget::connect(_conditionSelection,
|
QWidget::connect(_conditionSelection,
|
||||||
@@ -122,14 +127,17 @@ MacroConditionEdit::MacroConditionEdit(
|
|||||||
Logic::PopulateLogicTypeSelection(_logicSelection, isRootCondition);
|
Logic::PopulateLogicTypeSelection(_logicSelection, isRootCondition);
|
||||||
populateConditionSelection(_conditionSelection);
|
populateConditionSelection(_conditionSelection);
|
||||||
|
|
||||||
|
_section->AddHeaderWidget(_enable);
|
||||||
_section->AddHeaderWidget(_logicSelection);
|
_section->AddHeaderWidget(_logicSelection);
|
||||||
_section->AddHeaderWidget(_conditionSelection);
|
_section->AddHeaderWidget(_conditionSelection);
|
||||||
_section->AddHeaderWidget(_headerInfo);
|
_section->AddHeaderWidget(_headerInfo);
|
||||||
_section->AddHeaderWidget(_dur);
|
_section->AddHeaderWidget(_dur);
|
||||||
|
_section->AddHeaderWidget(_varMappingToggle);
|
||||||
|
|
||||||
QVBoxLayout *conditionLayout = new QVBoxLayout;
|
QVBoxLayout *conditionLayout = new QVBoxLayout;
|
||||||
conditionLayout->setContentsMargins({7, 7, 7, 7});
|
conditionLayout->setContentsMargins({7, 7, 7, 7});
|
||||||
conditionLayout->addWidget(_section);
|
conditionLayout->addWidget(_section);
|
||||||
|
conditionLayout->addWidget(_outputMappings);
|
||||||
_contentLayout->addLayout(conditionLayout);
|
_contentLayout->addLayout(conditionLayout);
|
||||||
|
|
||||||
QHBoxLayout *mainLayout = new QHBoxLayout;
|
QHBoxLayout *mainLayout = new QHBoxLayout;
|
||||||
@@ -152,8 +160,17 @@ void MacroConditionEdit::LogicSelectionChanged(int idx)
|
|||||||
const auto logic = static_cast<Logic::Type>(
|
const auto logic = static_cast<Logic::Type>(
|
||||||
_logicSelection->itemData(idx).toInt());
|
_logicSelection->itemData(idx).toInt());
|
||||||
(*_entryData)->SetLogicType(logic);
|
(*_entryData)->SetLogicType(logic);
|
||||||
|
}
|
||||||
|
|
||||||
SetEnableAppearance(logic != Logic::Type::NONE);
|
void MacroConditionEdit::ConditionEnableChanged(bool value)
|
||||||
|
{
|
||||||
|
if (_loading || !_entryData) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
auto lock = LockContext();
|
||||||
|
(*_entryData)->SetEnabled(value);
|
||||||
|
SetDisableEffect(!value);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MacroConditionEdit::IsRootNode() const
|
bool MacroConditionEdit::IsRootNode() const
|
||||||
@@ -166,7 +183,9 @@ void MacroConditionEdit::SetLogicSelection()
|
|||||||
const auto logic = (*_entryData)->GetLogicType();
|
const auto logic = (*_entryData)->GetLogicType();
|
||||||
_logicSelection->setCurrentIndex(
|
_logicSelection->setCurrentIndex(
|
||||||
_logicSelection->findData(static_cast<int>(logic)));
|
_logicSelection->findData(static_cast<int>(logic)));
|
||||||
SetEnableAppearance(logic != Logic::Type::NONE);
|
const bool enabled = (*_entryData)->Enabled();
|
||||||
|
_enable->setChecked(enabled);
|
||||||
|
SetEnableAppearance(enabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MacroConditionEdit::SetRootNode(bool root)
|
void MacroConditionEdit::SetRootNode(bool root)
|
||||||
@@ -204,7 +223,10 @@ void MacroConditionEdit::SetupWidgets(bool basicSetup)
|
|||||||
MacroConditionFactory::CreateWidget(id, this, *_entryData);
|
MacroConditionFactory::CreateWidget(id, this, *_entryData);
|
||||||
QWidget::connect(widget, SIGNAL(HeaderInfoChanged(const QString &)),
|
QWidget::connect(widget, SIGNAL(HeaderInfoChanged(const QString &)),
|
||||||
this, SLOT(HeaderInfoChanged(const QString &)));
|
this, SLOT(HeaderInfoChanged(const QString &)));
|
||||||
|
QWidget::connect(widget, SIGNAL(ShowVariableMappings(bool)), this,
|
||||||
|
SLOT(ShowVariableMappings(bool)));
|
||||||
_section->SetContent(widget, (*_entryData)->GetCollapsed());
|
_section->SetContent(widget, (*_entryData)->GetCollapsed());
|
||||||
|
SetupVarMappings((*_entryData).get());
|
||||||
SetFocusPolicyOfWidgets();
|
SetFocusPolicyOfWidgets();
|
||||||
|
|
||||||
_allWidgetsAreSetup = true;
|
_allWidgetsAreSetup = true;
|
||||||
@@ -234,10 +256,12 @@ void MacroConditionEdit::ConditionSelectionChanged(const QString &text)
|
|||||||
{
|
{
|
||||||
auto lock = LockContext();
|
auto lock = LockContext();
|
||||||
auto logic = (*_entryData)->GetLogicType();
|
auto logic = (*_entryData)->GetLogicType();
|
||||||
|
const bool enabled = (*_entryData)->Enabled();
|
||||||
_entryData->reset();
|
_entryData->reset();
|
||||||
*_entryData = MacroConditionFactory::Create(id, macro);
|
*_entryData = MacroConditionFactory::Create(id, macro);
|
||||||
(*_entryData)->SetIndex(idx);
|
(*_entryData)->SetIndex(idx);
|
||||||
(*_entryData)->SetLogicType(logic);
|
(*_entryData)->SetLogicType(logic);
|
||||||
|
(*_entryData)->SetEnabled(enabled);
|
||||||
(*_entryData)->PostLoad();
|
(*_entryData)->PostLoad();
|
||||||
RunAndClearPostLoadSteps();
|
RunAndClearPostLoadSteps();
|
||||||
}
|
}
|
||||||
@@ -245,9 +269,15 @@ void MacroConditionEdit::ConditionSelectionChanged(const QString &text)
|
|||||||
MacroConditionFactory::CreateWidget(id, this, *_entryData);
|
MacroConditionFactory::CreateWidget(id, this, *_entryData);
|
||||||
QWidget::connect(widget, SIGNAL(HeaderInfoChanged(const QString &)),
|
QWidget::connect(widget, SIGNAL(HeaderInfoChanged(const QString &)),
|
||||||
this, SLOT(HeaderInfoChanged(const QString &)));
|
this, SLOT(HeaderInfoChanged(const QString &)));
|
||||||
|
QWidget::connect(widget, SIGNAL(ShowVariableMappings(bool)), this,
|
||||||
|
SLOT(ShowVariableMappings(bool)));
|
||||||
_section->SetContent(widget);
|
_section->SetContent(widget);
|
||||||
|
SetupVarMappings((*_entryData).get());
|
||||||
_dur->setVisible(MacroConditionFactory::UsesDurationModifier(id));
|
_dur->setVisible(MacroConditionFactory::UsesDurationModifier(id));
|
||||||
SetFocusPolicyOfWidgets();
|
SetFocusPolicyOfWidgets();
|
||||||
|
|
||||||
|
emit MacroSignalManager::Instance()->ConditionTypeCreated(
|
||||||
|
QString::fromStdString(id));
|
||||||
}
|
}
|
||||||
|
|
||||||
void MacroConditionEdit::DurationChanged(const Duration &seconds)
|
void MacroConditionEdit::DurationChanged(const Duration &seconds)
|
||||||
@@ -275,4 +305,9 @@ std::shared_ptr<MacroSegment> MacroConditionEdit::Data() const
|
|||||||
return *_entryData;
|
return *_entryData;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MacroConditionEdit::FocusTypeSelection()
|
||||||
|
{
|
||||||
|
_conditionSelection->setFocus();
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace advss
|
} // namespace advss
|
||||||
|
|||||||
@@ -8,6 +8,8 @@
|
|||||||
|
|
||||||
namespace advss {
|
namespace advss {
|
||||||
|
|
||||||
|
class SwitchButton;
|
||||||
|
|
||||||
class DurationModifierEdit : public QWidget {
|
class DurationModifierEdit : public QWidget {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
@@ -41,17 +43,20 @@ public:
|
|||||||
void SetRootNode(bool);
|
void SetRootNode(bool);
|
||||||
void SetupWidgets(bool basicSetup = false);
|
void SetupWidgets(bool basicSetup = false);
|
||||||
void SetEntryData(std::shared_ptr<MacroCondition> *);
|
void SetEntryData(std::shared_ptr<MacroCondition> *);
|
||||||
|
void FocusTypeSelection() override;
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void LogicSelectionChanged(int idx);
|
void LogicSelectionChanged(int idx);
|
||||||
void ConditionSelectionChanged(const QString &text);
|
void ConditionSelectionChanged(const QString &text);
|
||||||
void DurationChanged(const Duration &value);
|
void DurationChanged(const Duration &value);
|
||||||
void DurationModifierChanged(DurationModifier::Type m);
|
void DurationModifierChanged(DurationModifier::Type m);
|
||||||
|
void ConditionEnableChanged(bool);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void SetLogicSelection();
|
void SetLogicSelection();
|
||||||
std::shared_ptr<MacroSegment> Data() const;
|
std::shared_ptr<MacroSegment> Data() const;
|
||||||
|
|
||||||
|
SwitchButton *_enable;
|
||||||
QComboBox *_logicSelection;
|
QComboBox *_logicSelection;
|
||||||
FilterComboBox *_conditionSelection;
|
FilterComboBox *_conditionSelection;
|
||||||
DurationModifierEdit *_dur;
|
DurationModifierEdit *_dur;
|
||||||
|
|||||||
@@ -6,6 +6,15 @@ namespace advss {
|
|||||||
|
|
||||||
const std::string MacroConditionTempVar::id = "temp_var";
|
const std::string MacroConditionTempVar::id = "temp_var";
|
||||||
|
|
||||||
|
std::vector<TempVariableRef> MacroConditionTempVar::GetTempVarRefs() const
|
||||||
|
{
|
||||||
|
auto refs = MacroSegment::GetTempVarRefs();
|
||||||
|
if (_tempVar.HasValidID()) {
|
||||||
|
refs.push_back(_tempVar);
|
||||||
|
}
|
||||||
|
return refs;
|
||||||
|
}
|
||||||
|
|
||||||
bool MacroConditionTempVar::_registered = MacroConditionFactory::Register(
|
bool MacroConditionTempVar::_registered = MacroConditionFactory::Register(
|
||||||
MacroConditionTempVar::id,
|
MacroConditionTempVar::id,
|
||||||
{MacroConditionTempVar::Create, MacroConditionTempVarEdit::Create,
|
{MacroConditionTempVar::Create, MacroConditionTempVarEdit::Create,
|
||||||
@@ -266,6 +275,7 @@ void MacroConditionTempVarEdit::VariableChanged(const TempVariableRef &var)
|
|||||||
{
|
{
|
||||||
GUARD_LOADING_AND_LOCK();
|
GUARD_LOADING_AND_LOCK();
|
||||||
_entryData->_tempVar = var;
|
_entryData->_tempVar = var;
|
||||||
|
IncrementTempVarInUseGeneration();
|
||||||
}
|
}
|
||||||
|
|
||||||
void MacroConditionTempVarEdit::Variable2Changed(const QString &text)
|
void MacroConditionTempVarEdit::Variable2Changed(const QString &text)
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ public:
|
|||||||
bool Load(obs_data_t *obj);
|
bool Load(obs_data_t *obj);
|
||||||
std::string GetShortDesc() const;
|
std::string GetShortDesc() const;
|
||||||
std::string GetId() const { return id; };
|
std::string GetId() const { return id; };
|
||||||
|
std::vector<TempVariableRef> GetTempVarRefs() const;
|
||||||
static std::shared_ptr<MacroCondition> Create(Macro *m)
|
static std::shared_ptr<MacroCondition> Create(Macro *m)
|
||||||
{
|
{
|
||||||
return std::make_shared<MacroConditionTempVar>(m);
|
return std::make_shared<MacroConditionTempVar>(m);
|
||||||
|
|||||||
@@ -7,6 +7,17 @@ MacroCondition::MacroCondition(Macro *m, bool supportsVariableValue)
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool MacroCondition::EvaluateCondition()
|
||||||
|
{
|
||||||
|
bool newValue = CheckCondition();
|
||||||
|
_changed = _previousValue.has_value() && (*_previousValue != newValue);
|
||||||
|
const bool negate = _logic.IsNegationType(GetLogicType());
|
||||||
|
_risingEdge = _changed &&
|
||||||
|
((!negate && newValue) || (negate && !newValue));
|
||||||
|
_previousValue = newValue;
|
||||||
|
return newValue;
|
||||||
|
}
|
||||||
|
|
||||||
bool MacroCondition::Save(obs_data_t *obj) const
|
bool MacroCondition::Save(obs_data_t *obj) const
|
||||||
{
|
{
|
||||||
MacroSegment::Save(obj);
|
MacroSegment::Save(obj);
|
||||||
@@ -20,6 +31,10 @@ bool MacroCondition::Load(obs_data_t *obj)
|
|||||||
{
|
{
|
||||||
MacroSegment::Load(obj);
|
MacroSegment::Load(obj);
|
||||||
_logic.Load(obj, "logic");
|
_logic.Load(obj, "logic");
|
||||||
|
if (_logic.GetType() == Logic::Type::NONE) {
|
||||||
|
SetEnabled(false);
|
||||||
|
_logic.SetType(Logic::Type::AND);
|
||||||
|
}
|
||||||
_durationModifier.Load(obj);
|
_durationModifier.Load(obj);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -39,7 +54,8 @@ void MacroCondition::ValidateLogicSelection(bool isRootCondition,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
_logic.SetType(Logic::Type::NONE);
|
_logic.SetType(Logic::Type::AND);
|
||||||
|
SetEnabled(false);
|
||||||
blog(LOG_WARNING,
|
blog(LOG_WARNING,
|
||||||
"setting invalid logic selection to 'ignore' for macro %s",
|
"setting invalid logic selection to 'ignore' for macro %s",
|
||||||
context);
|
context);
|
||||||
|
|||||||
@@ -4,13 +4,19 @@
|
|||||||
#include "duration-modifier.hpp"
|
#include "duration-modifier.hpp"
|
||||||
#include "macro-ref.hpp"
|
#include "macro-ref.hpp"
|
||||||
|
|
||||||
|
#include <optional>
|
||||||
|
|
||||||
namespace advss {
|
namespace advss {
|
||||||
|
|
||||||
class EXPORT MacroCondition : public MacroSegment {
|
class EXPORT MacroCondition : public MacroSegment {
|
||||||
public:
|
public:
|
||||||
MacroCondition(Macro *m, bool supportsVariableValue = false);
|
MacroCondition(Macro *m, bool supportsVariableValue = false);
|
||||||
virtual ~MacroCondition() = default;
|
virtual ~MacroCondition() = default;
|
||||||
virtual bool CheckCondition() = 0;
|
|
||||||
|
bool EvaluateCondition();
|
||||||
|
bool HasChanged() const { return _changed; }
|
||||||
|
bool IsRisingEdge() const { return _risingEdge; }
|
||||||
|
|
||||||
virtual bool Save(obs_data_t *obj) const = 0;
|
virtual bool Save(obs_data_t *obj) const = 0;
|
||||||
virtual bool Load(obs_data_t *obj) = 0;
|
virtual bool Load(obs_data_t *obj) = 0;
|
||||||
|
|
||||||
@@ -28,9 +34,15 @@ public:
|
|||||||
|
|
||||||
static std::string_view GetDefaultID();
|
static std::string_view GetDefaultID();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
virtual bool CheckCondition() = 0;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Logic _logic = Logic(Logic::Type::ROOT_NONE);
|
Logic _logic = Logic(Logic::Type::ROOT_NONE);
|
||||||
DurationModifier _durationModifier;
|
DurationModifier _durationModifier;
|
||||||
|
std::optional<bool> _previousValue;
|
||||||
|
bool _changed = false;
|
||||||
|
bool _risingEdge = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
class EXPORT MacroRefCondition : virtual public MacroCondition {
|
class EXPORT MacroRefCondition : virtual public MacroCondition {
|
||||||
|
|||||||
@@ -366,7 +366,7 @@ static void runSegmentHighlightChecksHelper(MacroSegmentList *list)
|
|||||||
// highlight its segments if required
|
// highlight its segments if required
|
||||||
auto macroAction = dynamic_cast<MacroActionMacro *>(data.get());
|
auto macroAction = dynamic_cast<MacroActionMacro *>(data.get());
|
||||||
if (macroAction &&
|
if (macroAction &&
|
||||||
macroAction->_action ==
|
macroAction->GetAction() ==
|
||||||
MacroActionMacro::Action::NESTED_MACRO) {
|
MacroActionMacro::Action::NESTED_MACRO) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -650,6 +650,18 @@ void MacroEdit::HighlightCondition(int idx, QColor color) const
|
|||||||
ui->conditionsList->Highlight(idx, color);
|
ui->conditionsList->Highlight(idx, color);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MacroEdit::ScrollAndFocusNewSegment(MacroSegmentList *list, int newIdx,
|
||||||
|
int *currentIdx)
|
||||||
|
{
|
||||||
|
QTimer::singleShot(0, this, [this, list, newIdx, currentIdx]() {
|
||||||
|
list->ensureWidgetVisible(list->WidgetAt(*currentIdx));
|
||||||
|
auto *widget = list->WidgetAt(newIdx);
|
||||||
|
if (widget) {
|
||||||
|
widget->FocusTypeSelection();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
static void resetSegmentHighlights(MacroSegmentList *list)
|
static void resetSegmentHighlights(MacroSegmentList *list)
|
||||||
{
|
{
|
||||||
MacroSegmentEdit *widget = nullptr;
|
MacroSegmentEdit *widget = nullptr;
|
||||||
@@ -1086,6 +1098,8 @@ void MacroEdit::AddMacroAction(Macro *macro, int idx, const std::string &id,
|
|||||||
HighlightAction(idx);
|
HighlightAction(idx);
|
||||||
ui->actionsList->SetHelpMsgVisible(false);
|
ui->actionsList->SetHelpMsgVisible(false);
|
||||||
emit(MacroSegmentOrderChanged());
|
emit(MacroSegmentOrderChanged());
|
||||||
|
|
||||||
|
ScrollAndFocusNewSegment(ui->actionsList, idx, ¤tActionIdx);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MacroEdit::AddMacroAction(int idx)
|
void MacroEdit::AddMacroAction(int idx)
|
||||||
@@ -1113,6 +1127,9 @@ void MacroEdit::AddMacroAction(int idx)
|
|||||||
macro->Actions().at(idx - 1)->Save(data);
|
macro->Actions().at(idx - 1)->Save(data);
|
||||||
}
|
}
|
||||||
AddMacroAction(macro.get(), idx, id, data);
|
AddMacroAction(macro.get(), idx, id, data);
|
||||||
|
if (idx < (int)macro->Actions().size()) {
|
||||||
|
macro->Actions().at(idx)->FixupVarMappingRefs();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MacroEdit::on_actionAdd_clicked()
|
void MacroEdit::on_actionAdd_clicked()
|
||||||
@@ -1389,6 +1406,9 @@ void MacroEdit::AddMacroElseAction(Macro *macro, int idx, const std::string &id,
|
|||||||
HighlightElseAction(idx);
|
HighlightElseAction(idx);
|
||||||
ui->elseActionsList->SetHelpMsgVisible(false);
|
ui->elseActionsList->SetHelpMsgVisible(false);
|
||||||
emit(MacroSegmentOrderChanged());
|
emit(MacroSegmentOrderChanged());
|
||||||
|
|
||||||
|
ScrollAndFocusNewSegment(ui->elseActionsList, idx,
|
||||||
|
¤tElseActionIdx);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MacroEdit::AddMacroElseAction(int idx)
|
void MacroEdit::AddMacroElseAction(int idx)
|
||||||
@@ -1416,6 +1436,9 @@ void MacroEdit::AddMacroElseAction(int idx)
|
|||||||
macro->ElseActions().at(idx - 1)->Save(data);
|
macro->ElseActions().at(idx - 1)->Save(data);
|
||||||
}
|
}
|
||||||
AddMacroElseAction(macro.get(), idx, id, data);
|
AddMacroElseAction(macro.get(), idx, id, data);
|
||||||
|
if (idx < (int)macro->ElseActions().size()) {
|
||||||
|
macro->ElseActions().at(idx)->FixupVarMappingRefs();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MacroEdit::RemoveMacroElseAction(int idx)
|
void MacroEdit::RemoveMacroElseAction(int idx)
|
||||||
@@ -1560,6 +1583,9 @@ void MacroEdit::AddMacroCondition(int idx)
|
|||||||
macro->Conditions().at(idx - 1)->Save(data);
|
macro->Conditions().at(idx - 1)->Save(data);
|
||||||
}
|
}
|
||||||
AddMacroCondition(macro.get(), idx, id, data.Get(), logic);
|
AddMacroCondition(macro.get(), idx, id, data.Get(), logic);
|
||||||
|
if (idx < (int)macro->Conditions().size()) {
|
||||||
|
macro->Conditions().at(idx)->FixupVarMappingRefs();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MacroEdit::AddMacroCondition(Macro *macro, int idx, const std::string &id,
|
void MacroEdit::AddMacroCondition(Macro *macro, int idx, const std::string &id,
|
||||||
@@ -1591,6 +1617,8 @@ void MacroEdit::AddMacroCondition(Macro *macro, int idx, const std::string &id,
|
|||||||
HighlightCondition(idx);
|
HighlightCondition(idx);
|
||||||
ui->conditionsList->SetHelpMsgVisible(false);
|
ui->conditionsList->SetHelpMsgVisible(false);
|
||||||
emit(MacroSegmentOrderChanged());
|
emit(MacroSegmentOrderChanged());
|
||||||
|
|
||||||
|
ScrollAndFocusNewSegment(ui->conditionsList, idx, ¤tConditionIdx);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MacroEdit::on_conditionAdd_clicked()
|
void MacroEdit::on_conditionAdd_clicked()
|
||||||
|
|||||||
@@ -8,9 +8,6 @@ namespace advss {
|
|||||||
class Macro;
|
class Macro;
|
||||||
class MacroSegment;
|
class MacroSegment;
|
||||||
|
|
||||||
/*******************************************************************************
|
|
||||||
* Advanced Scene Switcher window
|
|
||||||
*******************************************************************************/
|
|
||||||
class MacroEdit : public QWidget {
|
class MacroEdit : public QWidget {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
@@ -119,6 +116,8 @@ private:
|
|||||||
void PopulateMacroActions(Macro &m, uint32_t afterIdx = 0);
|
void PopulateMacroActions(Macro &m, uint32_t afterIdx = 0);
|
||||||
void PopulateMacroElseActions(Macro &m, uint32_t afterIdx = 0);
|
void PopulateMacroElseActions(Macro &m, uint32_t afterIdx = 0);
|
||||||
void PopulateMacroConditions(Macro &m, uint32_t afterIdx = 0);
|
void PopulateMacroConditions(Macro &m, uint32_t afterIdx = 0);
|
||||||
|
void ScrollAndFocusNewSegment(MacroSegmentList *list, int newIdx,
|
||||||
|
int *currentIdx);
|
||||||
void SetupMacroSegmentSelection(MacroSection type, int idx);
|
void SetupMacroSegmentSelection(MacroSection type, int idx);
|
||||||
void
|
void
|
||||||
SetupContextMenu(const QPoint &pos,
|
SetupContextMenu(const QPoint &pos,
|
||||||
|
|||||||
89
lib/macro/macro-export-builtin-extensions.cpp
Normal file
89
lib/macro/macro-export-builtin-extensions.cpp
Normal file
@@ -0,0 +1,89 @@
|
|||||||
|
#include "macro-export-extensions.hpp"
|
||||||
|
|
||||||
|
#include "action-queue.hpp"
|
||||||
|
#include "variable.hpp"
|
||||||
|
|
||||||
|
#include <obs.hpp>
|
||||||
|
|
||||||
|
namespace advss {
|
||||||
|
|
||||||
|
static bool setup();
|
||||||
|
static bool setupDone = setup();
|
||||||
|
|
||||||
|
static bool setup()
|
||||||
|
{
|
||||||
|
// --- Variables ---
|
||||||
|
AddMacroExportExtension(
|
||||||
|
{"AdvSceneSwitcher.macroTab.export.variables", "variables",
|
||||||
|
[](obs_data_t *data, const QStringList &selectedIds) {
|
||||||
|
if (selectedIds.isEmpty()) {
|
||||||
|
SaveVariables(data);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
OBSDataArrayAutoRelease array =
|
||||||
|
obs_data_array_create();
|
||||||
|
for (const auto &v : GetVariables()) {
|
||||||
|
const QString name =
|
||||||
|
QString::fromStdString(v->Name());
|
||||||
|
if (!selectedIds.contains(name)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
OBSDataAutoRelease item = obs_data_create();
|
||||||
|
v->Save(item);
|
||||||
|
obs_data_array_push_back(array, item);
|
||||||
|
}
|
||||||
|
obs_data_set_array(data, "variables", array);
|
||||||
|
},
|
||||||
|
[](obs_data_t *data, const QStringList &) {
|
||||||
|
ImportVariables(data);
|
||||||
|
},
|
||||||
|
[]() -> QList<QPair<QString, QString>> {
|
||||||
|
QList<QPair<QString, QString>> items;
|
||||||
|
for (const auto &v : GetVariables()) {
|
||||||
|
const QString name =
|
||||||
|
QString::fromStdString(v->Name());
|
||||||
|
items.append({name, name});
|
||||||
|
}
|
||||||
|
return items;
|
||||||
|
}});
|
||||||
|
|
||||||
|
// --- Action Queues ---
|
||||||
|
AddMacroExportExtension(
|
||||||
|
{"AdvSceneSwitcher.macroTab.export.actionQueues",
|
||||||
|
"actionQueues",
|
||||||
|
[](obs_data_t *data, const QStringList &selectedIds) {
|
||||||
|
if (selectedIds.isEmpty()) {
|
||||||
|
SaveActionQueues(data);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
OBSDataArrayAutoRelease array =
|
||||||
|
obs_data_array_create();
|
||||||
|
for (const auto &q : GetActionQueues()) {
|
||||||
|
const QString name =
|
||||||
|
QString::fromStdString(q->Name());
|
||||||
|
if (!selectedIds.contains(name)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
OBSDataAutoRelease item = obs_data_create();
|
||||||
|
q->Save(item);
|
||||||
|
obs_data_array_push_back(array, item);
|
||||||
|
}
|
||||||
|
obs_data_set_array(data, "actionQueues", array);
|
||||||
|
},
|
||||||
|
[](obs_data_t *data, const QStringList &) {
|
||||||
|
ImportQueues(data);
|
||||||
|
},
|
||||||
|
[]() -> QList<QPair<QString, QString>> {
|
||||||
|
QList<QPair<QString, QString>> items;
|
||||||
|
for (const auto &q : GetActionQueues()) {
|
||||||
|
const QString name =
|
||||||
|
QString::fromStdString(q->Name());
|
||||||
|
items.append({name, name});
|
||||||
|
}
|
||||||
|
return items;
|
||||||
|
}});
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace advss
|
||||||
17
lib/macro/macro-export-extensions.cpp
Normal file
17
lib/macro/macro-export-extensions.cpp
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
#include "macro-export-extensions.hpp"
|
||||||
|
|
||||||
|
namespace advss {
|
||||||
|
|
||||||
|
static std::vector<MacroExportExtension> extensions;
|
||||||
|
|
||||||
|
void AddMacroExportExtension(const MacroExportExtension &ext)
|
||||||
|
{
|
||||||
|
extensions.emplace_back(ext);
|
||||||
|
}
|
||||||
|
|
||||||
|
const std::vector<MacroExportExtension> &GetMacroExportExtensions()
|
||||||
|
{
|
||||||
|
return extensions;
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace advss
|
||||||
41
lib/macro/macro-export-extensions.hpp
Normal file
41
lib/macro/macro-export-extensions.hpp
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "export-symbol-helper.hpp"
|
||||||
|
|
||||||
|
#include <functional>
|
||||||
|
#include <obs-data.h>
|
||||||
|
#include <QList>
|
||||||
|
#include <QPair>
|
||||||
|
#include <QString>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
|
namespace advss {
|
||||||
|
|
||||||
|
struct MacroExportExtension {
|
||||||
|
const char *displayNameKey;
|
||||||
|
const char *jsonKey;
|
||||||
|
|
||||||
|
// Export callback.
|
||||||
|
// Write content into 'data'. 'selectedIds' contains the item IDs the
|
||||||
|
// user explicitly checked; if empty (no per-item widget provided) save
|
||||||
|
// everything.
|
||||||
|
std::function<void(obs_data_t *data, const QStringList &selectedIds)>
|
||||||
|
save;
|
||||||
|
|
||||||
|
// Import callback.
|
||||||
|
// Read content from 'data'. 'selectedIds' contains the item IDs the
|
||||||
|
// user explicitly checked; if empty import every item found in 'data'.
|
||||||
|
std::function<void(obs_data_t *data, const QStringList &selectedIds)>
|
||||||
|
load;
|
||||||
|
|
||||||
|
// Optional: enumerate items available for export as (id, displayName)
|
||||||
|
// pairs. When nullptr the extension appears as a single all-or-nothing
|
||||||
|
// checkbox in the export dialog.
|
||||||
|
std::function<QList<QPair<QString, QString>>()> getExportItems =
|
||||||
|
nullptr;
|
||||||
|
};
|
||||||
|
|
||||||
|
EXPORT void AddMacroExportExtension(const MacroExportExtension &ext);
|
||||||
|
const std::vector<MacroExportExtension> &GetMacroExportExtensions();
|
||||||
|
|
||||||
|
} // namespace advss
|
||||||
@@ -1,22 +1,183 @@
|
|||||||
#include "macro-export-import-dialog.hpp"
|
#include "macro-export-import-dialog.hpp"
|
||||||
|
#include "macro-export-extensions.hpp"
|
||||||
#include "obs-module-helper.hpp"
|
#include "obs-module-helper.hpp"
|
||||||
|
#include "section.hpp"
|
||||||
|
|
||||||
#include <obs.hpp>
|
#include <obs.hpp>
|
||||||
#include <QLayout>
|
|
||||||
#include <QLabel>
|
|
||||||
#include <QDialogButtonBox>
|
#include <QDialogButtonBox>
|
||||||
|
#include <QLabel>
|
||||||
|
#include <QLayout>
|
||||||
|
#include <QScrollArea>
|
||||||
|
#include <QSplitter>
|
||||||
|
#include <algorithm>
|
||||||
|
#include <numeric>
|
||||||
|
|
||||||
namespace advss {
|
namespace advss {
|
||||||
|
|
||||||
static bool usePlainText = false;
|
static bool usePlainText = false;
|
||||||
|
|
||||||
MacroExportImportDialog::MacroExportImportDialog(Type type)
|
// ---------------------------------------------------------------------------
|
||||||
|
// Compress / decompress helpers
|
||||||
|
// ---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
static QString compressMacroString(const QString &input)
|
||||||
|
{
|
||||||
|
QByteArray inputData = input.toUtf8();
|
||||||
|
auto compressedData = qCompress(inputData);
|
||||||
|
QByteArray encodedData = compressedData.toBase64();
|
||||||
|
return QString::fromUtf8(encodedData);
|
||||||
|
}
|
||||||
|
|
||||||
|
static QString decompressMacroString(const QString &input)
|
||||||
|
{
|
||||||
|
QByteArray encodedData = input.toUtf8();
|
||||||
|
QByteArray compressedData = QByteArray::fromBase64(encodedData);
|
||||||
|
auto outputData = qUncompress(compressedData);
|
||||||
|
return QString::fromUtf8(outputData);
|
||||||
|
}
|
||||||
|
|
||||||
|
static bool isValidData(const QString &json)
|
||||||
|
{
|
||||||
|
OBSDataAutoRelease data =
|
||||||
|
obs_data_create_from_json(json.toStdString().c_str());
|
||||||
|
return !!data;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ---------------------------------------------------------------------------
|
||||||
|
// Extension section
|
||||||
|
// ---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
QWidget *MacroExportImportDialog::BuildExtensionWidget()
|
||||||
|
{
|
||||||
|
auto wrapper = new QWidget(this);
|
||||||
|
auto wrapperLayout = new QVBoxLayout(wrapper);
|
||||||
|
wrapperLayout->setContentsMargins(0, 0, 0, 0);
|
||||||
|
wrapperLayout->setSpacing(4);
|
||||||
|
|
||||||
|
wrapperLayout->addWidget(new QLabel(obs_module_text(
|
||||||
|
"AdvSceneSwitcher.macroTab.export.additionalContent")));
|
||||||
|
|
||||||
|
auto outerContent = new QWidget();
|
||||||
|
auto outerLayout = new QVBoxLayout(outerContent);
|
||||||
|
outerLayout->setContentsMargins(4, 4, 4, 4);
|
||||||
|
outerLayout->setSpacing(4);
|
||||||
|
|
||||||
|
const auto &extensions = GetMacroExportExtensions();
|
||||||
|
|
||||||
|
std::vector<int> order(extensions.size());
|
||||||
|
std::iota(order.begin(), order.end(), 0);
|
||||||
|
std::sort(order.begin(), order.end(), [&](int a, int b) {
|
||||||
|
return QString::localeAwareCompare(
|
||||||
|
obs_module_text(extensions[a].displayNameKey),
|
||||||
|
obs_module_text(extensions[b].displayNameKey)) <
|
||||||
|
0;
|
||||||
|
});
|
||||||
|
|
||||||
|
for (int extIdx : order) {
|
||||||
|
const auto &ext = extensions[extIdx];
|
||||||
|
ExtensionUI ui;
|
||||||
|
|
||||||
|
// Simple all-or-nothing checkbox (no sub-items).
|
||||||
|
if (!ext.getExportItems) {
|
||||||
|
ui.mainCheck = new QCheckBox(
|
||||||
|
obs_module_text(ext.displayNameKey),
|
||||||
|
outerContent);
|
||||||
|
ui.mainCheck->setChecked(false);
|
||||||
|
connect(ui.mainCheck, &QCheckBox::stateChanged, this,
|
||||||
|
&MacroExportImportDialog::UpdateExportString);
|
||||||
|
outerLayout->addWidget(ui.mainCheck);
|
||||||
|
_extensionUIs.append(std::move(ui));
|
||||||
|
_extensionOrder.push_back(extIdx);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Extensions with per-item selection get their own inner
|
||||||
|
// Section: the main checkbox sits in the header (next to the
|
||||||
|
// toggle arrow) and the per-item checkboxes live in the
|
||||||
|
// collapsible content area.
|
||||||
|
auto items = ext.getExportItems();
|
||||||
|
if (items.isEmpty()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::sort(items.begin(), items.end(),
|
||||||
|
[](const QPair<QString, QString> &a,
|
||||||
|
const QPair<QString, QString> &b) {
|
||||||
|
return QString::localeAwareCompare(
|
||||||
|
a.second, b.second) < 0;
|
||||||
|
});
|
||||||
|
|
||||||
|
auto innerSection = new Section(200, outerContent);
|
||||||
|
|
||||||
|
ui.mainCheck =
|
||||||
|
new QCheckBox(obs_module_text(ext.displayNameKey));
|
||||||
|
ui.mainCheck->setChecked(false);
|
||||||
|
innerSection->AddHeaderWidget(ui.mainCheck);
|
||||||
|
|
||||||
|
auto subWidget = new QWidget();
|
||||||
|
auto subLayout = new QVBoxLayout(subWidget);
|
||||||
|
subLayout->setContentsMargins(4, 2, 4, 2);
|
||||||
|
subLayout->setSpacing(2);
|
||||||
|
|
||||||
|
for (const auto &[id, displayName] : items) {
|
||||||
|
auto cb = new QCheckBox(displayName, subWidget);
|
||||||
|
cb->setChecked(false);
|
||||||
|
subLayout->addWidget(cb);
|
||||||
|
ui.itemChecks.append({id, cb});
|
||||||
|
connect(cb, &QCheckBox::stateChanged, this,
|
||||||
|
&MacroExportImportDialog::UpdateExportString);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Main checkbox toggles all sub-items.
|
||||||
|
// Capture uiIdx (position in _extensionUIs after append).
|
||||||
|
const int uiIdx = _extensionUIs.size();
|
||||||
|
connect(ui.mainCheck, &QCheckBox::stateChanged, this,
|
||||||
|
[this, uiIdx](int state) {
|
||||||
|
if (state == Qt::PartiallyChecked)
|
||||||
|
return;
|
||||||
|
const bool checked = (state == Qt::Checked);
|
||||||
|
if (uiIdx < _extensionUIs.size()) {
|
||||||
|
for (auto &[id, cb] :
|
||||||
|
_extensionUIs[uiIdx].itemChecks) {
|
||||||
|
QSignalBlocker b(cb);
|
||||||
|
cb->setChecked(checked);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
UpdateExportString();
|
||||||
|
});
|
||||||
|
|
||||||
|
innerSection->SetContent(subWidget, true);
|
||||||
|
outerLayout->addWidget(innerSection);
|
||||||
|
_extensionUIs.append(std::move(ui));
|
||||||
|
_extensionOrder.push_back(extIdx);
|
||||||
|
}
|
||||||
|
|
||||||
|
outerLayout->addStretch();
|
||||||
|
|
||||||
|
auto scrollArea = new QScrollArea(wrapper);
|
||||||
|
scrollArea->setWidget(outerContent);
|
||||||
|
scrollArea->setWidgetResizable(true);
|
||||||
|
scrollArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||||
|
scrollArea->setFrameShape(QFrame::NoFrame);
|
||||||
|
wrapperLayout->addWidget(scrollArea);
|
||||||
|
|
||||||
|
return wrapper;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ---------------------------------------------------------------------------
|
||||||
|
// Constructor
|
||||||
|
// ---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
MacroExportImportDialog::MacroExportImportDialog(Type type,
|
||||||
|
const QString &baseJson)
|
||||||
: QDialog(nullptr),
|
: QDialog(nullptr),
|
||||||
|
_baseJson(baseJson),
|
||||||
_importExportString(new QPlainTextEdit(this)),
|
_importExportString(new QPlainTextEdit(this)),
|
||||||
_usePlainText(new QCheckBox(obs_module_text(
|
_usePlainText(new QCheckBox(obs_module_text(
|
||||||
"AdvSceneSwitcher.macroTab.export.usePlainText")))
|
"AdvSceneSwitcher.macroTab.export.usePlainText")))
|
||||||
{
|
{
|
||||||
_importExportString->setReadOnly(type == Type::EXPORT_MACRO);
|
_importExportString->setReadOnly(type == Type::EXPORT_MACRO);
|
||||||
|
|
||||||
auto label = new QLabel(obs_module_text(
|
auto label = new QLabel(obs_module_text(
|
||||||
type == Type::EXPORT_MACRO
|
type == Type::EXPORT_MACRO
|
||||||
? "AdvSceneSwitcher.macroTab.export.info"
|
? "AdvSceneSwitcher.macroTab.export.info"
|
||||||
@@ -39,40 +200,90 @@ MacroExportImportDialog::MacroExportImportDialog(Type type)
|
|||||||
connect(_usePlainText, &QCheckBox::stateChanged, this,
|
connect(_usePlainText, &QCheckBox::stateChanged, this,
|
||||||
&MacroExportImportDialog::UsePlainTextChanged);
|
&MacroExportImportDialog::UsePlainTextChanged);
|
||||||
|
|
||||||
auto layout = new QVBoxLayout;
|
auto layout = new QVBoxLayout(this);
|
||||||
layout->addWidget(label);
|
|
||||||
layout->addWidget(_importExportString);
|
if (type == Type::EXPORT_MACRO && !GetMacroExportExtensions().empty()) {
|
||||||
layout->addWidget(_usePlainText);
|
auto splitter = new QSplitter(Qt::Vertical, this);
|
||||||
|
splitter->setChildrenCollapsible(false);
|
||||||
|
splitter->addWidget(BuildExtensionWidget());
|
||||||
|
|
||||||
|
auto textWidget = new QWidget(splitter);
|
||||||
|
auto textLayout = new QVBoxLayout(textWidget);
|
||||||
|
textLayout->setContentsMargins(0, 0, 0, 0);
|
||||||
|
textLayout->addWidget(label);
|
||||||
|
textLayout->addWidget(_importExportString);
|
||||||
|
textLayout->addWidget(_usePlainText);
|
||||||
|
splitter->addWidget(textWidget);
|
||||||
|
|
||||||
|
layout->addWidget(splitter);
|
||||||
|
} else {
|
||||||
|
layout->addWidget(label);
|
||||||
|
layout->addWidget(_importExportString);
|
||||||
|
layout->addWidget(_usePlainText);
|
||||||
|
}
|
||||||
|
|
||||||
layout->addWidget(buttons);
|
layout->addWidget(buttons);
|
||||||
setLayout(layout);
|
setLayout(layout);
|
||||||
|
|
||||||
setWindowTitle(obs_module_text("AdvSceneSwitcher.windowTitle"));
|
setWindowTitle(obs_module_text("AdvSceneSwitcher.windowTitle"));
|
||||||
|
|
||||||
|
if (type == Type::EXPORT_MACRO) {
|
||||||
|
RefreshExportText();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QString compressMacroString(const QString &input)
|
// ---------------------------------------------------------------------------
|
||||||
|
// Export string helpers
|
||||||
|
// ---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
QString MacroExportImportDialog::BuildExportJson() const
|
||||||
{
|
{
|
||||||
QByteArray inputData = input.toUtf8();
|
OBSDataAutoRelease data =
|
||||||
auto compressedData = qCompress(inputData);
|
obs_data_create_from_json(_baseJson.toStdString().c_str());
|
||||||
QByteArray encodedData = compressedData.toBase64();
|
if (!data) {
|
||||||
return QString::fromUtf8(encodedData);
|
return _baseJson;
|
||||||
|
}
|
||||||
|
|
||||||
|
const auto &extensions = GetMacroExportExtensions();
|
||||||
|
for (int i = 0; i < (int)_extensionUIs.size(); ++i) {
|
||||||
|
const auto &ui = _extensionUIs[i];
|
||||||
|
|
||||||
|
QStringList selectedIds;
|
||||||
|
if (ui.itemChecks.isEmpty()) {
|
||||||
|
if (!ui.mainCheck->isChecked()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
for (const auto &[id, cb] : ui.itemChecks) {
|
||||||
|
if (cb->isChecked()) {
|
||||||
|
selectedIds << id;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (selectedIds.isEmpty()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
extensions[_extensionOrder[i]].save(data, selectedIds);
|
||||||
|
}
|
||||||
|
|
||||||
|
const char *json = obs_data_get_json(data);
|
||||||
|
return json ? QString::fromUtf8(json) : QString{};
|
||||||
}
|
}
|
||||||
|
|
||||||
QString decompressMacroString(const QString &input)
|
void MacroExportImportDialog::RefreshExportText()
|
||||||
{
|
{
|
||||||
QByteArray encodedData = input.toUtf8();
|
const QString json = BuildExportJson();
|
||||||
QByteArray compressedData = QByteArray::fromBase64(encodedData);
|
if (usePlainText) {
|
||||||
auto outputData = qUncompress(compressedData);
|
_importExportString->setPlainText(json);
|
||||||
return QString::fromUtf8(outputData);
|
} else {
|
||||||
|
_importExportString->setPlainText(compressMacroString(json));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MacroExportImportDialog::ExportMacros(const QString &json)
|
void MacroExportImportDialog::UpdateExportString()
|
||||||
{
|
{
|
||||||
MacroExportImportDialog dialog(
|
RefreshExportText();
|
||||||
MacroExportImportDialog::Type::EXPORT_MACRO);
|
|
||||||
dialog._importExportString->setPlainText(compressMacroString(json));
|
|
||||||
dialog.adjustSize();
|
|
||||||
dialog.updateGeometry();
|
|
||||||
dialog.exec();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void MacroExportImportDialog::UsePlainTextChanged(int value)
|
void MacroExportImportDialog::UsePlainTextChanged(int value)
|
||||||
@@ -90,26 +301,45 @@ void MacroExportImportDialog::UsePlainTextChanged(int value)
|
|||||||
usePlainText = value;
|
usePlainText = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool isValidData(const QString &json)
|
// ---------------------------------------------------------------------------
|
||||||
|
// Static entry points
|
||||||
|
// ---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
void MacroExportImportDialog::ExportMacros(obs_data_t *macroData)
|
||||||
{
|
{
|
||||||
OBSDataAutoRelease data =
|
const char *rawJson = obs_data_get_json(macroData);
|
||||||
obs_data_create_from_json(json.toStdString().c_str());
|
const QString baseJson = rawJson ? QString::fromUtf8(rawJson)
|
||||||
return !!data;
|
: QString{};
|
||||||
|
|
||||||
|
MacroExportImportDialog dialog(Type::EXPORT_MACRO, baseJson);
|
||||||
|
dialog.adjustSize();
|
||||||
|
dialog.updateGeometry();
|
||||||
|
dialog.exec();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MacroExportImportDialog::ImportMacros(QString &json)
|
bool MacroExportImportDialog::ImportMacros(QString &json)
|
||||||
{
|
{
|
||||||
MacroExportImportDialog dialog(
|
MacroExportImportDialog dialog(Type::IMPORT_MACRO);
|
||||||
MacroExportImportDialog::Type::IMPORT_MACRO);
|
if (dialog.exec() != QDialog::Accepted) {
|
||||||
if (dialog.exec() == QDialog::Accepted) {
|
return false;
|
||||||
json = decompressMacroString(
|
|
||||||
dialog._importExportString->toPlainText());
|
|
||||||
if (!isValidData(json)) { // Fallback to support raw json format
|
|
||||||
json = dialog._importExportString->toPlainText();
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
return false;
|
|
||||||
|
json = decompressMacroString(dialog._importExportString->toPlainText());
|
||||||
|
if (!isValidData(json)) {
|
||||||
|
// Fallback: support raw (uncompressed) JSON pasted directly.
|
||||||
|
json = dialog._importExportString->toPlainText();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Invoke all extension load callbacks.
|
||||||
|
OBSDataAutoRelease data =
|
||||||
|
obs_data_create_from_json(json.toStdString().c_str());
|
||||||
|
if (data) {
|
||||||
|
for (const auto &ext : GetMacroExportExtensions()) {
|
||||||
|
ext.load(data, {});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace advss
|
} // namespace advss
|
||||||
|
|||||||
@@ -1,25 +1,47 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <QCheckBox>
|
#include <QCheckBox>
|
||||||
#include <QDialog>
|
#include <QDialog>
|
||||||
|
#include <QList>
|
||||||
#include <QPlainTextEdit>
|
#include <QPlainTextEdit>
|
||||||
|
|
||||||
|
#include <obs-data.h>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
namespace advss {
|
namespace advss {
|
||||||
|
|
||||||
class MacroExportImportDialog : public QDialog {
|
class MacroExportImportDialog : public QDialog {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
enum class Type { EXPORT_MACRO, IMPORT_MACRO };
|
enum class Type { EXPORT_MACRO, IMPORT_MACRO };
|
||||||
MacroExportImportDialog(Type type);
|
|
||||||
|
|
||||||
static void ExportMacros(const QString &json);
|
static void ExportMacros(obs_data_t *macroData);
|
||||||
static bool ImportMacros(QString &json);
|
static bool ImportMacros(QString &json);
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void UsePlainTextChanged(int);
|
void UsePlainTextChanged(int);
|
||||||
|
void UpdateExportString();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
explicit MacroExportImportDialog(Type type,
|
||||||
|
const QString &baseJson = {});
|
||||||
|
|
||||||
|
// Per-extension widgets
|
||||||
|
struct ExtensionUI {
|
||||||
|
QCheckBox *mainCheck = nullptr;
|
||||||
|
// (itemId, checkbox) pairs - empty when no per-item selection.
|
||||||
|
QList<QPair<QString, QCheckBox *>> itemChecks;
|
||||||
|
};
|
||||||
|
|
||||||
|
QWidget *BuildExtensionWidget();
|
||||||
|
QString BuildExportJson() const;
|
||||||
|
void RefreshExportText();
|
||||||
|
|
||||||
|
QString _baseJson;
|
||||||
QPlainTextEdit *_importExportString;
|
QPlainTextEdit *_importExportString;
|
||||||
QCheckBox *_usePlainText;
|
QCheckBox *_usePlainText;
|
||||||
|
QList<ExtensionUI> _extensionUIs;
|
||||||
|
std::vector<int> _extensionOrder;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace advss
|
} // namespace advss
|
||||||
|
|||||||
@@ -214,6 +214,20 @@ bool MacroIsPaused(const Macro *macro)
|
|||||||
return macro ? macro->Paused() : true;
|
return macro ? macro->Paused() : true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SetMacroPaused(Macro *macro, bool paused)
|
||||||
|
{
|
||||||
|
if (macro) {
|
||||||
|
macro->SetPaused(paused);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void StopMacro(Macro *macro)
|
||||||
|
{
|
||||||
|
if (macro) {
|
||||||
|
macro->Stop();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
bool MacroWasPausedSince(
|
bool MacroWasPausedSince(
|
||||||
const Macro *macro,
|
const Macro *macro,
|
||||||
const std::chrono::high_resolution_clock::time_point &time)
|
const std::chrono::high_resolution_clock::time_point &time)
|
||||||
@@ -237,14 +251,20 @@ void AddMacroHelperThread(Macro *macro, std::thread &&newThread)
|
|||||||
macro->AddHelperThread(std::move(newThread));
|
macro->AddHelperThread(std::move(newThread));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool RunMacroActions(Macro *macro)
|
bool RunMacroActions(Macro *macro, bool forceParallel, bool ignorePause)
|
||||||
{
|
{
|
||||||
return macro && macro->PerformActions(true);
|
return macro && macro->PerformActions(true, forceParallel, ignorePause);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool RunMacroElseActions(Macro *macro)
|
bool RunMacroElseActions(Macro *macro, bool forceParallel, bool ignorePause)
|
||||||
{
|
{
|
||||||
return macro && macro->PerformActions(false);
|
return macro &&
|
||||||
|
macro->PerformActions(false, forceParallel, ignorePause);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CheckMacroConditions(Macro *macro, bool ignorePause)
|
||||||
|
{
|
||||||
|
return macro && macro->CheckConditions(ignorePause);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ResetMacroConditionTimers(Macro *macro)
|
void ResetMacroConditionTimers(Macro *macro)
|
||||||
|
|||||||
@@ -58,6 +58,8 @@ LastMacroConditionCheckTime(const Macro *);
|
|||||||
|
|
||||||
EXPORT bool MacroIsStopped(const Macro *);
|
EXPORT bool MacroIsStopped(const Macro *);
|
||||||
EXPORT bool MacroIsPaused(const Macro *);
|
EXPORT bool MacroIsPaused(const Macro *);
|
||||||
|
EXPORT void SetMacroPaused(Macro *, bool paused);
|
||||||
|
EXPORT void StopMacro(Macro *);
|
||||||
EXPORT bool
|
EXPORT bool
|
||||||
MacroWasPausedSince(const Macro *,
|
MacroWasPausedSince(const Macro *,
|
||||||
const std::chrono::high_resolution_clock::time_point &);
|
const std::chrono::high_resolution_clock::time_point &);
|
||||||
@@ -66,11 +68,16 @@ EXPORT bool MacroWasCheckedSinceLastStart(const Macro *);
|
|||||||
EXPORT void AddMacroHelperThread(Macro *, std::thread &&);
|
EXPORT void AddMacroHelperThread(Macro *, std::thread &&);
|
||||||
|
|
||||||
EXPORT bool CheckMacros();
|
EXPORT bool CheckMacros();
|
||||||
|
EXPORT bool CheckMacroConditions(Macro *, bool ignorePause = false);
|
||||||
|
|
||||||
EXPORT bool RunMacroActions(Macro *);
|
EXPORT bool RunMacroActions(Macro *, bool forceParallel = false,
|
||||||
bool RunMacroElseActions(Macro *);
|
bool ignorePause = false);
|
||||||
|
EXPORT bool RunMacroElseActions(Macro *, bool forceParallel = false,
|
||||||
|
bool ignorePause = false);
|
||||||
EXPORT bool RunMacros();
|
EXPORT bool RunMacros();
|
||||||
void StopAllMacros();
|
|
||||||
|
void SignalStopAllMacros();
|
||||||
|
void WaitForAllMacros();
|
||||||
|
|
||||||
EXPORT void LoadMacros(obs_data_t *obj);
|
EXPORT void LoadMacros(obs_data_t *obj);
|
||||||
EXPORT void SaveMacros(obs_data_t *obj);
|
EXPORT void SaveMacros(obs_data_t *obj);
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
#include "macro-ref.hpp"
|
#include "macro-ref.hpp"
|
||||||
#include "macro.hpp"
|
#include "macro.hpp"
|
||||||
|
|
||||||
|
#include "plugin-state-helpers.hpp"
|
||||||
|
|
||||||
namespace advss {
|
namespace advss {
|
||||||
|
|
||||||
MacroRef::MacroRef(std::string name)
|
MacroRef::MacroRef(std::string name)
|
||||||
@@ -19,6 +21,7 @@ void MacroRef::Load(obs_data_t *obj)
|
|||||||
auto name = obs_data_get_string(obj, "macro");
|
auto name = obs_data_get_string(obj, "macro");
|
||||||
_postLoadName = name;
|
_postLoadName = name;
|
||||||
_macro = GetWeakMacroByName(name);
|
_macro = GetWeakMacroByName(name);
|
||||||
|
AddPostLoadStep([this]() { MacroRef::PostLoad(); });
|
||||||
}
|
}
|
||||||
|
|
||||||
void MacroRef::PostLoad()
|
void MacroRef::PostLoad()
|
||||||
@@ -71,11 +74,11 @@ void LoadMacroList(obs_data_t *obj, std::vector<MacroRef> ¯os,
|
|||||||
{
|
{
|
||||||
obs_data_array_t *array = obs_data_get_array(obj, name.c_str());
|
obs_data_array_t *array = obs_data_get_array(obj, name.c_str());
|
||||||
size_t count = obs_data_array_count(array);
|
size_t count = obs_data_array_count(array);
|
||||||
|
macros.reserve(macros.size() + count);
|
||||||
for (size_t i = 0; i < count; i++) {
|
for (size_t i = 0; i < count; i++) {
|
||||||
obs_data_t *array_obj = obs_data_array_item(array, i);
|
obs_data_t *array_obj = obs_data_array_item(array, i);
|
||||||
MacroRef ref;
|
macros.emplace_back();
|
||||||
ref.Load(array_obj);
|
macros.back().Load(array_obj);
|
||||||
macros.push_back(ref);
|
|
||||||
obs_data_release(array_obj);
|
obs_data_release(array_obj);
|
||||||
}
|
}
|
||||||
obs_data_array_release(array);
|
obs_data_array_release(array);
|
||||||
|
|||||||
@@ -72,15 +72,24 @@ void MacroEdit::PasteMacroSegment()
|
|||||||
}
|
}
|
||||||
AddMacroCondition(macro.get(), macro->Conditions().size(),
|
AddMacroCondition(macro.get(), macro->Conditions().size(),
|
||||||
copyInfo.segment->GetId(), data.Get(), logic);
|
copyInfo.segment->GetId(), data.Get(), logic);
|
||||||
|
if (!macro->Conditions().empty()) {
|
||||||
|
macro->Conditions().back()->FixupVarMappingRefs();
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case MacroSegmentCopyInfo::Type::ACTION:
|
case MacroSegmentCopyInfo::Type::ACTION:
|
||||||
AddMacroAction(macro.get(), macro->Actions().size(),
|
AddMacroAction(macro.get(), macro->Actions().size(),
|
||||||
copyInfo.segment->GetId(), data.Get());
|
copyInfo.segment->GetId(), data.Get());
|
||||||
|
if (!macro->Actions().empty()) {
|
||||||
|
macro->Actions().back()->FixupVarMappingRefs();
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case MacroSegmentCopyInfo::Type::ELSE:
|
case MacroSegmentCopyInfo::Type::ELSE:
|
||||||
AddMacroElseAction(macro.get(), macro->ElseActions().size(),
|
AddMacroElseAction(macro.get(), macro->ElseActions().size(),
|
||||||
copyInfo.segment->GetId(), data.Get());
|
copyInfo.segment->GetId(), data.Get());
|
||||||
|
if (!macro->ElseActions().empty()) {
|
||||||
|
macro->ElseActions().back()->FixupVarMappingRefs();
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -1,8 +1,10 @@
|
|||||||
#include "macro-segment.hpp"
|
#include "macro-segment.hpp"
|
||||||
#include "macro.hpp"
|
#include "macro.hpp"
|
||||||
#include "mouse-wheel-guard.hpp"
|
#include "mouse-wheel-guard.hpp"
|
||||||
|
#include "path-helpers.hpp"
|
||||||
#include "section.hpp"
|
#include "section.hpp"
|
||||||
#include "ui-helpers.hpp"
|
#include "ui-helpers.hpp"
|
||||||
|
#include "variable.hpp"
|
||||||
|
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
#include <QEvent>
|
#include <QEvent>
|
||||||
@@ -13,20 +15,101 @@
|
|||||||
|
|
||||||
namespace advss {
|
namespace advss {
|
||||||
|
|
||||||
|
std::vector<TempVariableRef> MacroSegment::GetTempVarRefs() const
|
||||||
|
{
|
||||||
|
std::vector<TempVariableRef> refs;
|
||||||
|
for (const auto &mapping : _varMappings) {
|
||||||
|
if (mapping.tempVar.HasValidID()) {
|
||||||
|
refs.push_back(mapping.tempVar);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return refs;
|
||||||
|
}
|
||||||
|
|
||||||
|
void MacroSegment::ApplyVarMappings()
|
||||||
|
{
|
||||||
|
auto macro = GetMacro();
|
||||||
|
for (const auto &mapping : _varMappings) {
|
||||||
|
auto var = mapping.variable.lock();
|
||||||
|
if (!var) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
const auto tempVar = mapping.tempVar.GetTempVariable(macro);
|
||||||
|
if (!tempVar) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
const auto value = tempVar->Value();
|
||||||
|
if (!value) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
var->SetValue(*value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const std::vector<VarMapping> &MacroSegment::GetVarMappings() const
|
||||||
|
{
|
||||||
|
return _varMappings;
|
||||||
|
}
|
||||||
|
|
||||||
|
void MacroSegment::SetVarMappings(const std::vector<VarMapping> &mappings)
|
||||||
|
{
|
||||||
|
_varMappings = mappings;
|
||||||
|
IncrementTempVarInUseGeneration();
|
||||||
|
}
|
||||||
|
|
||||||
|
void MacroSegment::FixupVarMappingRefs()
|
||||||
|
{
|
||||||
|
for (auto &mapping : _varMappings) {
|
||||||
|
if (!mapping.tempVar.HasValidID()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
for (const auto &var : _tempVariables) {
|
||||||
|
if (var.ID() == mapping.tempVar.GetID()) {
|
||||||
|
mapping.tempVar = var.GetRef();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
NotifyUIAboutTempVarChange(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
std::vector<TempVariable> MacroSegment::GetOwnTempVars() const
|
||||||
|
{
|
||||||
|
return _tempVariables;
|
||||||
|
}
|
||||||
|
|
||||||
MacroSegment::MacroSegment(Macro *m, bool supportsVariableValue)
|
MacroSegment::MacroSegment(Macro *m, bool supportsVariableValue)
|
||||||
: _macro(m),
|
: _macro(m),
|
||||||
_supportsVariableValue(supportsVariableValue)
|
_supportsVariableValue(supportsVariableValue)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MacroSegment::SetVarMappingExpanded(bool expanded)
|
||||||
|
{
|
||||||
|
_varMappingExpanded = expanded;
|
||||||
|
}
|
||||||
|
|
||||||
bool MacroSegment::Save(obs_data_t *obj) const
|
bool MacroSegment::Save(obs_data_t *obj) const
|
||||||
{
|
{
|
||||||
OBSDataAutoRelease data = obs_data_create();
|
OBSDataAutoRelease data = obs_data_create();
|
||||||
obs_data_set_bool(data, "collapsed", _collapsed);
|
obs_data_set_bool(data, "collapsed", _collapsed);
|
||||||
|
obs_data_set_bool(data, "varMappingExpanded", _varMappingExpanded);
|
||||||
obs_data_set_bool(data, "useCustomLabel", _useCustomLabel);
|
obs_data_set_bool(data, "useCustomLabel", _useCustomLabel);
|
||||||
obs_data_set_string(data, "customLabel", _customLabel.c_str());
|
obs_data_set_string(data, "customLabel", _customLabel.c_str());
|
||||||
obs_data_set_bool(data, "enabled", _enabled);
|
obs_data_set_bool(data, "enabled", _enabled);
|
||||||
obs_data_set_int(data, "version", 1);
|
obs_data_set_int(data, "version", 2);
|
||||||
|
|
||||||
|
OBSDataArrayAutoRelease mappingsArray = obs_data_array_create();
|
||||||
|
for (const auto &mapping : _varMappings) {
|
||||||
|
OBSDataAutoRelease item = obs_data_create();
|
||||||
|
mapping.tempVar.Save(item, GetMacro(), "tempVar");
|
||||||
|
obs_data_set_string(
|
||||||
|
item, "variable",
|
||||||
|
GetWeakVariableName(mapping.variable).c_str());
|
||||||
|
obs_data_array_push_back(mappingsArray, item);
|
||||||
|
}
|
||||||
|
obs_data_set_array(data, "varMappings", mappingsArray);
|
||||||
|
|
||||||
obs_data_set_obj(obj, "segmentSettings", data);
|
obs_data_set_obj(obj, "segmentSettings", data);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -35,6 +118,7 @@ bool MacroSegment::Load(obs_data_t *obj)
|
|||||||
{
|
{
|
||||||
OBSDataAutoRelease data = obs_data_get_obj(obj, "segmentSettings");
|
OBSDataAutoRelease data = obs_data_get_obj(obj, "segmentSettings");
|
||||||
_collapsed = obs_data_get_bool(data, "collapsed");
|
_collapsed = obs_data_get_bool(data, "collapsed");
|
||||||
|
_varMappingExpanded = obs_data_get_bool(data, "varMappingExpanded");
|
||||||
_useCustomLabel = obs_data_get_bool(data, "useCustomLabel");
|
_useCustomLabel = obs_data_get_bool(data, "useCustomLabel");
|
||||||
_customLabel = obs_data_get_string(data, "customLabel");
|
_customLabel = obs_data_get_string(data, "customLabel");
|
||||||
obs_data_set_default_bool(data, "enabled", true);
|
obs_data_set_default_bool(data, "enabled", true);
|
||||||
@@ -45,6 +129,26 @@ bool MacroSegment::Load(obs_data_t *obj)
|
|||||||
_enabled = obs_data_get_bool(obj, "enabled");
|
_enabled = obs_data_get_bool(obj, "enabled");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Reset the previously unused "enabled" value for conditions to "true"
|
||||||
|
if (obs_data_get_int(data, "version") < 2 &&
|
||||||
|
obs_data_has_user_value(obj, "logic")) {
|
||||||
|
_enabled = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
_varMappings.clear();
|
||||||
|
OBSDataArrayAutoRelease mappingsArray =
|
||||||
|
obs_data_get_array(data, "varMappings");
|
||||||
|
const size_t count = obs_data_array_count(mappingsArray);
|
||||||
|
_varMappings.reserve(count);
|
||||||
|
for (size_t i = 0; i < count; i++) {
|
||||||
|
OBSDataAutoRelease item = obs_data_array_item(mappingsArray, i);
|
||||||
|
VarMapping mapping;
|
||||||
|
mapping.variable = GetWeakVariableByName(
|
||||||
|
obs_data_get_string(item, "variable"));
|
||||||
|
_varMappings.push_back(std::move(mapping));
|
||||||
|
_varMappings.back().tempVar.Load(item, GetMacro(), "tempVar");
|
||||||
|
}
|
||||||
|
|
||||||
ClearAvailableTempvars();
|
ClearAvailableTempvars();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -152,6 +256,16 @@ void MacroSegment::AddTempvar(const std::string &id, const std::string &name,
|
|||||||
NotifyUIAboutTempVarChange(this);
|
NotifyUIAboutTempVarChange(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool MacroSegment::IsTempVarInUse(const std::string &id) const
|
||||||
|
{
|
||||||
|
for (const auto &var : _tempVariables) {
|
||||||
|
if (var.ID() == id) {
|
||||||
|
return var.IsInUse();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
void MacroSegment::SetTempVarValue(const std::string &id,
|
void MacroSegment::SetTempVarValue(const std::string &id,
|
||||||
const std::string &value)
|
const std::string &value)
|
||||||
{
|
{
|
||||||
@@ -211,11 +325,38 @@ MacroSegmentEdit::MacroSegmentEdit(QWidget *parent)
|
|||||||
_headerInfo(new QLabel()),
|
_headerInfo(new QLabel()),
|
||||||
_frame(new QWidget),
|
_frame(new QWidget),
|
||||||
_contentLayout(new QVBoxLayout),
|
_contentLayout(new QVBoxLayout),
|
||||||
|
_outputMappings(new TempVarOutputMappingsWidget(this)),
|
||||||
|
_varMappingToggle(new QPushButton(this)),
|
||||||
_noBorderframe(new QFrame),
|
_noBorderframe(new QFrame),
|
||||||
_borderFrame(new QFrame),
|
_borderFrame(new QFrame),
|
||||||
_dropLineAbove(new QFrame),
|
_dropLineAbove(new QFrame),
|
||||||
_dropLineBelow(new QFrame)
|
_dropLineBelow(new QFrame)
|
||||||
{
|
{
|
||||||
|
const auto iconPath = QString::fromStdString(GetDataFilePath(
|
||||||
|
"res/images/" + GetThemeTypeName() + "Variable.svg"));
|
||||||
|
_varMappingToggle->setIcon(QIcon(iconPath));
|
||||||
|
_varMappingToggle->setMaximumWidth(22);
|
||||||
|
_varMappingToggle->setFlat(true);
|
||||||
|
_varMappingToggle->setCheckable(true);
|
||||||
|
_varMappingToggle->setVisible(false);
|
||||||
|
_varMappingToggle->setToolTip(obs_module_text(
|
||||||
|
"AdvSceneSwitcher.tempVar.outputMappings.toggle"));
|
||||||
|
|
||||||
|
QWidget::connect(_varMappingToggle, &QPushButton::toggled,
|
||||||
|
_outputMappings,
|
||||||
|
&TempVarOutputMappingsWidget::SetPanelExpanded);
|
||||||
|
QWidget::connect(_varMappingToggle, &QPushButton::toggled, this,
|
||||||
|
[this](bool checked) {
|
||||||
|
if (Data()) {
|
||||||
|
Data()->SetVarMappingExpanded(checked);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
QWidget::connect(_outputMappings,
|
||||||
|
&TempVarOutputMappingsWidget::ExpandableChanged,
|
||||||
|
_varMappingToggle, &QPushButton::setVisible);
|
||||||
|
QWidget::connect(_section, &Section::Collapsed, _outputMappings,
|
||||||
|
&TempVarOutputMappingsWidget::SetSectionCollapsed);
|
||||||
|
|
||||||
_dropLineAbove->setLineWidth(3);
|
_dropLineAbove->setLineWidth(3);
|
||||||
_dropLineAbove->setFixedHeight(11);
|
_dropLineAbove->setFixedHeight(11);
|
||||||
_dropLineBelow->setLineWidth(3);
|
_dropLineBelow->setLineWidth(3);
|
||||||
@@ -277,6 +418,21 @@ MacroSegmentEdit::MacroSegmentEdit(QWidget *parent)
|
|||||||
_headerInfo->installEventFilter(this);
|
_headerInfo->installEventFilter(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MacroSegmentEdit::SetupVarMappings(MacroSegment *segment)
|
||||||
|
{
|
||||||
|
_outputMappings->SetSegment(segment);
|
||||||
|
_varMappingToggle->setChecked(segment &&
|
||||||
|
segment->GetVarMappingExpanded());
|
||||||
|
}
|
||||||
|
|
||||||
|
void MacroSegmentEdit::ShowVariableMappings(bool show)
|
||||||
|
{
|
||||||
|
_varMappingToggle->setChecked(show);
|
||||||
|
if (Data()) {
|
||||||
|
Data()->SetVarMappingExpanded(show);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
bool MacroSegmentEdit::eventFilter(QObject *obj, QEvent *ev)
|
bool MacroSegmentEdit::eventFilter(QObject *obj, QEvent *ev)
|
||||||
{
|
{
|
||||||
if (obj == _headerInfo && ev->type() == QEvent::MouseMove) {
|
if (obj == _headerInfo && ev->type() == QEvent::MouseMove) {
|
||||||
|
|||||||
@@ -9,15 +9,23 @@
|
|||||||
|
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
#include <QFrame>
|
#include <QFrame>
|
||||||
|
#include <QPushButton>
|
||||||
#include <QVBoxLayout>
|
#include <QVBoxLayout>
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
#include <obs-data.h>
|
#include <obs-data.h>
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
class QLabel;
|
class QLabel;
|
||||||
|
|
||||||
namespace advss {
|
namespace advss {
|
||||||
|
|
||||||
class Macro;
|
class Macro;
|
||||||
|
class Variable;
|
||||||
|
|
||||||
|
struct VarMapping {
|
||||||
|
TempVariableRef tempVar;
|
||||||
|
std::weak_ptr<Variable> variable;
|
||||||
|
};
|
||||||
|
|
||||||
class EXPORT MacroSegment : public Lockable {
|
class EXPORT MacroSegment : public Lockable {
|
||||||
public:
|
public:
|
||||||
@@ -28,12 +36,15 @@ public:
|
|||||||
int GetIndex() const { return _idx; }
|
int GetIndex() const { return _idx; }
|
||||||
void SetCollapsed(bool collapsed) { _collapsed = collapsed; }
|
void SetCollapsed(bool collapsed) { _collapsed = collapsed; }
|
||||||
bool GetCollapsed() const { return _collapsed; }
|
bool GetCollapsed() const { return _collapsed; }
|
||||||
|
void SetVarMappingExpanded(bool expanded);
|
||||||
|
bool GetVarMappingExpanded() const { return _varMappingExpanded; }
|
||||||
void SetUseCustomLabel(bool enable) { _useCustomLabel = enable; }
|
void SetUseCustomLabel(bool enable) { _useCustomLabel = enable; }
|
||||||
bool GetUseCustomLabel() const { return _useCustomLabel; }
|
bool GetUseCustomLabel() const { return _useCustomLabel; }
|
||||||
void SetCustomLabel(const std::string &label) { _customLabel = label; }
|
void SetCustomLabel(const std::string &label) { _customLabel = label; }
|
||||||
std::string GetCustomLabel() const { return _customLabel; }
|
std::string GetCustomLabel() const { return _customLabel; }
|
||||||
virtual bool Save(obs_data_t *obj) const = 0;
|
virtual bool Save(obs_data_t *obj) const = 0;
|
||||||
virtual bool Load(obs_data_t *obj) = 0;
|
virtual bool Load(obs_data_t *obj) = 0;
|
||||||
|
virtual std::vector<TempVariableRef> GetTempVarRefs() const;
|
||||||
virtual bool PostLoad();
|
virtual bool PostLoad();
|
||||||
virtual std::string GetShortDesc() const;
|
virtual std::string GetShortDesc() const;
|
||||||
virtual std::string GetId() const = 0;
|
virtual std::string GetId() const = 0;
|
||||||
@@ -42,6 +53,11 @@ public:
|
|||||||
void SetEnabled(bool);
|
void SetEnabled(bool);
|
||||||
bool Enabled() const;
|
bool Enabled() const;
|
||||||
virtual std::string GetVariableValue() const;
|
virtual std::string GetVariableValue() const;
|
||||||
|
void ApplyVarMappings();
|
||||||
|
const std::vector<VarMapping> &GetVarMappings() const;
|
||||||
|
void SetVarMappings(const std::vector<VarMapping> &mappings);
|
||||||
|
std::vector<TempVariable> GetOwnTempVars() const;
|
||||||
|
void FixupVarMappingRefs();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
friend bool SupportsVariableValue(MacroSegment *);
|
friend bool SupportsVariableValue(MacroSegment *);
|
||||||
@@ -54,6 +70,7 @@ protected:
|
|||||||
void AddTempvar(const std::string &id, const std::string &name,
|
void AddTempvar(const std::string &id, const std::string &name,
|
||||||
const std::string &description = "");
|
const std::string &description = "");
|
||||||
|
|
||||||
|
bool IsTempVarInUse(const std::string &id) const;
|
||||||
void SetTempVarValue(const std::string &id, const std::string &value);
|
void SetTempVarValue(const std::string &id, const std::string &value);
|
||||||
|
|
||||||
template<typename T, typename = std::enable_if_t<
|
template<typename T, typename = std::enable_if_t<
|
||||||
@@ -64,6 +81,14 @@ protected:
|
|||||||
: std::string("false"));
|
: std::string("false"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template<typename F, typename = std::enable_if_t<std::is_invocable_v<F>>>
|
||||||
|
void SetTempVarValue(const std::string &id, F &&valueProvider)
|
||||||
|
{
|
||||||
|
if (IsTempVarInUse(id)) {
|
||||||
|
SetTempVarValue(id, valueProvider());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void ClearAvailableTempvars();
|
void ClearAvailableTempvars();
|
||||||
std::optional<const TempVariable>
|
std::optional<const TempVariable>
|
||||||
@@ -77,6 +102,7 @@ private:
|
|||||||
// UI helper
|
// UI helper
|
||||||
bool _highlight = false;
|
bool _highlight = false;
|
||||||
bool _collapsed = false;
|
bool _collapsed = false;
|
||||||
|
bool _varMappingExpanded = false;
|
||||||
bool _enabled = true;
|
bool _enabled = true;
|
||||||
|
|
||||||
// Custom header labels
|
// Custom header labels
|
||||||
@@ -89,6 +115,7 @@ private:
|
|||||||
int _variableRefs = 0;
|
int _variableRefs = 0;
|
||||||
std::string _variableValue;
|
std::string _variableValue;
|
||||||
std::vector<TempVariable> _tempVariables;
|
std::vector<TempVariable> _tempVariables;
|
||||||
|
std::vector<VarMapping> _varMappings;
|
||||||
|
|
||||||
friend class Macro;
|
friend class Macro;
|
||||||
};
|
};
|
||||||
@@ -107,9 +134,13 @@ public:
|
|||||||
void SetSelected(bool);
|
void SetSelected(bool);
|
||||||
virtual std::shared_ptr<MacroSegment> Data() const = 0;
|
virtual std::shared_ptr<MacroSegment> Data() const = 0;
|
||||||
virtual void SetupWidgets(bool basicSetup = false) = 0;
|
virtual void SetupWidgets(bool basicSetup = false) = 0;
|
||||||
|
virtual void FocusTypeSelection() {}
|
||||||
|
|
||||||
|
void SetupVarMappings(MacroSegment *segment);
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void HeaderInfoChanged(const QString &);
|
void HeaderInfoChanged(const QString &);
|
||||||
|
void ShowVariableMappings(bool show);
|
||||||
|
|
||||||
protected slots:
|
protected slots:
|
||||||
void Collapsed(bool) const;
|
void Collapsed(bool) const;
|
||||||
@@ -124,6 +155,8 @@ protected:
|
|||||||
QLabel *_headerInfo;
|
QLabel *_headerInfo;
|
||||||
QWidget *_frame;
|
QWidget *_frame;
|
||||||
QVBoxLayout *_contentLayout;
|
QVBoxLayout *_contentLayout;
|
||||||
|
TempVarOutputMappingsWidget *_outputMappings;
|
||||||
|
QPushButton *_varMappingToggle;
|
||||||
bool _allWidgetsAreSetup = false;
|
bool _allWidgetsAreSetup = false;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|||||||
@@ -51,6 +51,7 @@ void MacroSelection::HideSelectedMacro()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef UNIT_TEST
|
||||||
const auto m = ssWindow->ui->macros->GetCurrentMacro();
|
const auto m = ssWindow->ui->macros->GetCurrentMacro();
|
||||||
if (!m) {
|
if (!m) {
|
||||||
return;
|
return;
|
||||||
@@ -61,6 +62,7 @@ void MacroSelection::HideSelectedMacro()
|
|||||||
}
|
}
|
||||||
|
|
||||||
qobject_cast<QListView *>(view())->setRowHidden(idx, true);
|
qobject_cast<QListView *>(view())->setRowHidden(idx, true);
|
||||||
|
#endif // !UNIT_TEST
|
||||||
}
|
}
|
||||||
|
|
||||||
void MacroSelection::HideGroups()
|
void MacroSelection::HideGroups()
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ signals:
|
|||||||
void Remove(const QString &);
|
void Remove(const QString &);
|
||||||
void SegmentOrderChanged();
|
void SegmentOrderChanged();
|
||||||
void HighlightChanged(bool value);
|
void HighlightChanged(bool value);
|
||||||
|
void ConditionTypeCreated(const QString &typeId);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
MacroSignalManager(QObject *parent = nullptr);
|
MacroSignalManager(QObject *parent = nullptr);
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
#include "advanced-scene-switcher.hpp"
|
#include "advanced-scene-switcher.hpp"
|
||||||
#include "action-queue.hpp"
|
|
||||||
#include "macro-action-edit.hpp"
|
#include "macro-action-edit.hpp"
|
||||||
#include "macro-condition-edit.hpp"
|
#include "macro-condition-edit.hpp"
|
||||||
#include "macro-export-import-dialog.hpp"
|
#include "macro-export-import-dialog.hpp"
|
||||||
@@ -316,13 +315,9 @@ void AdvSceneSwitcher::ExportMacros() const
|
|||||||
obs_data_array_push_back(macroArray, obj);
|
obs_data_array_push_back(macroArray, obj);
|
||||||
}
|
}
|
||||||
obs_data_set_array(data, "macros", macroArray);
|
obs_data_set_array(data, "macros", macroArray);
|
||||||
SaveVariables(data);
|
|
||||||
SaveActionQueues(data);
|
|
||||||
obs_data_set_string(data, "version", g_GIT_TAG);
|
obs_data_set_string(data, "version", g_GIT_TAG);
|
||||||
auto json = obs_data_get_json(data);
|
|
||||||
QString exportString(json);
|
|
||||||
|
|
||||||
MacroExportImportDialog::ExportMacros(exportString);
|
MacroExportImportDialog::ExportMacros(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool AdvSceneSwitcher::ResolveMacroImportNameConflict(
|
bool AdvSceneSwitcher::ResolveMacroImportNameConflict(
|
||||||
@@ -384,8 +379,6 @@ void AdvSceneSwitcher::ImportMacros()
|
|||||||
ImportMacros();
|
ImportMacros();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ImportVariables(data);
|
|
||||||
ImportQueues(data);
|
|
||||||
|
|
||||||
auto version = obs_data_get_string(data, "version");
|
auto version = obs_data_get_string(data, "version");
|
||||||
if (strcmp(version, g_GIT_TAG) != 0) {
|
if (strcmp(version, g_GIT_TAG) != 0) {
|
||||||
@@ -402,7 +395,7 @@ void AdvSceneSwitcher::ImportMacros()
|
|||||||
std::vector<std::shared_ptr<Macro>> importedMacros;
|
std::vector<std::shared_ptr<Macro>> importedMacros;
|
||||||
auto &tempMacros = GetTemporaryMacros();
|
auto &tempMacros = GetTemporaryMacros();
|
||||||
|
|
||||||
auto lock = LockContext();
|
std::unique_lock<std::mutex> lock(*GetMutex());
|
||||||
for (size_t i = 0; i < count; i++) {
|
for (size_t i = 0; i < count; i++) {
|
||||||
tempMacros.clear();
|
tempMacros.clear();
|
||||||
|
|
||||||
@@ -412,10 +405,14 @@ void AdvSceneSwitcher::ImportMacros()
|
|||||||
macro->Load(array_obj);
|
macro->Load(array_obj);
|
||||||
RunAndClearPostLoadSteps();
|
RunAndClearPostLoadSteps();
|
||||||
|
|
||||||
if (macroNameExists(macro->Name()) &&
|
if (macroNameExists(macro->Name())) {
|
||||||
!ResolveMacroImportNameConflict(macro)) {
|
lock.unlock();
|
||||||
groupSize--;
|
bool resolved = ResolveMacroImportNameConflict(macro);
|
||||||
continue;
|
lock.lock();
|
||||||
|
if (!resolved) {
|
||||||
|
groupSize--;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
importedMacros.emplace_back(macro);
|
importedMacros.emplace_back(macro);
|
||||||
@@ -474,14 +471,17 @@ void AdvSceneSwitcher::on_runMacroInParallel_stateChanged(int value) const
|
|||||||
macro->SetRunInParallel(value);
|
macro->SetRunInParallel(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AdvSceneSwitcher::on_runMacroOnChange_stateChanged(int value) const
|
void AdvSceneSwitcher::on_actionTriggerMode_currentIndexChanged(int index) const
|
||||||
{
|
{
|
||||||
auto macro = GetSelectedMacro();
|
auto macro = GetSelectedMacro();
|
||||||
if (!macro) {
|
if (!macro) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto lock = LockContext();
|
auto lock = LockContext();
|
||||||
macro->SetMatchOnChange(value);
|
const auto mode = static_cast<Macro::ActionTriggerMode>(
|
||||||
|
ui->actionTriggerMode->itemData(index).toInt());
|
||||||
|
macro->SetActionTriggerMode(mode);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AdvSceneSwitcher::SetMacroEditAreaDisabled(bool disable) const
|
void AdvSceneSwitcher::SetMacroEditAreaDisabled(bool disable) const
|
||||||
@@ -489,7 +489,7 @@ void AdvSceneSwitcher::SetMacroEditAreaDisabled(bool disable) const
|
|||||||
ui->macroName->setDisabled(disable);
|
ui->macroName->setDisabled(disable);
|
||||||
ui->runMacro->setDisabled(disable);
|
ui->runMacro->setDisabled(disable);
|
||||||
ui->runMacroInParallel->setDisabled(disable);
|
ui->runMacroInParallel->setDisabled(disable);
|
||||||
ui->runMacroOnChange->setDisabled(disable);
|
ui->actionTriggerMode->setDisabled(disable);
|
||||||
ui->macroEdit->SetControlsDisabled(disable);
|
ui->macroEdit->SetControlsDisabled(disable);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -519,10 +519,12 @@ void AdvSceneSwitcher::MacroSelectionChanged()
|
|||||||
{
|
{
|
||||||
const QSignalBlocker b1(ui->macroName);
|
const QSignalBlocker b1(ui->macroName);
|
||||||
const QSignalBlocker b2(ui->runMacroInParallel);
|
const QSignalBlocker b2(ui->runMacroInParallel);
|
||||||
const QSignalBlocker b3(ui->runMacroOnChange);
|
const QSignalBlocker b3(ui->actionTriggerMode);
|
||||||
ui->macroName->setText(macro->Name().c_str());
|
ui->macroName->setText(macro->Name().c_str());
|
||||||
ui->runMacroInParallel->setChecked(macro->RunInParallel());
|
ui->runMacroInParallel->setChecked(macro->RunInParallel());
|
||||||
ui->runMacroOnChange->setChecked(macro->MatchOnChange());
|
ui->actionTriggerMode->setCurrentIndex(
|
||||||
|
ui->actionTriggerMode->findData(static_cast<int>(
|
||||||
|
macro->GetActionTriggerMode())));
|
||||||
}
|
}
|
||||||
|
|
||||||
macro->ResetUIHelpers();
|
macro->ResetUIHelpers();
|
||||||
@@ -552,9 +554,13 @@ void AdvSceneSwitcher::HighlightOnChange() const
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (macro->OnChangePreventedActionsSince(
|
if (macro->Paused()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (macro->ActionTriggerModePreventedActionsSince(
|
||||||
lastOnChangeHighlightCheckTime)) {
|
lastOnChangeHighlightCheckTime)) {
|
||||||
HighlightWidget(ui->runMacroOnChange, Qt::yellow,
|
HighlightWidget(ui->actionTriggerMode, Qt::yellow,
|
||||||
Qt::transparent, true);
|
Qt::transparent, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -665,23 +671,49 @@ void AdvSceneSwitcher::SetupMacroTab()
|
|||||||
SLOT(HighlightOnChange()));
|
SLOT(HighlightOnChange()));
|
||||||
onChangeHighlightTimer.start();
|
onChangeHighlightTimer.start();
|
||||||
|
|
||||||
// Reserve more space for macro edit area than for the macro list
|
|
||||||
ui->macroListMacroEditSplitter->setStretchFactor(0, 1);
|
|
||||||
ui->macroListMacroEditSplitter->setStretchFactor(1, 4);
|
|
||||||
|
|
||||||
if (switcher->saveWindowGeo) {
|
|
||||||
if (shouldRestoreSplitter(
|
|
||||||
switcher->macroListMacroEditSplitterPosition)) {
|
|
||||||
ui->macroListMacroEditSplitter->setSizes(
|
|
||||||
switcher->macroListMacroEditSplitterPosition);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
SetupMacroSearchWidgets(ui->macroSearchLayout, ui->macroSearchText,
|
SetupMacroSearchWidgets(ui->macroSearchLayout, ui->macroSearchText,
|
||||||
ui->macroSearchClear, ui->macroSearchType,
|
ui->macroSearchClear, ui->macroSearchType,
|
||||||
ui->macroSearchRegex,
|
ui->macroSearchRegex,
|
||||||
ui->macroSearchShowSettings,
|
ui->macroSearchShowSettings,
|
||||||
[this]() { ui->macros->RefreshFilter(); });
|
[this]() { ui->macros->RefreshFilter(); });
|
||||||
|
|
||||||
|
static const std::vector<
|
||||||
|
std::pair<Macro::ActionTriggerMode, const char *>>
|
||||||
|
actionTriggerModes = {
|
||||||
|
{Macro::ActionTriggerMode::ALWAYS,
|
||||||
|
"AdvSceneSwitcher.macroTab.actionTriggerMode.always"},
|
||||||
|
{Macro::ActionTriggerMode::MACRO_RESULT_CHANGED,
|
||||||
|
"AdvSceneSwitcher.macroTab.actionTriggerMode.onOverallChange"},
|
||||||
|
{Macro::ActionTriggerMode::ANY_CONDITION_CHANGED,
|
||||||
|
"AdvSceneSwitcher.macroTab.actionTriggerMode.onAnyConditionChange"},
|
||||||
|
{Macro::ActionTriggerMode::ANY_CONDITION_TRIGGERED,
|
||||||
|
"AdvSceneSwitcher.macroTab.actionTriggerMode.onAnyConditionTriggered"},
|
||||||
|
};
|
||||||
|
|
||||||
|
for (const auto &[mode, name] : actionTriggerModes) {
|
||||||
|
ui->actionTriggerMode->addItem(obs_module_text(name),
|
||||||
|
static_cast<int>(mode));
|
||||||
|
}
|
||||||
|
|
||||||
|
ui->macroListBox->setSizePolicy(QSizePolicy::Ignored,
|
||||||
|
QSizePolicy::Preferred);
|
||||||
|
ui->macroListBox->setMinimumWidth(0);
|
||||||
|
ui->macroEditGroup->setSizePolicy(QSizePolicy::Ignored,
|
||||||
|
QSizePolicy::Preferred);
|
||||||
|
ui->macroEditGroup->setMinimumWidth(0);
|
||||||
|
|
||||||
|
if (shouldRestoreSplitter(
|
||||||
|
switcher->macroListMacroEditSplitterPosition)) {
|
||||||
|
ui->macroListMacroEditSplitter->setSizes(
|
||||||
|
switcher->macroListMacroEditSplitterPosition);
|
||||||
|
} else {
|
||||||
|
QTimer::singleShot(0, this, [this]() {
|
||||||
|
const auto totalWidth =
|
||||||
|
ui->macroListMacroEditSplitter->width();
|
||||||
|
ui->macroListMacroEditSplitter->setSizes(
|
||||||
|
{totalWidth / 5, totalWidth * 4 / 5});
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void AdvSceneSwitcher::ShowMacroContextMenu(const QPoint &pos)
|
void AdvSceneSwitcher::ShowMacroContextMenu(const QPoint &pos)
|
||||||
|
|||||||
@@ -224,7 +224,8 @@ void MacroTreeItem::HighlightIfExecuted()
|
|||||||
|
|
||||||
if (!wasHighlighted &&
|
if (!wasHighlighted &&
|
||||||
_lastHighlightCheckTime.time_since_epoch().count() != 0 &&
|
_lastHighlightCheckTime.time_since_epoch().count() != 0 &&
|
||||||
_macro->OnChangePreventedActionsSince(_lastHighlightCheckTime)) {
|
_macro->ActionTriggerModePreventedActionsSince(
|
||||||
|
_lastHighlightCheckTime)) {
|
||||||
HighlightWidget(this, Qt::yellow, QColor(0, 0, 0, 0), true);
|
HighlightWidget(this, Qt::yellow, QColor(0, 0, 0, 0), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -17,6 +17,17 @@
|
|||||||
|
|
||||||
namespace advss {
|
namespace advss {
|
||||||
|
|
||||||
|
static bool setup()
|
||||||
|
{
|
||||||
|
AddPluginCleanupStep([]() {
|
||||||
|
GetTopLevelMacros().clear();
|
||||||
|
GetTemporaryMacros().clear();
|
||||||
|
});
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
static bool setupDone = setup();
|
||||||
|
|
||||||
Macro::Macro(const std::string &name) : _dockSettings(this)
|
Macro::Macro(const std::string &name) : _dockSettings(this)
|
||||||
{
|
{
|
||||||
SetName(name);
|
SetName(name);
|
||||||
@@ -111,18 +122,18 @@ static bool checkCondition(const std::shared_ptr<MacroCondition> &condition)
|
|||||||
const auto startTime = std::chrono::high_resolution_clock::now();
|
const auto startTime = std::chrono::high_resolution_clock::now();
|
||||||
bool conditionMatched = false;
|
bool conditionMatched = false;
|
||||||
condition->WithLock([&condition, &conditionMatched]() {
|
condition->WithLock([&condition, &conditionMatched]() {
|
||||||
conditionMatched = condition->CheckCondition();
|
conditionMatched = condition->EvaluateCondition();
|
||||||
});
|
});
|
||||||
|
condition->ApplyVarMappings();
|
||||||
const auto endTime = std::chrono::high_resolution_clock::now();
|
const auto endTime = std::chrono::high_resolution_clock::now();
|
||||||
const auto timeSpent = endTime - startTime;
|
const auto timeSpent = endTime - startTime;
|
||||||
|
|
||||||
if (timeSpent >= perfLogThreshold) {
|
if (timeSpent >= perfLogThreshold) {
|
||||||
const long int ms =
|
|
||||||
std::chrono::duration_cast<std::chrono::milliseconds>(
|
|
||||||
timeSpent)
|
|
||||||
.count();
|
|
||||||
blog(LOG_WARNING,
|
blog(LOG_WARNING,
|
||||||
"spent %ld ms in %s condition check of macro '%s'!", ms,
|
"spent %lld ms in %s condition check of macro '%s'!",
|
||||||
|
(long long)std::chrono::duration_cast<
|
||||||
|
std::chrono::milliseconds>(timeSpent)
|
||||||
|
.count(),
|
||||||
condition->GetId().c_str(),
|
condition->GetId().c_str(),
|
||||||
condition->GetMacro()->Name().c_str());
|
condition->GetMacro()->Name().c_str());
|
||||||
}
|
}
|
||||||
@@ -145,6 +156,15 @@ bool Macro::CheckConditionHelper(
|
|||||||
return conditionMatched;
|
return conditionMatched;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (!condition->Enabled()) {
|
||||||
|
vblog(LOG_INFO, "ignoring condition '%s' for '%s'",
|
||||||
|
condition->GetId().c_str(), _name.c_str());
|
||||||
|
if (!_useShortCircuitEvaluation) {
|
||||||
|
(void)evaluateCondition();
|
||||||
|
}
|
||||||
|
return _matched;
|
||||||
|
}
|
||||||
|
|
||||||
const auto logicType = condition->GetLogicType();
|
const auto logicType = condition->GetLogicType();
|
||||||
if (logicType == Logic::Type::NONE) {
|
if (logicType == Logic::Type::NONE) {
|
||||||
vblog(LOG_INFO, "ignoring condition '%s' for '%s'",
|
vblog(LOG_INFO, "ignoring condition '%s' for '%s'",
|
||||||
@@ -241,12 +261,36 @@ bool Macro::CheckConditions(bool ignorePause)
|
|||||||
|
|
||||||
vblog(LOG_INFO, "Macro %s returned %d", _name.c_str(), _matched);
|
vblog(LOG_INFO, "Macro %s returned %d", _name.c_str(), _matched);
|
||||||
|
|
||||||
_conditionSateChanged = _lastMatched != _matched;
|
_actionModeMatch = false;
|
||||||
|
switch (_actionTriggerMode) {
|
||||||
|
case Macro::ActionTriggerMode::ALWAYS:
|
||||||
|
_actionModeMatch = true;
|
||||||
|
break;
|
||||||
|
case Macro::ActionTriggerMode::MACRO_RESULT_CHANGED:
|
||||||
|
_actionModeMatch = _lastMatched != _matched;
|
||||||
|
break;
|
||||||
|
case Macro::ActionTriggerMode::ANY_CONDITION_CHANGED:
|
||||||
|
for (const auto &condition : _conditions) {
|
||||||
|
if (condition->HasChanged()) {
|
||||||
|
_actionModeMatch = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case Macro::ActionTriggerMode::ANY_CONDITION_TRIGGERED:
|
||||||
|
for (const auto &condition : _conditions) {
|
||||||
|
if (condition->IsRisingEdge()) {
|
||||||
|
_actionModeMatch = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
const bool hasActionsToExecute = _matched ? (_actions.size() > 0)
|
const bool hasActionsToExecute = _matched ? (_actions.size() > 0)
|
||||||
: (_elseActions.size() > 0);
|
: (_elseActions.size() > 0);
|
||||||
if (!_conditionSateChanged && _performActionsOnChange &&
|
if (!_actionModeMatch && hasActionsToExecute && !_paused) {
|
||||||
hasActionsToExecute) {
|
_lastActionRunModePreventTime =
|
||||||
_lastOnChangeActionsPreventedTime =
|
|
||||||
std::chrono::high_resolution_clock::now();
|
std::chrono::high_resolution_clock::now();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -306,9 +350,9 @@ bool Macro::WasExecutedSince(const TimePoint &time) const
|
|||||||
return _lastExecutionTime > time;
|
return _lastExecutionTime > time;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Macro::OnChangePreventedActionsSince(const TimePoint &time) const
|
bool Macro::ActionTriggerModePreventedActionsSince(const TimePoint &time) const
|
||||||
{
|
{
|
||||||
return _lastOnChangeActionsPreventedTime > time;
|
return _lastActionRunModePreventTime > time;
|
||||||
}
|
}
|
||||||
|
|
||||||
Macro::TimePoint Macro::GetLastExecutionTime() const
|
Macro::TimePoint Macro::GetLastExecutionTime() const
|
||||||
@@ -342,10 +386,9 @@ bool Macro::ShouldRunActions() const
|
|||||||
|
|
||||||
const bool hasActionsToExecute =
|
const bool hasActionsToExecute =
|
||||||
!_paused && (_matched || _elseActions.size() > 0) &&
|
!_paused && (_matched || _elseActions.size() > 0) &&
|
||||||
(!_performActionsOnChange || _conditionSateChanged);
|
_actionModeMatch;
|
||||||
|
|
||||||
if (VerboseLoggingEnabled() && _performActionsOnChange &&
|
if (VerboseLoggingEnabled() && !_actionModeMatch && !_paused) {
|
||||||
!_conditionSateChanged) {
|
|
||||||
if (_matched && _actions.size() > 0) {
|
if (_matched && _actions.size() > 0) {
|
||||||
blog(LOG_INFO, "skip actions for Macro %s (on change)",
|
blog(LOG_INFO, "skip actions for Macro %s (on change)",
|
||||||
_name.c_str());
|
_name.c_str());
|
||||||
@@ -376,10 +419,24 @@ void Macro::ResetTimers()
|
|||||||
_lastExecutionTime = {};
|
_lastExecutionTime = {};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Macro::SetActionTriggerMode(ActionTriggerMode mode)
|
||||||
|
{
|
||||||
|
_actionTriggerMode = mode;
|
||||||
|
}
|
||||||
|
|
||||||
|
Macro::ActionTriggerMode Macro::GetActionTriggerMode() const
|
||||||
|
{
|
||||||
|
return _actionTriggerMode;
|
||||||
|
}
|
||||||
|
|
||||||
bool Macro::RunActionsHelper(
|
bool Macro::RunActionsHelper(
|
||||||
const std::deque<std::shared_ptr<MacroAction>> &actionsToRun,
|
const std::deque<std::shared_ptr<MacroAction>> &actionsToRun,
|
||||||
bool ignorePause)
|
bool ignorePause)
|
||||||
{
|
{
|
||||||
|
if (_paused && !ignorePause) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
// Create copy of action list as elements might be removed, inserted, or
|
// Create copy of action list as elements might be removed, inserted, or
|
||||||
// reordered while actions are currently being executed.
|
// reordered while actions are currently being executed.
|
||||||
auto actions = actionsToRun;
|
auto actions = actionsToRun;
|
||||||
@@ -395,6 +452,7 @@ bool Macro::RunActionsHelper(
|
|||||||
action->WithLock([&action, &actionResult]() {
|
action->WithLock([&action, &actionResult]() {
|
||||||
actionResult = action->PerformAction();
|
actionResult = action->PerformAction();
|
||||||
});
|
});
|
||||||
|
action->ApplyVarMappings();
|
||||||
actionsExecutedSuccessfully =
|
actionsExecutedSuccessfully =
|
||||||
actionsExecutedSuccessfully && actionResult;
|
actionsExecutedSuccessfully && actionResult;
|
||||||
} else {
|
} else {
|
||||||
@@ -429,11 +487,6 @@ bool Macro::WasPausedSince(const TimePoint &time) const
|
|||||||
return _lastUnpauseTime > time;
|
return _lastUnpauseTime > time;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Macro::SetMatchOnChange(bool onChange)
|
|
||||||
{
|
|
||||||
_performActionsOnChange = onChange;
|
|
||||||
}
|
|
||||||
|
|
||||||
void Macro::SetStopActionsIfNotDone(bool stopActionsIfNotDone)
|
void Macro::SetStopActionsIfNotDone(bool stopActionsIfNotDone)
|
||||||
{
|
{
|
||||||
_stopActionsIfNotDone = stopActionsIfNotDone;
|
_stopActionsIfNotDone = stopActionsIfNotDone;
|
||||||
@@ -754,7 +807,8 @@ bool Macro::Save(obs_data_t *obj, bool saveForCopy) const
|
|||||||
obs_data_set_bool(obj, "pause", _paused);
|
obs_data_set_bool(obj, "pause", _paused);
|
||||||
obs_data_set_bool(obj, "parallel", _runInParallel);
|
obs_data_set_bool(obj, "parallel", _runInParallel);
|
||||||
obs_data_set_bool(obj, "checkConditionsInParallel", _checkInParallel);
|
obs_data_set_bool(obj, "checkConditionsInParallel", _checkInParallel);
|
||||||
obs_data_set_bool(obj, "onChange", _performActionsOnChange);
|
obs_data_set_int(obj, "actionTriggerMode",
|
||||||
|
static_cast<int>(_actionTriggerMode));
|
||||||
obs_data_set_bool(obj, "skipExecOnStart", _skipExecOnStart);
|
obs_data_set_bool(obj, "skipExecOnStart", _skipExecOnStart);
|
||||||
obs_data_set_bool(obj, "stopActionsIfNotDone", _stopActionsIfNotDone);
|
obs_data_set_bool(obj, "stopActionsIfNotDone", _stopActionsIfNotDone);
|
||||||
obs_data_set_bool(obj, "useShortCircuitEvaluation",
|
obs_data_set_bool(obj, "useShortCircuitEvaluation",
|
||||||
@@ -840,7 +894,15 @@ bool Macro::Load(obs_data_t *obj)
|
|||||||
}
|
}
|
||||||
_runInParallel = obs_data_get_bool(obj, "parallel");
|
_runInParallel = obs_data_get_bool(obj, "parallel");
|
||||||
_checkInParallel = obs_data_get_bool(obj, "checkConditionsInParallel");
|
_checkInParallel = obs_data_get_bool(obj, "checkConditionsInParallel");
|
||||||
_performActionsOnChange = obs_data_get_bool(obj, "onChange");
|
if (obs_data_has_user_value(obj, "onChange")) {
|
||||||
|
const bool onChange = obs_data_get_bool(obj, "onChange");
|
||||||
|
_actionTriggerMode =
|
||||||
|
onChange ? ActionTriggerMode::MACRO_RESULT_CHANGED
|
||||||
|
: ActionTriggerMode::ALWAYS;
|
||||||
|
} else {
|
||||||
|
_actionTriggerMode = static_cast<ActionTriggerMode>(
|
||||||
|
obs_data_get_int(obj, "actionTriggerMode"));
|
||||||
|
}
|
||||||
_skipExecOnStart = obs_data_get_bool(obj, "skipExecOnStart");
|
_skipExecOnStart = obs_data_get_bool(obj, "skipExecOnStart");
|
||||||
_stopActionsIfNotDone = obs_data_get_bool(obj, "stopActionsIfNotDone");
|
_stopActionsIfNotDone = obs_data_get_bool(obj, "stopActionsIfNotDone");
|
||||||
_useShortCircuitEvaluation =
|
_useShortCircuitEvaluation =
|
||||||
@@ -1100,9 +1162,11 @@ void Macro::ClearHotkeys() const
|
|||||||
void setHotkeyDescriptionHelper(const char *formatModuleText,
|
void setHotkeyDescriptionHelper(const char *formatModuleText,
|
||||||
const std::string name, const obs_hotkey_id id)
|
const std::string name, const obs_hotkey_id id)
|
||||||
{
|
{
|
||||||
|
#ifndef UNIT_TEST
|
||||||
QString format{obs_module_text(formatModuleText)};
|
QString format{obs_module_text(formatModuleText)};
|
||||||
QString hotkeyDesc = format.arg(QString::fromStdString(name));
|
QString hotkeyDesc = format.arg(QString::fromStdString(name));
|
||||||
obs_hotkey_set_description(id, hotkeyDesc.toStdString().c_str());
|
obs_hotkey_set_description(id, hotkeyDesc.toStdString().c_str());
|
||||||
|
#endif // !UNIT_TEST
|
||||||
}
|
}
|
||||||
|
|
||||||
void Macro::SetHotkeysDesc() const
|
void Macro::SetHotkeysDesc() const
|
||||||
@@ -1252,7 +1316,14 @@ bool RunMacros()
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void StopAllMacros()
|
void SignalStopAllMacros()
|
||||||
|
{
|
||||||
|
for (const auto &m : GetAllMacros()) {
|
||||||
|
m->SignalStop();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void WaitForAllMacros()
|
||||||
{
|
{
|
||||||
for (const auto &m : GetAllMacros()) {
|
for (const auto &m : GetAllMacros()) {
|
||||||
m->Stop();
|
m->Stop();
|
||||||
|
|||||||
@@ -26,6 +26,16 @@ class Macro {
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
enum class PauseStateSaveBehavior { PERSIST, PAUSE, UNPAUSE };
|
enum class PauseStateSaveBehavior { PERSIST, PAUSE, UNPAUSE };
|
||||||
|
enum class ActionTriggerMode {
|
||||||
|
// Trigger always
|
||||||
|
ALWAYS,
|
||||||
|
// Trigger when macro match result flips
|
||||||
|
MACRO_RESULT_CHANGED,
|
||||||
|
// Trigger when any individual condition changes
|
||||||
|
ANY_CONDITION_CHANGED,
|
||||||
|
// Trigger when any individual condition evaluates to true
|
||||||
|
ANY_CONDITION_TRIGGERED,
|
||||||
|
};
|
||||||
|
|
||||||
Macro(const std::string &name = "");
|
Macro(const std::string &name = "");
|
||||||
Macro(const std::string &name, const GlobalMacroSettings &settings);
|
Macro(const std::string &name, const GlobalMacroSettings &settings);
|
||||||
@@ -51,11 +61,12 @@ public:
|
|||||||
PauseStateSaveBehavior GetPauseStateSaveBehavior() const;
|
PauseStateSaveBehavior GetPauseStateSaveBehavior() const;
|
||||||
|
|
||||||
void Stop();
|
void Stop();
|
||||||
|
void SignalStop() { _stop = true; }
|
||||||
bool GetStop() const { return _stop; }
|
bool GetStop() const { return _stop; }
|
||||||
void ResetTimers();
|
void ResetTimers();
|
||||||
|
|
||||||
void SetMatchOnChange(bool onChange);
|
void SetActionTriggerMode(ActionTriggerMode);
|
||||||
bool MatchOnChange() const { return _performActionsOnChange; }
|
ActionTriggerMode GetActionTriggerMode() const;
|
||||||
|
|
||||||
void SetSkipExecOnStart(bool skip) { _skipExecOnStart = skip; }
|
void SetSkipExecOnStart(bool skip) { _skipExecOnStart = skip; }
|
||||||
bool SkipExecOnStart() const { return _skipExecOnStart; }
|
bool SkipExecOnStart() const { return _skipExecOnStart; }
|
||||||
@@ -137,7 +148,7 @@ public:
|
|||||||
const QList<int> &GetElseActionSplitterPosition() const;
|
const QList<int> &GetElseActionSplitterPosition() const;
|
||||||
bool HasValidSplitterPositions() const;
|
bool HasValidSplitterPositions() const;
|
||||||
bool WasExecutedSince(const TimePoint &) const;
|
bool WasExecutedSince(const TimePoint &) const;
|
||||||
bool OnChangePreventedActionsSince(const TimePoint &) const;
|
bool ActionTriggerModePreventedActionsSince(const TimePoint &) const;
|
||||||
TimePoint GetLastExecutionTime() const;
|
TimePoint GetLastExecutionTime() const;
|
||||||
void ResetUIHelpers();
|
void ResetUIHelpers();
|
||||||
|
|
||||||
@@ -169,7 +180,7 @@ private:
|
|||||||
TimePoint _lastCheckTime{};
|
TimePoint _lastCheckTime{};
|
||||||
TimePoint _lastUnpauseTime{};
|
TimePoint _lastUnpauseTime{};
|
||||||
TimePoint _lastExecutionTime{};
|
TimePoint _lastExecutionTime{};
|
||||||
TimePoint _lastOnChangeActionsPreventedTime{};
|
TimePoint _lastActionRunModePreventTime{};
|
||||||
std::vector<std::thread> _helperThreads;
|
std::vector<std::thread> _helperThreads;
|
||||||
|
|
||||||
std::deque<std::shared_ptr<MacroCondition>> _conditions;
|
std::deque<std::shared_ptr<MacroCondition>> _conditions;
|
||||||
@@ -184,14 +195,13 @@ private:
|
|||||||
bool _useShortCircuitEvaluation = false;
|
bool _useShortCircuitEvaluation = false;
|
||||||
bool _useCustomConditionCheckInterval = false;
|
bool _useCustomConditionCheckInterval = false;
|
||||||
Duration _customConditionCheckInterval = 0.3;
|
Duration _customConditionCheckInterval = 0.3;
|
||||||
bool _conditionSateChanged = false;
|
bool _actionModeMatch = false;
|
||||||
|
|
||||||
bool _runInParallel = false;
|
bool _runInParallel = false;
|
||||||
bool _checkInParallel = false;
|
bool _checkInParallel = false;
|
||||||
bool _matched = false;
|
bool _matched = false;
|
||||||
std::future<void> _conditionCheckFuture;
|
std::future<void> _conditionCheckFuture;
|
||||||
bool _lastMatched = false;
|
bool _lastMatched = false;
|
||||||
bool _performActionsOnChange = true;
|
|
||||||
bool _skipExecOnStart = false;
|
bool _skipExecOnStart = false;
|
||||||
bool _stopActionsIfNotDone = false;
|
bool _stopActionsIfNotDone = false;
|
||||||
bool _paused = false;
|
bool _paused = false;
|
||||||
@@ -201,6 +211,9 @@ private:
|
|||||||
obs_hotkey_id _unpauseHotkey = OBS_INVALID_HOTKEY_ID;
|
obs_hotkey_id _unpauseHotkey = OBS_INVALID_HOTKEY_ID;
|
||||||
obs_hotkey_id _togglePauseHotkey = OBS_INVALID_HOTKEY_ID;
|
obs_hotkey_id _togglePauseHotkey = OBS_INVALID_HOTKEY_ID;
|
||||||
|
|
||||||
|
ActionTriggerMode _actionTriggerMode =
|
||||||
|
ActionTriggerMode::MACRO_RESULT_CHANGED;
|
||||||
|
|
||||||
PauseStateSaveBehavior _pauseSaveBehavior =
|
PauseStateSaveBehavior _pauseSaveBehavior =
|
||||||
PauseStateSaveBehavior::PERSIST;
|
PauseStateSaveBehavior::PERSIST;
|
||||||
|
|
||||||
@@ -216,7 +229,7 @@ void LoadMacros(obs_data_t *obj);
|
|||||||
void SaveMacros(obs_data_t *obj);
|
void SaveMacros(obs_data_t *obj);
|
||||||
bool CheckMacros();
|
bool CheckMacros();
|
||||||
bool RunMacros();
|
bool RunMacros();
|
||||||
void StopAllMacros();
|
void WaitForAllMacros();
|
||||||
void InvalidateMacroTempVarValues();
|
void InvalidateMacroTempVarValues();
|
||||||
std::shared_ptr<Macro> GetMacroWithInvalidConditionInterval();
|
std::shared_ptr<Macro> GetMacroWithInvalidConditionInterval();
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
#import <Carbon/Carbon.h>
|
#import <Carbon/Carbon.h>
|
||||||
#include <Carbon/Carbon.h>
|
#include <Carbon/Carbon.h>
|
||||||
#include <util/platform.h>
|
#include <util/platform.h>
|
||||||
|
#include <set>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <QStringList>
|
#include <QStringList>
|
||||||
#include <QRegularExpression>
|
#include <QRegularExpression>
|
||||||
@@ -14,56 +15,18 @@
|
|||||||
|
|
||||||
namespace advss {
|
namespace advss {
|
||||||
|
|
||||||
void GetWindowList(std::vector<std::string> &windows)
|
static std::string nsStringToStdString(NSString *str)
|
||||||
{
|
{
|
||||||
windows.resize(0);
|
if (!str) {
|
||||||
|
return "";
|
||||||
@autoreleasepool {
|
|
||||||
CFArrayRef cfApps = CGWindowListCopyWindowInfo(
|
|
||||||
kCGWindowListOptionOnScreenOnly, kCGNullWindowID);
|
|
||||||
NSMutableArray *apps = (__bridge NSMutableArray *)cfApps;
|
|
||||||
for (NSDictionary *app in apps) {
|
|
||||||
std::string name([[app objectForKey:@"kCGWindowName"]
|
|
||||||
UTF8String],
|
|
||||||
[[app objectForKey:@"kCGWindowName"]
|
|
||||||
lengthOfBytesUsingEncoding:
|
|
||||||
NSUTF8StringEncoding]);
|
|
||||||
std::string owner(
|
|
||||||
[[app objectForKey:@"kCGWindowOwnerName"]
|
|
||||||
UTF8String],
|
|
||||||
[[app objectForKey:@"kCGWindowOwnerName"]
|
|
||||||
lengthOfBytesUsingEncoding:
|
|
||||||
NSUTF8StringEncoding]);
|
|
||||||
|
|
||||||
if (!name.empty() &&
|
|
||||||
find(windows.begin(), windows.end(), name) ==
|
|
||||||
windows.end()) {
|
|
||||||
windows.emplace_back(name);
|
|
||||||
}
|
|
||||||
if (!owner.empty() &&
|
|
||||||
find(windows.begin(), windows.end(), owner) ==
|
|
||||||
windows.end()) {
|
|
||||||
windows.emplace_back(owner);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
apps = nil;
|
|
||||||
CFRelease(cfApps);
|
|
||||||
}
|
}
|
||||||
|
const char *utf8 = [str UTF8String];
|
||||||
|
return utf8 ? utf8 : "";
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetWindowList(QStringList &windows)
|
std::string GetCurrentWindowTitle()
|
||||||
{
|
{
|
||||||
windows.clear();
|
std::string title;
|
||||||
std::vector<std::string> temp;
|
|
||||||
GetWindowList(temp);
|
|
||||||
for (auto &w : temp) {
|
|
||||||
windows << QString::fromStdString(w);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void GetCurrentWindowTitle(std::string &title)
|
|
||||||
{
|
|
||||||
title.resize(0);
|
|
||||||
@autoreleasepool {
|
@autoreleasepool {
|
||||||
CFArrayRef cfApps = CGWindowListCopyWindowInfo(
|
CFArrayRef cfApps = CGWindowListCopyWindowInfo(
|
||||||
kCGWindowListOptionOnScreenOnly, kCGNullWindowID);
|
kCGWindowListOptionOnScreenOnly, kCGNullWindowID);
|
||||||
@@ -107,102 +70,52 @@ void GetCurrentWindowTitle(std::string &title)
|
|||||||
apps = nil;
|
apps = nil;
|
||||||
CFRelease(cfApps);
|
CFRelease(cfApps);
|
||||||
}
|
}
|
||||||
|
return title;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool isWindowOriginOnScreen(NSDictionary *app, NSScreen *screen,
|
|
||||||
bool fullscreen = false)
|
|
||||||
{
|
|
||||||
NSArray *screens = [NSScreen screens];
|
|
||||||
NSRect mainScreenFrame = [screens[0] frame];
|
|
||||||
NSRect screenFrame;
|
|
||||||
if (fullscreen) {
|
|
||||||
screenFrame = [screen frame];
|
|
||||||
} else {
|
|
||||||
screenFrame = [screen visibleFrame];
|
|
||||||
}
|
|
||||||
NSRect windowBounds;
|
|
||||||
CGRectMakeWithDictionaryRepresentation(
|
|
||||||
(CFDictionaryRef)[app objectForKey:@"kCGWindowBounds"],
|
|
||||||
&windowBounds);
|
|
||||||
|
|
||||||
return (windowBounds.origin.x == screenFrame.origin.x &&
|
|
||||||
(mainScreenFrame.size.height - screenFrame.size.height -
|
|
||||||
windowBounds.origin.y ==
|
|
||||||
screenFrame.origin.y));
|
|
||||||
}
|
|
||||||
|
|
||||||
bool isWindowMaximizedOnScreen(NSDictionary *app, NSScreen *screen)
|
bool isWindowMaximizedOnScreen(NSDictionary *app, NSScreen *screen)
|
||||||
{
|
{
|
||||||
double maximizedTolerance = 0.99;
|
|
||||||
NSRect screenFrame = [screen frame];
|
|
||||||
NSRect windowBounds;
|
NSRect windowBounds;
|
||||||
CGRectMakeWithDictionaryRepresentation(
|
CGRectMakeWithDictionaryRepresentation(
|
||||||
(CFDictionaryRef)[app objectForKey:@"kCGWindowBounds"],
|
(CFDictionaryRef)[app objectForKey:@"kCGWindowBounds"],
|
||||||
&windowBounds);
|
&windowBounds);
|
||||||
|
|
||||||
int sumX = windowBounds.origin.x + windowBounds.size.width;
|
// CGWindowList: flipped coords, origin at top-left of main display.
|
||||||
int sumY = windowBounds.origin.y + windowBounds.size.height;
|
// NSScreen: Cocoa coords, origin at bottom-left of main display.
|
||||||
|
NSRect mainFrame = [[NSScreen screens][0] frame];
|
||||||
|
NSRect visFrame = [screen visibleFrame];
|
||||||
|
|
||||||
// Return false if window spans over multiple screens
|
// Convert visible area to CGWindow coordinates.
|
||||||
if (sumX > screenFrame.size.width) {
|
// screenTop is just below the menubar; screenBottom is just above the
|
||||||
|
// dock.
|
||||||
|
CGFloat screenLeft = visFrame.origin.x;
|
||||||
|
CGFloat screenTop =
|
||||||
|
mainFrame.size.height - visFrame.origin.y - visFrame.size.height;
|
||||||
|
CGFloat screenRight = screenLeft + visFrame.size.width;
|
||||||
|
CGFloat screenBottom = screenTop + visFrame.size.height;
|
||||||
|
|
||||||
|
const double tolerance = 4.0;
|
||||||
|
|
||||||
|
// Width must span the full visible width.
|
||||||
|
if (fabs(windowBounds.origin.x - screenLeft) > tolerance) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (sumY > screenFrame.size.height) {
|
if (fabs((windowBounds.origin.x + windowBounds.size.width) -
|
||||||
|
screenRight) > tolerance) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
// Bottom edge must align with the visible bottom (above dock).
|
||||||
return ((double)sumX / (double)screenFrame.size.width) >
|
if (fabs((windowBounds.origin.y + windowBounds.size.height) -
|
||||||
maximizedTolerance &&
|
screenBottom) > tolerance) {
|
||||||
((double)sumY / (double)screenFrame.size.height) >
|
return false;
|
||||||
maximizedTolerance;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool nameMachesPattern(std::string windowName, std::string pattern)
|
|
||||||
{
|
|
||||||
return QString::fromStdString(windowName)
|
|
||||||
.contains(QRegularExpression(QString::fromStdString(pattern)));
|
|
||||||
}
|
|
||||||
|
|
||||||
bool IsMaximized(const std::string &title)
|
|
||||||
{
|
|
||||||
@autoreleasepool {
|
|
||||||
NSArray *screens = [NSScreen screens];
|
|
||||||
CFArrayRef cfApps = CGWindowListCopyWindowInfo(
|
|
||||||
kCGWindowListOptionOnScreenOnly, kCGNullWindowID);
|
|
||||||
NSMutableArray *apps = (__bridge NSMutableArray *)cfApps;
|
|
||||||
for (NSDictionary *app in apps) {
|
|
||||||
std::string name([[app objectForKey:@"kCGWindowName"]
|
|
||||||
UTF8String],
|
|
||||||
[[app objectForKey:@"kCGWindowName"]
|
|
||||||
lengthOfBytesUsingEncoding:
|
|
||||||
NSUTF8StringEncoding]);
|
|
||||||
std::string owner(
|
|
||||||
[[app objectForKey:@"kCGWindowOwnerName"]
|
|
||||||
UTF8String],
|
|
||||||
[[app objectForKey:@"kCGWindowOwnerName"]
|
|
||||||
lengthOfBytesUsingEncoding:
|
|
||||||
NSUTF8StringEncoding]);
|
|
||||||
|
|
||||||
bool equals = (title == name || title == owner);
|
|
||||||
bool matches = nameMachesPattern(name, title) ||
|
|
||||||
nameMachesPattern(owner, title);
|
|
||||||
if (equals || matches) {
|
|
||||||
for (NSScreen *screen in screens) {
|
|
||||||
if (isWindowOriginOnScreen(app,
|
|
||||||
screen) &&
|
|
||||||
isWindowMaximizedOnScreen(app,
|
|
||||||
screen)) {
|
|
||||||
apps = nil;
|
|
||||||
CFRelease(cfApps);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
apps = nil;
|
|
||||||
CFRelease(cfApps);
|
|
||||||
}
|
}
|
||||||
return false;
|
// Top edge must be at or above the menubar line (some apps extend
|
||||||
|
// their window frame behind the menubar).
|
||||||
|
if (windowBounds.origin.y > screenTop + tolerance) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool isWindowFullscreenOnScreen(NSDictionary *app, NSScreen *screen)
|
bool isWindowFullscreenOnScreen(NSDictionary *app, NSScreen *screen)
|
||||||
@@ -216,52 +129,176 @@ bool isWindowFullscreenOnScreen(NSDictionary *app, NSScreen *screen)
|
|||||||
return NSEqualSizes(windowBounds.size, screenFrame.size);
|
return NSEqualSizes(windowBounds.size, screenFrame.size);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool IsFullscreen(const std::string &title)
|
std::vector<WindowInfo> GetWindows(const WindowQueryOptions &options)
|
||||||
{
|
{
|
||||||
|
std::vector<WindowInfo> result;
|
||||||
|
const std::string foregroundTitle = GetCurrentWindowTitle();
|
||||||
|
|
||||||
@autoreleasepool {
|
@autoreleasepool {
|
||||||
NSArray *screens = [NSScreen screens];
|
NSArray *screens = [NSScreen screens];
|
||||||
CFArrayRef cfApps = CGWindowListCopyWindowInfo(
|
|
||||||
kCGWindowListOptionOnScreenOnly, kCGNullWindowID);
|
|
||||||
NSMutableArray *apps = (__bridge NSMutableArray *)cfApps;
|
|
||||||
for (NSDictionary *app in apps) {
|
|
||||||
std::string name([[app objectForKey:@"kCGWindowName"]
|
|
||||||
UTF8String],
|
|
||||||
[[app objectForKey:@"kCGWindowName"]
|
|
||||||
lengthOfBytesUsingEncoding:
|
|
||||||
NSUTF8StringEncoding]);
|
|
||||||
std::string owner(
|
|
||||||
[[app objectForKey:@"kCGWindowOwnerName"]
|
|
||||||
UTF8String],
|
|
||||||
[[app objectForKey:@"kCGWindowOwnerName"]
|
|
||||||
lengthOfBytesUsingEncoding:
|
|
||||||
NSUTF8StringEncoding]);
|
|
||||||
|
|
||||||
bool equals = (title == name || title == owner);
|
CFArrayRef cfApps = CGWindowListCopyWindowInfo(
|
||||||
bool matches = nameMachesPattern(name, title) ||
|
kCGWindowListExcludeDesktopElements, kCGNullWindowID);
|
||||||
nameMachesPattern(owner, title);
|
NSMutableArray *apps = (__bridge NSMutableArray *)cfApps;
|
||||||
if (equals || matches) {
|
|
||||||
|
// Pre-compute which PIDs own at least one fullscreen-sized window.
|
||||||
|
// A fullscreen app reports a small chrome/title bar window first and
|
||||||
|
// its full-size content window second; checking only the first
|
||||||
|
// window's bounds gives a false negative.
|
||||||
|
std::set<int> fullscreenPIDs;
|
||||||
|
if (options.fullscreen) {
|
||||||
|
for (NSDictionary *app in apps) {
|
||||||
|
int layer = [[app objectForKey:@"kCGWindowLayer"]
|
||||||
|
intValue];
|
||||||
|
if (layer != 0) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
for (NSScreen *screen in screens) {
|
for (NSScreen *screen in screens) {
|
||||||
if (isWindowOriginOnScreen(app, screen,
|
if (isWindowFullscreenOnScreen(app,
|
||||||
true) &&
|
screen)) {
|
||||||
isWindowFullscreenOnScreen(
|
int pid = [[app objectForKey:
|
||||||
app, screen)) {
|
@"kCGWindowOwnerPID"]
|
||||||
apps = nil;
|
intValue];
|
||||||
CFRelease(cfApps);
|
fullscreenPIDs.insert(pid);
|
||||||
return true;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::set<int> maximizedPIDs;
|
||||||
|
if (options.maximized) {
|
||||||
|
for (NSDictionary *app in apps) {
|
||||||
|
int layer = [[app objectForKey:@"kCGWindowLayer"]
|
||||||
|
intValue];
|
||||||
|
if (layer != 0) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
for (NSScreen *screen in screens) {
|
||||||
|
if (isWindowMaximizedOnScreen(app,
|
||||||
|
screen)) {
|
||||||
|
int pid = [[app objectForKey:
|
||||||
|
@"kCGWindowOwnerPID"]
|
||||||
|
intValue];
|
||||||
|
maximizedPIDs.insert(pid);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Pre-compute the largest-area window bounds per PID.
|
||||||
|
// CGWindowList often lists small auxiliary windows (toolbars,
|
||||||
|
// chrome) before the main content window; using the largest area
|
||||||
|
// avoids reporting those wrong bounds for geometry.
|
||||||
|
std::map<int, NSRect> largestBoundsPerPID;
|
||||||
|
if (options.geometry || options.maximized) {
|
||||||
|
for (NSDictionary *app in apps) {
|
||||||
|
int layer = [[app objectForKey:@"kCGWindowLayer"]
|
||||||
|
intValue];
|
||||||
|
if (layer != 0) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
NSRect b = NSZeroRect;
|
||||||
|
CGRectMakeWithDictionaryRepresentation(
|
||||||
|
(CFDictionaryRef)[app
|
||||||
|
objectForKey:@"kCGWindowBounds"],
|
||||||
|
&b);
|
||||||
|
int pid = [[app objectForKey:@"kCGWindowOwnerPID"]
|
||||||
|
intValue];
|
||||||
|
auto it = largestBoundsPerPID.find(pid);
|
||||||
|
if (it == largestBoundsPerPID.end() ||
|
||||||
|
b.size.width * b.size.height >
|
||||||
|
it->second.size.width *
|
||||||
|
it->second.size.height) {
|
||||||
|
largestBoundsPerPID[pid] = b;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Track titles already added to avoid duplicates (name + owner)
|
||||||
|
std::vector<std::string> seen;
|
||||||
|
|
||||||
|
for (NSDictionary *app in apps) {
|
||||||
|
int layer =
|
||||||
|
[[app objectForKey:@"kCGWindowLayer"] intValue];
|
||||||
|
if (layer != 0) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string name = nsStringToStdString(
|
||||||
|
[app objectForKey:@"kCGWindowName"]);
|
||||||
|
std::string owner = nsStringToStdString(
|
||||||
|
[app objectForKey:@"kCGWindowOwnerName"]);
|
||||||
|
|
||||||
|
// Collect geometry once (used for multiple fields)
|
||||||
|
NSRect bounds = NSZeroRect;
|
||||||
|
if (options.geometry || options.fullscreen ||
|
||||||
|
options.maximized) {
|
||||||
|
CGRectMakeWithDictionaryRepresentation(
|
||||||
|
(CFDictionaryRef)[app
|
||||||
|
objectForKey:@"kCGWindowBounds"],
|
||||||
|
&bounds);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Process both the window name and the owner name as
|
||||||
|
// separate entries, matching the old GetWindowList() behaviour
|
||||||
|
for (int pass = 0; pass < 2; ++pass) {
|
||||||
|
const std::string &title = (pass == 0) ? name
|
||||||
|
: owner;
|
||||||
|
if (title.empty()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (std::find(seen.begin(), seen.end(),
|
||||||
|
title) != seen.end()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
seen.emplace_back(title);
|
||||||
|
|
||||||
|
WindowInfo info;
|
||||||
|
info.title = title;
|
||||||
|
|
||||||
|
if (options.focus) {
|
||||||
|
info.focused =
|
||||||
|
(title == foregroundTitle);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (options.geometry || options.fullscreen ||
|
||||||
|
options.maximized) {
|
||||||
|
int pid = [[app objectForKey:
|
||||||
|
@"kCGWindowOwnerPID"]
|
||||||
|
intValue];
|
||||||
|
auto it = largestBoundsPerPID.find(pid);
|
||||||
|
const NSRect &geoBounds =
|
||||||
|
(it != largestBoundsPerPID.end())
|
||||||
|
? it->second
|
||||||
|
: bounds;
|
||||||
|
info.x = (int)geoBounds.origin.x;
|
||||||
|
info.y = (int)geoBounds.origin.y;
|
||||||
|
info.width = (int)geoBounds.size.width;
|
||||||
|
info.height = (int)geoBounds.size.height;
|
||||||
|
|
||||||
|
if (options.fullscreen) {
|
||||||
|
info.fullscreen =
|
||||||
|
fullscreenPIDs.count(pid) >
|
||||||
|
0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (options.maximized) {
|
||||||
|
info.maximized =
|
||||||
|
maximizedPIDs.count(pid) >
|
||||||
|
0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// windowClass and text not implemented on macOS
|
||||||
|
result.emplace_back(std::move(info));
|
||||||
|
}
|
||||||
|
}
|
||||||
apps = nil;
|
apps = nil;
|
||||||
CFRelease(cfApps);
|
CFRelease(cfApps);
|
||||||
}
|
}
|
||||||
return false;
|
return result;
|
||||||
}
|
|
||||||
|
|
||||||
std::optional<std::string> GetTextInWindow(const std::string &)
|
|
||||||
{
|
|
||||||
// Not implemented
|
|
||||||
return {};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int SecondsSinceLastInput()
|
int SecondsSinceLastInput()
|
||||||
@@ -273,9 +310,9 @@ int SecondsSinceLastInput()
|
|||||||
return (int)time;
|
return (int)time;
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetProcessList(QStringList &list)
|
QStringList GetProcessList()
|
||||||
{
|
{
|
||||||
list.clear();
|
QStringList list;
|
||||||
@autoreleasepool {
|
@autoreleasepool {
|
||||||
NSWorkspace *ws = [NSWorkspace sharedWorkspace];
|
NSWorkspace *ws = [NSWorkspace sharedWorkspace];
|
||||||
NSArray *array = [ws runningApplications];
|
NSArray *array = [ws runningApplications];
|
||||||
@@ -291,11 +328,11 @@ void GetProcessList(QStringList &list)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetForegroundProcessName(std::string &proc)
|
std::string GetForegroundProcessName()
|
||||||
{
|
{
|
||||||
proc.resize(0);
|
|
||||||
@autoreleasepool {
|
@autoreleasepool {
|
||||||
NSWorkspace *ws = [NSWorkspace sharedWorkspace];
|
NSWorkspace *ws = [NSWorkspace sharedWorkspace];
|
||||||
NSArray *array = [ws runningApplications];
|
NSArray *array = [ws runningApplications];
|
||||||
@@ -308,23 +345,72 @@ void GetForegroundProcessName(std::string &proc)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
const char *str = name.UTF8String;
|
const char *str = name.UTF8String;
|
||||||
proc = std::string(str);
|
if (str) {
|
||||||
|
return str;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetForegroundProcessName(QString &proc)
|
std::string GetForegroundProcessPath()
|
||||||
{
|
{
|
||||||
std::string temp;
|
@autoreleasepool {
|
||||||
GetForegroundProcessName(temp);
|
NSWorkspace *ws = [NSWorkspace sharedWorkspace];
|
||||||
proc = QString::fromStdString(temp);
|
for (NSRunningApplication *app in [ws runningApplications]) {
|
||||||
|
if (!app.isActive) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
NSURL *url = app.executableURL;
|
||||||
|
if (!url) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
const char *str = url.path.UTF8String;
|
||||||
|
if (str) {
|
||||||
|
return str;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
|
||||||
|
QStringList GetProcessPathsFromName(const QString &name)
|
||||||
|
{
|
||||||
|
QStringList paths;
|
||||||
|
@autoreleasepool {
|
||||||
|
NSWorkspace *ws = [NSWorkspace sharedWorkspace];
|
||||||
|
for (NSRunningApplication *app in [ws runningApplications]) {
|
||||||
|
NSString *appName = app.localizedName;
|
||||||
|
if (!appName) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
const char *nameStr = appName.UTF8String;
|
||||||
|
if (!nameStr || name != QString::fromUtf8(nameStr)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
NSURL *url = app.executableURL;
|
||||||
|
if (!url) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
const char *pathStr = url.path.UTF8String;
|
||||||
|
if (!pathStr) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
QString path = QString::fromUtf8(pathStr);
|
||||||
|
if (!paths.contains(path)) {
|
||||||
|
paths.append(path);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return paths;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool IsInFocus(const QString &executable)
|
bool IsInFocus(const QString &executable)
|
||||||
{
|
{
|
||||||
std::string current;
|
const auto current = GetForegroundProcessName();
|
||||||
GetForegroundProcessName(current);
|
|
||||||
|
|
||||||
// True if executable switch equals current window
|
// True if executable switch equals current window
|
||||||
bool equals = (executable.toStdString() == current);
|
bool equals = (executable.toStdString() == current);
|
||||||
|
|||||||
@@ -11,15 +11,36 @@ namespace advss {
|
|||||||
|
|
||||||
enum class HotkeyType;
|
enum class HotkeyType;
|
||||||
|
|
||||||
EXPORT void GetWindowList(std::vector<std::string> &windows);
|
struct WindowQueryOptions {
|
||||||
EXPORT void GetWindowList(QStringList &windows);
|
bool geometry = false;
|
||||||
EXPORT void GetCurrentWindowTitle(std::string &title);
|
bool focus = false;
|
||||||
EXPORT bool IsFullscreen(const std::string &title);
|
bool fullscreen = false;
|
||||||
EXPORT bool IsMaximized(const std::string &title);
|
bool maximized = false;
|
||||||
EXPORT std::optional<std::string> GetTextInWindow(const std::string &window);
|
bool windowClass = false; // Windows only, no-op on other platforms
|
||||||
|
bool text = false; // Windows only, expensive, no-op on other platforms
|
||||||
|
};
|
||||||
|
|
||||||
|
struct WindowInfo {
|
||||||
|
std::string title;
|
||||||
|
bool focused = false;
|
||||||
|
bool fullscreen = false;
|
||||||
|
bool maximized = false;
|
||||||
|
int x = 0;
|
||||||
|
int y = 0;
|
||||||
|
int width = 0;
|
||||||
|
int height = 0;
|
||||||
|
std::string windowClass;
|
||||||
|
std::optional<std::string> text;
|
||||||
|
};
|
||||||
|
|
||||||
|
EXPORT std::vector<WindowInfo>
|
||||||
|
GetWindows(const WindowQueryOptions &options = {});
|
||||||
|
EXPORT std::string GetCurrentWindowTitle();
|
||||||
EXPORT int SecondsSinceLastInput();
|
EXPORT int SecondsSinceLastInput();
|
||||||
EXPORT void GetProcessList(QStringList &processes);
|
EXPORT QStringList GetProcessList();
|
||||||
EXPORT void GetForegroundProcessName(std::string &name);
|
EXPORT std::string GetForegroundProcessName();
|
||||||
|
EXPORT std::string GetForegroundProcessPath();
|
||||||
|
EXPORT QStringList GetProcessPathsFromName(const QString &name);
|
||||||
EXPORT bool IsInFocus(const QString &executable);
|
EXPORT bool IsInFocus(const QString &executable);
|
||||||
void PlatformInit();
|
void PlatformInit();
|
||||||
void PlatformCleanup();
|
void PlatformCleanup();
|
||||||
|
|||||||
@@ -16,14 +16,17 @@ static void setupTab(QTabWidget *);
|
|||||||
|
|
||||||
static ActionQueueTable *tabWidget = nullptr;
|
static ActionQueueTable *tabWidget = nullptr;
|
||||||
|
|
||||||
void RegisterActionQueueTab()
|
static bool setup()
|
||||||
{
|
{
|
||||||
AddPluginInitStep([]() {
|
AddPluginInitStep([] {
|
||||||
AddSetupTabCallback("actionQueueTab", ActionQueueTable::Create,
|
AddSetupTabCallback("actionQueueTab", ActionQueueTable::Create,
|
||||||
setupTab);
|
setupTab);
|
||||||
});
|
});
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static bool setupDone = setup();
|
||||||
|
|
||||||
static void setTabVisible(QTabWidget *tabWidget, bool visible)
|
static void setTabVisible(QTabWidget *tabWidget, bool visible)
|
||||||
{
|
{
|
||||||
SetTabVisibleByName(
|
SetTabVisibleByName(
|
||||||
|
|||||||
@@ -12,20 +12,16 @@ std::deque<std::shared_ptr<Item>> &GetActionQueues()
|
|||||||
return queues;
|
return queues;
|
||||||
}
|
}
|
||||||
|
|
||||||
void RegisterActionQueueTab();
|
static bool setup()
|
||||||
|
|
||||||
void SetupActionQueues()
|
|
||||||
{
|
{
|
||||||
static bool done = false;
|
|
||||||
if (done) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
AddSaveStep(SaveActionQueues);
|
AddSaveStep(SaveActionQueues);
|
||||||
AddLoadStep(LoadActionQueues);
|
AddLoadStep(LoadActionQueues);
|
||||||
RegisterActionQueueTab();
|
AddPluginCleanupStep([]() { queues.clear(); });
|
||||||
done = true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static bool setupDone = setup();
|
||||||
|
|
||||||
ActionQueue::ActionQueue() : Item()
|
ActionQueue::ActionQueue() : Item()
|
||||||
{
|
{
|
||||||
_lastEmpty = std::chrono::high_resolution_clock::now();
|
_lastEmpty = std::chrono::high_resolution_clock::now();
|
||||||
|
|||||||
@@ -101,7 +101,6 @@ signals:
|
|||||||
};
|
};
|
||||||
|
|
||||||
std::deque<std::shared_ptr<Item>> &GetActionQueues();
|
std::deque<std::shared_ptr<Item>> &GetActionQueues();
|
||||||
void SetupActionQueues();
|
|
||||||
void SaveActionQueues(obs_data_t *);
|
void SaveActionQueues(obs_data_t *);
|
||||||
void LoadActionQueues(obs_data_t *);
|
void LoadActionQueues(obs_data_t *);
|
||||||
void ImportQueues(obs_data_t *);
|
void ImportQueues(obs_data_t *);
|
||||||
|
|||||||
@@ -152,7 +152,7 @@ bool SwitcherData::VersionChanged(obs_data_t *obj, std::string currentVersion)
|
|||||||
if (!obs_data_has_user_value(obj, "version")) {
|
if (!obs_data_has_user_value(obj, "version")) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
switcher->firstBoot = false;
|
|
||||||
std::string previousVersion = obs_data_get_string(obj, "version");
|
std::string previousVersion = obs_data_get_string(obj, "version");
|
||||||
return previousVersion != currentVersion;
|
return previousVersion != currentVersion;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -94,7 +94,6 @@ public:
|
|||||||
bool stop = false;
|
bool stop = false;
|
||||||
std::condition_variable cv;
|
std::condition_variable cv;
|
||||||
|
|
||||||
bool firstBoot = true;
|
|
||||||
bool transitionActive = false;
|
bool transitionActive = false;
|
||||||
bool sceneCollectionStop = false;
|
bool sceneCollectionStop = false;
|
||||||
bool obsIsShuttingDown = false;
|
bool obsIsShuttingDown = false;
|
||||||
@@ -164,6 +163,8 @@ public:
|
|||||||
bool disableHints = false;
|
bool disableHints = false;
|
||||||
bool disableFilterComboboxFilter = false;
|
bool disableFilterComboboxFilter = false;
|
||||||
bool hideLegacyTabs = true;
|
bool hideLegacyTabs = true;
|
||||||
|
bool settingsLockEnabled = false;
|
||||||
|
std::string settingsLockPassword;
|
||||||
bool saveWindowGeo = false;
|
bool saveWindowGeo = false;
|
||||||
QPoint windowPos = {};
|
QPoint windowPos = {};
|
||||||
QSize windowSize = {};
|
QSize windowSize = {};
|
||||||
|
|||||||
@@ -54,31 +54,18 @@ void AskForBackup(obs_data_t *settings)
|
|||||||
// or crashing.
|
// or crashing.
|
||||||
// Therefore, we ask the user whether they want to back up the settings
|
// Therefore, we ask the user whether they want to back up the settings
|
||||||
// asynchronously.
|
// asynchronously.
|
||||||
//
|
|
||||||
// On macOS, an additional QTimer::singleShot wrapper is required for
|
|
||||||
// this to work correctly.
|
|
||||||
|
|
||||||
auto json = obs_data_get_json(settings);
|
auto json = obs_data_get_json(settings);
|
||||||
static QString jsonQString = json ? json : "";
|
static QString jsonQString = json ? json : "";
|
||||||
|
|
||||||
static const auto askForBackupWrapper = [](void *) {
|
static const auto askForBackupWrapper = [](void *) {
|
||||||
#ifdef __APPLE__
|
showBackupDialogs(jsonQString);
|
||||||
QTimer::singleShot(0,
|
|
||||||
static_cast<QMainWindow *>(
|
|
||||||
obs_frontend_get_main_window()),
|
|
||||||
[]() {
|
|
||||||
#endif
|
|
||||||
showBackupDialogs(jsonQString);
|
|
||||||
#ifdef __APPLE__
|
|
||||||
});
|
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
std::thread t([]() {
|
AddFinishedLoadingStep([]() {
|
||||||
obs_queue_task(OBS_TASK_UI, askForBackupWrapper, nullptr,
|
obs_queue_task(OBS_TASK_UI, askForBackupWrapper, nullptr,
|
||||||
false);
|
false);
|
||||||
});
|
});
|
||||||
t.detach();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void BackupSettingsOfCurrentVersion()
|
void BackupSettingsOfCurrentVersion()
|
||||||
|
|||||||
@@ -8,7 +8,6 @@
|
|||||||
namespace advss {
|
namespace advss {
|
||||||
|
|
||||||
const std::map<Logic::Type, const char *> Logic::localeMap = {
|
const std::map<Logic::Type, const char *> Logic::localeMap = {
|
||||||
{Logic::Type::NONE, {"AdvSceneSwitcher.logic.none"}},
|
|
||||||
{Logic::Type::AND, {"AdvSceneSwitcher.logic.and"}},
|
{Logic::Type::AND, {"AdvSceneSwitcher.logic.and"}},
|
||||||
{Logic::Type::OR, {"AdvSceneSwitcher.logic.or"}},
|
{Logic::Type::OR, {"AdvSceneSwitcher.logic.or"}},
|
||||||
{Logic::Type::AND_NOT, {"AdvSceneSwitcher.logic.andNot"}},
|
{Logic::Type::AND_NOT, {"AdvSceneSwitcher.logic.andNot"}},
|
||||||
@@ -67,7 +66,7 @@ void Logic::PopulateLogicTypeSelection(QComboBox *list, bool isRootCondition)
|
|||||||
return typeValue < rootOffset;
|
return typeValue < rootOffset;
|
||||||
}}
|
}}
|
||||||
: std::function<bool(int)>{[](int typeValue) {
|
: std::function<bool(int)>{[](int typeValue) {
|
||||||
return typeValue >= rootOffset;
|
return typeValue > rootOffset;
|
||||||
}};
|
}};
|
||||||
for (const auto &[type, name] : localeMap) {
|
for (const auto &[type, name] : localeMap) {
|
||||||
const int typeValue = static_cast<int>(type);
|
const int typeValue = static_cast<int>(type);
|
||||||
|
|||||||
@@ -2,17 +2,18 @@
|
|||||||
#include "log-helper.hpp"
|
#include "log-helper.hpp"
|
||||||
#include "obs-module-helper.hpp"
|
#include "obs-module-helper.hpp"
|
||||||
#include "plugin-state-helpers.hpp"
|
#include "plugin-state-helpers.hpp"
|
||||||
#include "ui-helpers.hpp"
|
|
||||||
|
|
||||||
#include <obs-frontend-api.h>
|
#include <obs-frontend-api.h>
|
||||||
#include <obs-module.h>
|
#include <obs-module.h>
|
||||||
|
|
||||||
|
#include <QCheckBox>
|
||||||
|
#include <QDialog>
|
||||||
|
#include <QDialogButtonBox>
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
#include <QFile>
|
#include <QFile>
|
||||||
|
#include <QLabel>
|
||||||
#include <QMainWindow>
|
#include <QMainWindow>
|
||||||
#include <QTimer>
|
#include <QVBoxLayout>
|
||||||
|
|
||||||
#include <thread>
|
|
||||||
|
|
||||||
namespace advss {
|
namespace advss {
|
||||||
|
|
||||||
@@ -25,10 +26,31 @@ static constexpr bool handleUncleanShutdown = true;
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
static bool wasCleanShutdown = false;
|
static bool wasCleanShutdown = false;
|
||||||
|
static bool suppressCrashDialog = false;
|
||||||
|
|
||||||
|
static char *sentinelFile = nullptr;
|
||||||
|
|
||||||
|
bool GetSuppressCrashDialog()
|
||||||
|
{
|
||||||
|
return suppressCrashDialog;
|
||||||
|
}
|
||||||
|
|
||||||
|
void SetSuppressCrashDialog(bool suppress)
|
||||||
|
{
|
||||||
|
suppressCrashDialog = suppress;
|
||||||
|
}
|
||||||
|
|
||||||
static void setup();
|
static void setup();
|
||||||
static bool setupDone = []() {
|
static bool setupDone = []() {
|
||||||
AddPluginInitStep(setup);
|
AddPluginInitStep(setup);
|
||||||
|
AddSaveStep([](obs_data_t *obj) {
|
||||||
|
obs_data_set_bool(obj, "suppressCrashDialog",
|
||||||
|
suppressCrashDialog);
|
||||||
|
});
|
||||||
|
AddLoadStep([](obs_data_t *obj) {
|
||||||
|
suppressCrashDialog =
|
||||||
|
obs_data_get_bool(obj, "suppressCrashDialog");
|
||||||
|
});
|
||||||
return true;
|
return true;
|
||||||
}();
|
}();
|
||||||
|
|
||||||
@@ -38,7 +60,6 @@ static void handleShutdown(enum obs_frontend_event event, void *)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
char *sentinelFile = obs_module_config_path(sentinel.data());
|
|
||||||
if (!sentinelFile) {
|
if (!sentinelFile) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -58,7 +79,8 @@ static void handleShutdown(enum obs_frontend_event event, void *)
|
|||||||
|
|
||||||
static void setup()
|
static void setup()
|
||||||
{
|
{
|
||||||
char *sentinelFile = obs_module_config_path(sentinel.data());
|
// Freed in handleShutdown()
|
||||||
|
sentinelFile = obs_module_config_path(sentinel.data());
|
||||||
if (!sentinelFile) {
|
if (!sentinelFile) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -86,7 +108,6 @@ static void setup()
|
|||||||
|
|
||||||
file.write("running");
|
file.write("running");
|
||||||
file.close();
|
file.close();
|
||||||
bfree(sentinelFile);
|
|
||||||
|
|
||||||
obs_frontend_add_event_callback(handleShutdown, nullptr);
|
obs_frontend_add_event_callback(handleShutdown, nullptr);
|
||||||
return;
|
return;
|
||||||
@@ -108,8 +129,39 @@ static bool wasUncleanShutdown()
|
|||||||
|
|
||||||
static void askForStartupSkip()
|
static void askForStartupSkip()
|
||||||
{
|
{
|
||||||
bool skipStart = DisplayMessage(
|
auto mainWindow =
|
||||||
obs_module_text("AdvSceneSwitcher.crashDetected"), true, false);
|
static_cast<QMainWindow *>(obs_frontend_get_main_window());
|
||||||
|
auto dialog = new QDialog(mainWindow);
|
||||||
|
dialog->setWindowTitle(obs_module_text("AdvSceneSwitcher.windowTitle"));
|
||||||
|
dialog->setWindowFlags(dialog->windowFlags() &
|
||||||
|
~Qt::WindowContextHelpButtonHint);
|
||||||
|
|
||||||
|
auto layout = new QVBoxLayout(dialog);
|
||||||
|
auto label = new QLabel(
|
||||||
|
obs_module_text("AdvSceneSwitcher.crashDetected"), dialog);
|
||||||
|
label->setWordWrap(true);
|
||||||
|
layout->addWidget(label);
|
||||||
|
|
||||||
|
auto checkbox = new QCheckBox(
|
||||||
|
obs_module_text(
|
||||||
|
"AdvSceneSwitcher.crashDetected.suppressCheckbox"),
|
||||||
|
dialog);
|
||||||
|
layout->addWidget(checkbox);
|
||||||
|
|
||||||
|
auto buttonbox = new QDialogButtonBox(
|
||||||
|
QDialogButtonBox::Yes | QDialogButtonBox::No, dialog);
|
||||||
|
QObject::connect(buttonbox, &QDialogButtonBox::accepted, dialog,
|
||||||
|
&QDialog::accept);
|
||||||
|
QObject::connect(buttonbox, &QDialogButtonBox::rejected, dialog,
|
||||||
|
&QDialog::reject);
|
||||||
|
layout->addWidget(buttonbox);
|
||||||
|
|
||||||
|
dialog->setLayout(layout);
|
||||||
|
|
||||||
|
bool skipStart = dialog->exec() == QDialog::Accepted;
|
||||||
|
suppressCrashDialog = checkbox->isChecked();
|
||||||
|
dialog->deleteLater();
|
||||||
|
|
||||||
if (!skipStart) {
|
if (!skipStart) {
|
||||||
StartPlugin();
|
StartPlugin();
|
||||||
}
|
}
|
||||||
@@ -121,31 +173,22 @@ bool ShouldSkipPluginStartOnUncleanShutdown()
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (suppressCrashDialog) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
// This function is called while the plugin settings are being loaded.
|
// This function is called while the plugin settings are being loaded.
|
||||||
// Blocking at this stage can cause issues such as OBS failing to start
|
// Blocking at this stage can cause issues such as OBS failing to start
|
||||||
// or crashing.
|
// or crashing.
|
||||||
// Therefore, we ask the user whether they want to start the plugin
|
// Therefore, we ask the user whether they want to start the plugin
|
||||||
// asynchronously.
|
// asynchronously.
|
||||||
//
|
|
||||||
// On macOS, an additional QTimer::singleShot wrapper is required for
|
|
||||||
// this to work correctly.
|
|
||||||
static const auto showDialogWrapper = [](void *) {
|
static const auto showDialogWrapper = [](void *) {
|
||||||
#ifdef __APPLE__
|
askForStartupSkip();
|
||||||
QTimer::singleShot(0,
|
|
||||||
static_cast<QMainWindow *>(
|
|
||||||
obs_frontend_get_main_window()),
|
|
||||||
[]() {
|
|
||||||
#endif
|
|
||||||
askForStartupSkip();
|
|
||||||
#ifdef __APPLE__
|
|
||||||
});
|
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
std::thread t([]() {
|
AddFinishedLoadingStep([]() {
|
||||||
obs_queue_task(OBS_TASK_UI, showDialogWrapper, nullptr, false);
|
obs_queue_task(OBS_TASK_UI, showDialogWrapper, nullptr, false);
|
||||||
});
|
});
|
||||||
t.detach();
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,4 +4,7 @@ namespace advss {
|
|||||||
|
|
||||||
bool ShouldSkipPluginStartOnUncleanShutdown();
|
bool ShouldSkipPluginStartOnUncleanShutdown();
|
||||||
|
|
||||||
|
bool GetSuppressCrashDialog();
|
||||||
|
void SetSuppressCrashDialog(bool suppress);
|
||||||
|
|
||||||
} // namespace advss
|
} // namespace advss
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ static void populateUnits(QComboBox *list)
|
|||||||
list->addItem(obs_module_text("AdvSceneSwitcher.unit.seconds"));
|
list->addItem(obs_module_text("AdvSceneSwitcher.unit.seconds"));
|
||||||
list->addItem(obs_module_text("AdvSceneSwitcher.unit.minutes"));
|
list->addItem(obs_module_text("AdvSceneSwitcher.unit.minutes"));
|
||||||
list->addItem(obs_module_text("AdvSceneSwitcher.unit.hours"));
|
list->addItem(obs_module_text("AdvSceneSwitcher.unit.hours"));
|
||||||
|
list->addItem(obs_module_text("AdvSceneSwitcher.unit.days"));
|
||||||
}
|
}
|
||||||
|
|
||||||
DurationSelection::DurationSelection(QWidget *parent, bool showUnitSelection,
|
DurationSelection::DurationSelection(QWidget *parent, bool showUnitSelection,
|
||||||
@@ -66,6 +67,8 @@ static int durationUnitToMultiplier(Duration::Unit u)
|
|||||||
return 60;
|
return 60;
|
||||||
case Duration::Unit::HOURS:
|
case Duration::Unit::HOURS:
|
||||||
return 3600;
|
return 3600;
|
||||||
|
case Duration::Unit::DAYS:
|
||||||
|
return 86400;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -121,6 +121,8 @@ static std::string durationUnitToString(Duration::Unit u)
|
|||||||
return obs_module_text("AdvSceneSwitcher.unit.minutes");
|
return obs_module_text("AdvSceneSwitcher.unit.minutes");
|
||||||
case Duration::Unit::HOURS:
|
case Duration::Unit::HOURS:
|
||||||
return obs_module_text("AdvSceneSwitcher.unit.hours");
|
return obs_module_text("AdvSceneSwitcher.unit.hours");
|
||||||
|
case Duration::Unit::DAYS:
|
||||||
|
return obs_module_text("AdvSceneSwitcher.unit.days");
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -151,6 +153,8 @@ static int durationUnitToMultiplier(Duration::Unit u)
|
|||||||
return 60;
|
return 60;
|
||||||
case Duration::Unit::HOURS:
|
case Duration::Unit::HOURS:
|
||||||
return 3600;
|
return 3600;
|
||||||
|
case Duration::Unit::DAYS:
|
||||||
|
return 86400;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ public:
|
|||||||
SECONDS,
|
SECONDS,
|
||||||
MINUTES,
|
MINUTES,
|
||||||
HOURS,
|
HOURS,
|
||||||
|
DAYS,
|
||||||
};
|
};
|
||||||
EXPORT Unit GetUnit() const { return _unit; }
|
EXPORT Unit GetUnit() const { return _unit; }
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +1,5 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#ifdef UNIT_TEST
|
|
||||||
|
|
||||||
#define EXPORT
|
|
||||||
#define ADVSS_EXPORT
|
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
#define EXPORT __declspec(dllexport)
|
#define EXPORT __declspec(dllexport)
|
||||||
#else
|
#else
|
||||||
@@ -19,5 +12,3 @@
|
|||||||
#else
|
#else
|
||||||
#define ADVSS_EXPORT Q_DECL_IMPORT
|
#define ADVSS_EXPORT Q_DECL_IMPORT
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif // UNIT_TEST
|
|
||||||
|
|||||||
@@ -7,9 +7,11 @@
|
|||||||
|
|
||||||
namespace advss {
|
namespace advss {
|
||||||
|
|
||||||
FileSelection::FileSelection(FileSelection::Type type, QWidget *parent)
|
FileSelection::FileSelection(FileSelection::Type type, QWidget *parent,
|
||||||
|
const QString &browseTitle)
|
||||||
: QWidget(parent),
|
: QWidget(parent),
|
||||||
_type(type),
|
_type(type),
|
||||||
|
_browseTitle(browseTitle),
|
||||||
_filePath(new VariableLineEdit(this)),
|
_filePath(new VariableLineEdit(this)),
|
||||||
_browseButton(
|
_browseButton(
|
||||||
new QPushButton(obs_module_text("AdvSceneSwitcher.browse")))
|
new QPushButton(obs_module_text("AdvSceneSwitcher.browse")))
|
||||||
@@ -55,11 +57,14 @@ void FileSelection::BrowseButtonClicked()
|
|||||||
QString defaultPath = ValidPathOrDesktop(_filePath->text());
|
QString defaultPath = ValidPathOrDesktop(_filePath->text());
|
||||||
QString path;
|
QString path;
|
||||||
if (_type == FileSelection::Type::WRITE) {
|
if (_type == FileSelection::Type::WRITE) {
|
||||||
path = QFileDialog::getSaveFileName(this, "", defaultPath);
|
path = QFileDialog::getSaveFileName(this, _browseTitle,
|
||||||
|
defaultPath);
|
||||||
} else if (_type == FileSelection::Type::READ) {
|
} else if (_type == FileSelection::Type::READ) {
|
||||||
path = QFileDialog::getOpenFileName(this, "", defaultPath);
|
path = QFileDialog::getOpenFileName(this, _browseTitle,
|
||||||
|
defaultPath);
|
||||||
} else {
|
} else {
|
||||||
path = QFileDialog::getExistingDirectory(this, "", defaultPath);
|
path = QFileDialog::getExistingDirectory(this, _browseTitle,
|
||||||
|
defaultPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (path.isEmpty()) {
|
if (path.isEmpty()) {
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ public:
|
|||||||
|
|
||||||
EXPORT
|
EXPORT
|
||||||
FileSelection(FileSelection::Type type = FileSelection::Type::READ,
|
FileSelection(FileSelection::Type type = FileSelection::Type::READ,
|
||||||
QWidget *parent = 0);
|
QWidget *parent = 0, const QString &browseTitle = "");
|
||||||
EXPORT void SetPath(const StringVariable &);
|
EXPORT void SetPath(const StringVariable &);
|
||||||
EXPORT void SetPath(const QString &);
|
EXPORT void SetPath(const QString &);
|
||||||
EXPORT QString GetPath() const;
|
EXPORT QString GetPath() const;
|
||||||
@@ -34,6 +34,7 @@ signals:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
Type _type;
|
Type _type;
|
||||||
|
QString _browseTitle;
|
||||||
VariableLineEdit *_filePath;
|
VariableLineEdit *_filePath;
|
||||||
QPushButton *_browseButton;
|
QPushButton *_browseButton;
|
||||||
};
|
};
|
||||||
|
|||||||
467
lib/utils/first-run-wizard.cpp
Normal file
467
lib/utils/first-run-wizard.cpp
Normal file
@@ -0,0 +1,467 @@
|
|||||||
|
#include "first-run-wizard.hpp"
|
||||||
|
|
||||||
|
#include "log-helper.hpp"
|
||||||
|
#include "macro.hpp"
|
||||||
|
#include "macro-action-factory.hpp"
|
||||||
|
#include "macro-condition-factory.hpp"
|
||||||
|
#include "macro-settings.hpp"
|
||||||
|
#include "platform-funcs.hpp"
|
||||||
|
#include "selection-helpers.hpp"
|
||||||
|
|
||||||
|
#include <obs-frontend-api.h>
|
||||||
|
#include <obs-data.h>
|
||||||
|
#include <util/config-file.h>
|
||||||
|
|
||||||
|
#include <QFrame>
|
||||||
|
#include <QHBoxLayout>
|
||||||
|
#include <QMessageBox>
|
||||||
|
#include <QRegularExpression>
|
||||||
|
#include <QVBoxLayout>
|
||||||
|
|
||||||
|
namespace advss {
|
||||||
|
|
||||||
|
static constexpr char kConditionIdWindow[] = "window";
|
||||||
|
static constexpr char kActionIdSceneSwitch[] = "scene_switch";
|
||||||
|
|
||||||
|
// ---------------------------------------------------------------------------
|
||||||
|
// OBS global config helpers
|
||||||
|
// ---------------------------------------------------------------------------
|
||||||
|
static constexpr char kConfigSection[] = "AdvancedSceneSwitcher";
|
||||||
|
static constexpr char kFirstRunKey[] = "firstRun";
|
||||||
|
|
||||||
|
bool IsFirstRun()
|
||||||
|
{
|
||||||
|
#if LIBOBS_API_VER >= MAKE_SEMANTIC_VERSION(31, 0, 0)
|
||||||
|
config_t *cfg = obs_frontend_get_user_config();
|
||||||
|
#else
|
||||||
|
config_t *cfg = obs_frontend_get_global_config();
|
||||||
|
#endif
|
||||||
|
if (!config_has_user_value(cfg, kConfigSection, kFirstRunKey)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return config_get_bool(cfg, kConfigSection, kFirstRunKey);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void WriteFirstRun(bool value)
|
||||||
|
{
|
||||||
|
#if LIBOBS_API_VER >= MAKE_SEMANTIC_VERSION(31, 0, 0)
|
||||||
|
config_t *cfg = obs_frontend_get_user_config();
|
||||||
|
#else
|
||||||
|
config_t *cfg = obs_frontend_get_global_config();
|
||||||
|
#endif
|
||||||
|
config_set_bool(cfg, kConfigSection, kFirstRunKey, value);
|
||||||
|
config_save_safe(cfg, "tmp", nullptr);
|
||||||
|
}
|
||||||
|
|
||||||
|
static QString DetectFocusedWindow()
|
||||||
|
{
|
||||||
|
return QString::fromStdString(GetCurrentWindowTitle());
|
||||||
|
}
|
||||||
|
|
||||||
|
// ===========================================================================
|
||||||
|
// WelcomePage
|
||||||
|
// ===========================================================================
|
||||||
|
|
||||||
|
WelcomePage::WelcomePage(QWidget *parent) : QWizardPage(parent)
|
||||||
|
{
|
||||||
|
setTitle(obs_module_text("FirstRunWizard.welcome.title"));
|
||||||
|
setSubTitle(obs_module_text("FirstRunWizard.welcome.subtitle"));
|
||||||
|
|
||||||
|
auto body = new QLabel(obs_module_text("FirstRunWizard.welcome.body"),
|
||||||
|
this);
|
||||||
|
body->setWordWrap(true);
|
||||||
|
body->setTextFormat(Qt::RichText);
|
||||||
|
|
||||||
|
auto layout = new QVBoxLayout(this);
|
||||||
|
layout->addWidget(body);
|
||||||
|
layout->addStretch();
|
||||||
|
}
|
||||||
|
|
||||||
|
// ===========================================================================
|
||||||
|
// SceneSelectionPage
|
||||||
|
// ===========================================================================
|
||||||
|
|
||||||
|
SceneSelectionPage::SceneSelectionPage(QWidget *parent) : QWizardPage(parent)
|
||||||
|
{
|
||||||
|
setTitle(obs_module_text("FirstRunWizard.scene.title"));
|
||||||
|
setSubTitle(obs_module_text("FirstRunWizard.scene.subtitle"));
|
||||||
|
|
||||||
|
auto label =
|
||||||
|
new QLabel(obs_module_text("FirstRunWizard.scene.label"), this);
|
||||||
|
_sceneCombo = new QComboBox(this);
|
||||||
|
_sceneCombo->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
|
||||||
|
|
||||||
|
// registerField with * suffix means the field is mandatory for Next
|
||||||
|
registerField("targetScene*", _sceneCombo, "currentText",
|
||||||
|
SIGNAL(currentTextChanged(QString)));
|
||||||
|
|
||||||
|
connect(_sceneCombo, &QComboBox::currentTextChanged, this,
|
||||||
|
&QWizardPage::completeChanged);
|
||||||
|
|
||||||
|
auto row = new QHBoxLayout;
|
||||||
|
row->addWidget(label);
|
||||||
|
row->addWidget(_sceneCombo, 1);
|
||||||
|
|
||||||
|
auto layout = new QVBoxLayout(this);
|
||||||
|
layout->addLayout(row);
|
||||||
|
layout->addStretch();
|
||||||
|
}
|
||||||
|
|
||||||
|
void SceneSelectionPage::initializePage()
|
||||||
|
{
|
||||||
|
_sceneCombo->clear();
|
||||||
|
for (const QString &name : GetSceneNames())
|
||||||
|
_sceneCombo->addItem(name);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool SceneSelectionPage::isComplete() const
|
||||||
|
{
|
||||||
|
return _sceneCombo->count() > 0 &&
|
||||||
|
!_sceneCombo->currentText().isEmpty();
|
||||||
|
}
|
||||||
|
|
||||||
|
// ===========================================================================
|
||||||
|
// WindowConditionPage
|
||||||
|
// ===========================================================================
|
||||||
|
|
||||||
|
WindowConditionPage::WindowConditionPage(QWidget *parent)
|
||||||
|
: QWizardPage(parent),
|
||||||
|
_detectTimer(new QTimer(this))
|
||||||
|
{
|
||||||
|
setTitle(obs_module_text("FirstRunWizard.window.title"));
|
||||||
|
setSubTitle(obs_module_text("FirstRunWizard.window.subtitle"));
|
||||||
|
|
||||||
|
auto label = new QLabel(obs_module_text("FirstRunWizard.window.label"),
|
||||||
|
this);
|
||||||
|
_windowEdit = new QLineEdit(this);
|
||||||
|
_windowEdit->setPlaceholderText(
|
||||||
|
obs_module_text("FirstRunWizard.window.placeholder"));
|
||||||
|
|
||||||
|
_autoDetect = new QPushButton(
|
||||||
|
obs_module_text("FirstRunWizard.window.autoDetect"), this);
|
||||||
|
_autoDetect->setToolTip(
|
||||||
|
obs_module_text("FirstRunWizard.window.autoDetectTooltip"));
|
||||||
|
|
||||||
|
registerField("windowTitle*", _windowEdit);
|
||||||
|
|
||||||
|
connect(_windowEdit, &QLineEdit::textChanged, this,
|
||||||
|
&QWizardPage::completeChanged);
|
||||||
|
connect(_autoDetect, &QPushButton::clicked, this,
|
||||||
|
&WindowConditionPage::onAutoDetectClicked);
|
||||||
|
connect(_detectTimer, &QTimer::timeout, this,
|
||||||
|
&WindowConditionPage::onCountdownTick);
|
||||||
|
|
||||||
|
auto row = new QHBoxLayout;
|
||||||
|
row->addWidget(label);
|
||||||
|
row->addWidget(_windowEdit, 1);
|
||||||
|
|
||||||
|
auto hint =
|
||||||
|
new QLabel(obs_module_text("FirstRunWizard.window.hint"), this);
|
||||||
|
hint->setTextFormat(Qt::RichText);
|
||||||
|
hint->setWordWrap(true);
|
||||||
|
|
||||||
|
auto layout = new QVBoxLayout(this);
|
||||||
|
layout->addLayout(row);
|
||||||
|
layout->addWidget(_autoDetect, 0, Qt::AlignLeft);
|
||||||
|
layout->addWidget(hint);
|
||||||
|
layout->addStretch();
|
||||||
|
}
|
||||||
|
|
||||||
|
void WindowConditionPage::initializePage()
|
||||||
|
{
|
||||||
|
if (_windowEdit->text().isEmpty()) {
|
||||||
|
QString detected = DetectFocusedWindow();
|
||||||
|
if (!detected.isEmpty()) {
|
||||||
|
_windowEdit->setText(detected);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool WindowConditionPage::isComplete() const
|
||||||
|
{
|
||||||
|
return !_windowEdit->text().trimmed().isEmpty();
|
||||||
|
}
|
||||||
|
|
||||||
|
void WindowConditionPage::onAutoDetectClicked()
|
||||||
|
{
|
||||||
|
_countdown = 3;
|
||||||
|
_autoDetect->setEnabled(false);
|
||||||
|
_autoDetect->setText(
|
||||||
|
QString(obs_module_text(
|
||||||
|
"FirstRunWizard.window.autoDetectCountdown"))
|
||||||
|
.arg(_countdown));
|
||||||
|
_detectTimer->start(1000);
|
||||||
|
}
|
||||||
|
|
||||||
|
void WindowConditionPage::onCountdownTick()
|
||||||
|
{
|
||||||
|
--_countdown;
|
||||||
|
if (_countdown > 0) {
|
||||||
|
_autoDetect->setText(
|
||||||
|
QString(obs_module_text(
|
||||||
|
"FirstRunWizard.window.autoDetectCountdown"))
|
||||||
|
.arg(_countdown));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
_detectTimer->stop();
|
||||||
|
QString title = DetectFocusedWindow();
|
||||||
|
if (!title.isEmpty()) {
|
||||||
|
_windowEdit->setText(title);
|
||||||
|
}
|
||||||
|
|
||||||
|
_autoDetect->setEnabled(true);
|
||||||
|
_autoDetect->setText(
|
||||||
|
obs_module_text("FirstRunWizard.window.autoDetect"));
|
||||||
|
}
|
||||||
|
|
||||||
|
// ===========================================================================
|
||||||
|
// ReviewPage
|
||||||
|
// ===========================================================================
|
||||||
|
|
||||||
|
ReviewPage::ReviewPage(QWidget *parent, std::shared_ptr<Macro> ¯o)
|
||||||
|
: QWizardPage(parent),
|
||||||
|
_macro(macro)
|
||||||
|
{
|
||||||
|
setTitle(obs_module_text("FirstRunWizard.review.title"));
|
||||||
|
setSubTitle(obs_module_text("FirstRunWizard.review.subtitle"));
|
||||||
|
|
||||||
|
_summary = new QLabel(this);
|
||||||
|
_summary->setWordWrap(true);
|
||||||
|
_summary->setTextFormat(Qt::RichText);
|
||||||
|
_summary->setFrameShape(QFrame::StyledPanel);
|
||||||
|
_summary->setContentsMargins(12, 12, 12, 12);
|
||||||
|
|
||||||
|
auto layout = new QVBoxLayout(this);
|
||||||
|
layout->addWidget(_summary);
|
||||||
|
layout->addStretch();
|
||||||
|
}
|
||||||
|
|
||||||
|
void ReviewPage::initializePage()
|
||||||
|
{
|
||||||
|
const QString scene = field("targetScene").toString();
|
||||||
|
const QString window = field("windowTitle").toString();
|
||||||
|
|
||||||
|
_summary->setText(
|
||||||
|
QString(obs_module_text("FirstRunWizard.review.summary"))
|
||||||
|
.arg(scene.toHtmlEscaped(), window.toHtmlEscaped()));
|
||||||
|
}
|
||||||
|
|
||||||
|
static QString escapeForRegex(const QString &input)
|
||||||
|
{
|
||||||
|
return QRegularExpression::escape(input);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ReviewPage::validatePage()
|
||||||
|
{
|
||||||
|
const QString scene = field("targetScene").toString();
|
||||||
|
const QString window = escapeForRegex(field("windowTitle").toString());
|
||||||
|
const std::string name = ("Window -> " + scene).toStdString();
|
||||||
|
|
||||||
|
// Build condition data blob
|
||||||
|
// ---------------------------------------------------------------
|
||||||
|
// Condition blob — mirrors MacroConditionWindow::Save() output:
|
||||||
|
//
|
||||||
|
// {
|
||||||
|
// "segmentSettings": { "enabled": true, "version": 1 },
|
||||||
|
// "id": "window",
|
||||||
|
// "checkTitle": true,
|
||||||
|
// "window": "<user input>",
|
||||||
|
// "windowRegexConfig": {
|
||||||
|
// "enable": true, // use regex-style partial matching
|
||||||
|
// "partial": true, // match anywhere in the title
|
||||||
|
// "options": 3 // case-insensitive (QRegularExpression flags)
|
||||||
|
// },
|
||||||
|
// "focus": true, // only trigger when window is focused
|
||||||
|
// "version": 1
|
||||||
|
// }
|
||||||
|
// ---------------------------------------------------------------
|
||||||
|
OBSDataAutoRelease condSegment = obs_data_create();
|
||||||
|
obs_data_set_bool(condSegment, "enabled", true);
|
||||||
|
obs_data_set_int(condSegment, "version", 1);
|
||||||
|
|
||||||
|
OBSDataAutoRelease condRegex = obs_data_create();
|
||||||
|
obs_data_set_bool(condRegex, "enable", true);
|
||||||
|
obs_data_set_bool(condRegex, "partial", true);
|
||||||
|
obs_data_set_int(condRegex, "options", 3); // CaseInsensitiveOption
|
||||||
|
|
||||||
|
OBSDataAutoRelease condData = obs_data_create();
|
||||||
|
obs_data_set_obj(condData, "segmentSettings", condSegment);
|
||||||
|
obs_data_set_string(condData, "id", "window");
|
||||||
|
obs_data_set_bool(condData, "checkTitle", true);
|
||||||
|
obs_data_set_string(condData, "window", window.toUtf8().constData());
|
||||||
|
obs_data_set_obj(condData, "windowRegexConfig", condRegex);
|
||||||
|
obs_data_set_bool(condData, "focus", true);
|
||||||
|
obs_data_set_int(condData, "version", 1);
|
||||||
|
|
||||||
|
// Build action data blob
|
||||||
|
// ---------------------------------------------------------------
|
||||||
|
// Action blob — mirrors MacroActionSwitchScene::Save() output:
|
||||||
|
//
|
||||||
|
// {
|
||||||
|
// "segmentSettings": { "enabled": true, "version": 1 },
|
||||||
|
// "id": "scene_switch",
|
||||||
|
// "action": 0, // 0 = switch scene
|
||||||
|
// "sceneSelection": {
|
||||||
|
// "type": 0, // 0 = scene by name
|
||||||
|
// "name": "<scene>",
|
||||||
|
// "canvasSelection": "Main"
|
||||||
|
// },
|
||||||
|
// "transitionType": 1, // 1 = use scene's default transition
|
||||||
|
// "blockUntilTransitionDone": false,
|
||||||
|
// "sceneType": 0
|
||||||
|
// }
|
||||||
|
// ---------------------------------------------------------------
|
||||||
|
OBSDataAutoRelease actionSegment = obs_data_create();
|
||||||
|
obs_data_set_bool(actionSegment, "enabled", true);
|
||||||
|
obs_data_set_int(actionSegment, "version", 1);
|
||||||
|
|
||||||
|
OBSDataAutoRelease sceneSelection = obs_data_create();
|
||||||
|
obs_data_set_int(sceneSelection, "type", 0);
|
||||||
|
obs_data_set_string(sceneSelection, "name", scene.toUtf8().constData());
|
||||||
|
obs_data_set_string(sceneSelection, "canvasSelection", "Main");
|
||||||
|
|
||||||
|
OBSDataAutoRelease actionData = obs_data_create();
|
||||||
|
obs_data_set_obj(actionData, "segmentSettings", actionSegment);
|
||||||
|
obs_data_set_string(actionData, "id", "scene_switch");
|
||||||
|
obs_data_set_int(actionData, "action", 0);
|
||||||
|
obs_data_set_obj(actionData, "sceneSelection", sceneSelection);
|
||||||
|
obs_data_set_int(actionData, "transitionType", 1);
|
||||||
|
obs_data_set_bool(actionData, "blockUntilTransitionDone", false);
|
||||||
|
obs_data_set_int(actionData, "sceneType", 0);
|
||||||
|
|
||||||
|
if (!FirstRunWizard::CreateMacro(_macro, name, kConditionIdWindow,
|
||||||
|
condData, kActionIdSceneSwitch,
|
||||||
|
actionData)) {
|
||||||
|
QMessageBox::warning(
|
||||||
|
this,
|
||||||
|
obs_module_text("FirstRunWizard.review.errorTitle"),
|
||||||
|
QString(obs_module_text(
|
||||||
|
"FirstRunWizard.review.errorBody"))
|
||||||
|
.arg(window, scene));
|
||||||
|
_macro.reset();
|
||||||
|
// Still advance so the user is not stuck.
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ===========================================================================
|
||||||
|
// DonePage
|
||||||
|
// ===========================================================================
|
||||||
|
|
||||||
|
DonePage::DonePage(QWidget *parent) : QWizardPage(parent)
|
||||||
|
{
|
||||||
|
setTitle(obs_module_text("FirstRunWizard.done.title"));
|
||||||
|
setSubTitle(obs_module_text("FirstRunWizard.done.subtitle"));
|
||||||
|
|
||||||
|
auto body =
|
||||||
|
new QLabel(obs_module_text("FirstRunWizard.done.body"), this);
|
||||||
|
body->setWordWrap(true);
|
||||||
|
body->setTextFormat(Qt::RichText);
|
||||||
|
body->setOpenExternalLinks(true);
|
||||||
|
|
||||||
|
auto layout = new QVBoxLayout(this);
|
||||||
|
layout->addWidget(body);
|
||||||
|
layout->addStretch();
|
||||||
|
}
|
||||||
|
|
||||||
|
// ===========================================================================
|
||||||
|
// FirstRunWizard
|
||||||
|
// ===========================================================================
|
||||||
|
|
||||||
|
FirstRunWizard::FirstRunWizard(QWidget *parent) : QWizard(parent)
|
||||||
|
{
|
||||||
|
setWindowTitle(obs_module_text("FirstRunWizard.windowTitle"));
|
||||||
|
setWizardStyle(QWizard::ModernStyle);
|
||||||
|
setMinimumSize(540, 420);
|
||||||
|
|
||||||
|
setPage(PAGE_WELCOME, new WelcomePage(this));
|
||||||
|
setPage(PAGE_SCENE, new SceneSelectionPage(this));
|
||||||
|
setPage(PAGE_WINDOW, new WindowConditionPage(this));
|
||||||
|
setPage(PAGE_REVIEW, new ReviewPage(this, _macro));
|
||||||
|
setPage(PAGE_DONE, new DonePage(this));
|
||||||
|
|
||||||
|
setStartId(PAGE_WELCOME);
|
||||||
|
setOption(QWizard::NoBackButtonOnLastPage, true);
|
||||||
|
setOption(QWizard::NoCancelButtonOnLastPage, true);
|
||||||
|
|
||||||
|
// Mark done on both Accept (Finish) and Reject (Cancel / close)
|
||||||
|
connect(this, &QWizard::accepted, this,
|
||||||
|
&FirstRunWizard::markFirstRunComplete);
|
||||||
|
connect(this, &QWizard::rejected, this,
|
||||||
|
&FirstRunWizard::markFirstRunComplete);
|
||||||
|
}
|
||||||
|
|
||||||
|
void FirstRunWizard::markFirstRunComplete()
|
||||||
|
{
|
||||||
|
WriteFirstRun(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
// static
|
||||||
|
std::shared_ptr<Macro> FirstRunWizard::ShowWizard(QWidget *parent,
|
||||||
|
bool *wasSkipped)
|
||||||
|
{
|
||||||
|
auto wizard = new FirstRunWizard(parent);
|
||||||
|
wizard->exec();
|
||||||
|
if (wasSkipped) {
|
||||||
|
*wasSkipped = (wizard->result() == QDialog::Rejected);
|
||||||
|
}
|
||||||
|
wizard->deleteLater();
|
||||||
|
return wizard->_macro;
|
||||||
|
}
|
||||||
|
|
||||||
|
// static
|
||||||
|
bool FirstRunWizard::CreateMacro(std::shared_ptr<Macro> ¯o,
|
||||||
|
const std::string ¯oName,
|
||||||
|
const std::string &conditionId,
|
||||||
|
obs_data_t *conditionData,
|
||||||
|
const std::string &actionId,
|
||||||
|
obs_data_t *actionData)
|
||||||
|
{
|
||||||
|
// 1. Create and register the Macro
|
||||||
|
macro = std::make_shared<Macro>(macroName, GetGlobalMacroSettings());
|
||||||
|
if (!macro) {
|
||||||
|
blog(LOG_WARNING, "FirstRunWizard: Macro allocation failed");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 2. Instantiate condition via factory, then hydrate via Load()
|
||||||
|
auto condition =
|
||||||
|
MacroConditionFactory::Create(conditionId, macro.get());
|
||||||
|
if (!condition) {
|
||||||
|
blog(LOG_WARNING,
|
||||||
|
"FirstRunWizard: condition factory returned null "
|
||||||
|
"for id '%s' — is the base plugin loaded?",
|
||||||
|
conditionId.c_str());
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!condition->Load(conditionData)) {
|
||||||
|
blog(LOG_WARNING,
|
||||||
|
"FirstRunWizard: condition Load() failed for id '%s'",
|
||||||
|
conditionId.c_str());
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
macro->Conditions().emplace_back(condition);
|
||||||
|
|
||||||
|
// 3. Instantiate action via factory, then hydrate via Load()
|
||||||
|
auto action = MacroActionFactory::Create(actionId, macro.get());
|
||||||
|
if (!action) {
|
||||||
|
blog(LOG_WARNING,
|
||||||
|
"FirstRunWizard: action factory returned null "
|
||||||
|
"for id '%s' — is the base plugin loaded?",
|
||||||
|
actionId.c_str());
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!action->Load(actionData)) {
|
||||||
|
blog(LOG_WARNING,
|
||||||
|
"FirstRunWizard: action Load() failed for id '%s'",
|
||||||
|
actionId.c_str());
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
macro->Actions().emplace_back(action);
|
||||||
|
|
||||||
|
blog(LOG_INFO, "FirstRunWizard: created macro '%s'", macroName.c_str());
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace advss
|
||||||
129
lib/utils/first-run-wizard.hpp
Normal file
129
lib/utils/first-run-wizard.hpp
Normal file
@@ -0,0 +1,129 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <obs-data.h>
|
||||||
|
|
||||||
|
#include <QComboBox>
|
||||||
|
#include <QLabel>
|
||||||
|
#include <QLineEdit>
|
||||||
|
#include <QPushButton>
|
||||||
|
#include <QTimer>
|
||||||
|
#include <QWizard>
|
||||||
|
#include <QWizardPage>
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
namespace advss {
|
||||||
|
|
||||||
|
class Macro;
|
||||||
|
|
||||||
|
bool IsFirstRun();
|
||||||
|
|
||||||
|
// ---------------------------------------------------------------------------
|
||||||
|
// Page IDs
|
||||||
|
// ---------------------------------------------------------------------------
|
||||||
|
enum WizardPageId {
|
||||||
|
PAGE_WELCOME = 0,
|
||||||
|
PAGE_SCENE,
|
||||||
|
PAGE_WINDOW,
|
||||||
|
PAGE_REVIEW,
|
||||||
|
PAGE_DONE,
|
||||||
|
};
|
||||||
|
|
||||||
|
// ---------------------------------------------------------------------------
|
||||||
|
// WelcomePage
|
||||||
|
// ---------------------------------------------------------------------------
|
||||||
|
class WelcomePage : public QWizardPage {
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
explicit WelcomePage(QWidget *parent = nullptr);
|
||||||
|
int nextId() const override { return PAGE_SCENE; }
|
||||||
|
};
|
||||||
|
|
||||||
|
// ---------------------------------------------------------------------------
|
||||||
|
// SceneSelectionPage
|
||||||
|
// Registers wizard field "targetScene" (QString).
|
||||||
|
// ---------------------------------------------------------------------------
|
||||||
|
class SceneSelectionPage : public QWizardPage {
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
explicit SceneSelectionPage(QWidget *parent = nullptr);
|
||||||
|
void initializePage() override;
|
||||||
|
bool isComplete() const override;
|
||||||
|
int nextId() const override { return PAGE_WINDOW; }
|
||||||
|
|
||||||
|
private:
|
||||||
|
QComboBox *_sceneCombo;
|
||||||
|
};
|
||||||
|
|
||||||
|
// ---------------------------------------------------------------------------
|
||||||
|
// WindowConditionPage
|
||||||
|
// Registers wizard field "windowTitle" (QString).
|
||||||
|
// Auto-detect button samples the focused window after a countdown.
|
||||||
|
// ---------------------------------------------------------------------------
|
||||||
|
class WindowConditionPage : public QWizardPage {
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
explicit WindowConditionPage(QWidget *parent = nullptr);
|
||||||
|
void initializePage() override;
|
||||||
|
bool isComplete() const override;
|
||||||
|
int nextId() const override { return PAGE_REVIEW; }
|
||||||
|
|
||||||
|
private slots:
|
||||||
|
void onAutoDetectClicked();
|
||||||
|
void onCountdownTick();
|
||||||
|
|
||||||
|
private:
|
||||||
|
QLineEdit *_windowEdit;
|
||||||
|
QPushButton *_autoDetect;
|
||||||
|
QTimer *_detectTimer;
|
||||||
|
int _countdown = 3;
|
||||||
|
};
|
||||||
|
|
||||||
|
// ---------------------------------------------------------------------------
|
||||||
|
// ReviewPage
|
||||||
|
// Displays a summary and calls FirstRunWizard::CreateMacro() on Finish.
|
||||||
|
// ---------------------------------------------------------------------------
|
||||||
|
class ReviewPage : public QWizardPage {
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
explicit ReviewPage(QWidget *parent, std::shared_ptr<Macro> ¯o);
|
||||||
|
void initializePage() override;
|
||||||
|
bool validatePage() override;
|
||||||
|
int nextId() const override { return PAGE_DONE; }
|
||||||
|
|
||||||
|
private:
|
||||||
|
QLabel *_summary;
|
||||||
|
std::shared_ptr<Macro> &_macro;
|
||||||
|
};
|
||||||
|
|
||||||
|
// ---------------------------------------------------------------------------
|
||||||
|
// DonePage
|
||||||
|
// ---------------------------------------------------------------------------
|
||||||
|
class DonePage : public QWizardPage {
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
explicit DonePage(QWidget *parent = nullptr);
|
||||||
|
int nextId() const override { return -1; }
|
||||||
|
};
|
||||||
|
|
||||||
|
// ---------------------------------------------------------------------------
|
||||||
|
// FirstRunWizard
|
||||||
|
// ---------------------------------------------------------------------------
|
||||||
|
class FirstRunWizard : public QWizard {
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
explicit FirstRunWizard(QWidget *parent = nullptr);
|
||||||
|
static std::shared_ptr<Macro> ShowWizard(QWidget *parent,
|
||||||
|
bool *wasSkipped = nullptr);
|
||||||
|
static bool
|
||||||
|
CreateMacro(std::shared_ptr<Macro> ¯o, const std::string ¯oName,
|
||||||
|
const std::string &conditionId, obs_data_t *conditionData,
|
||||||
|
const std::string &actionId, obs_data_t *actionData);
|
||||||
|
|
||||||
|
private:
|
||||||
|
void markFirstRunComplete();
|
||||||
|
|
||||||
|
std::shared_ptr<Macro> _macro;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace advss
|
||||||
@@ -32,6 +32,17 @@ ListControls::ListControls(QWidget *parent, bool reorder) : QToolBar(parent)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ListControls::AddWidget(QWidget *widget)
|
||||||
|
{
|
||||||
|
addSeparator();
|
||||||
|
addWidget(widget);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ListControls::AddSeparator()
|
||||||
|
{
|
||||||
|
addSeparator();
|
||||||
|
}
|
||||||
|
|
||||||
void ListControls::AddActionHelper(const char *theme, const char *className,
|
void ListControls::AddActionHelper(const char *theme, const char *className,
|
||||||
const char *tooltip,
|
const char *tooltip,
|
||||||
const std::function<void()> &signal)
|
const std::function<void()> &signal)
|
||||||
|
|||||||
@@ -10,6 +10,8 @@ class ADVSS_EXPORT ListControls final : public QToolBar {
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
ListControls(QWidget *parent = nullptr, bool reorder = true);
|
ListControls(QWidget *parent = nullptr, bool reorder = true);
|
||||||
|
void AddWidget(QWidget *widget);
|
||||||
|
void AddSeparator();
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void Add();
|
void Add();
|
||||||
|
|||||||
@@ -1,13 +1,16 @@
|
|||||||
#include "list-editor.hpp"
|
#include "list-editor.hpp"
|
||||||
#include "ui-helpers.hpp"
|
#include "ui-helpers.hpp"
|
||||||
|
|
||||||
|
#include <QEvent>
|
||||||
|
|
||||||
namespace advss {
|
namespace advss {
|
||||||
|
|
||||||
ListEditor::ListEditor(QWidget *parent, bool reorder)
|
ListEditor::ListEditor(QWidget *parent, bool reorder)
|
||||||
: QWidget(parent),
|
: QWidget(parent),
|
||||||
_list(new QListWidget()),
|
_list(new QListWidget()),
|
||||||
_controls(new ListControls(this, reorder)),
|
_controls(new ListControls(this, reorder)),
|
||||||
_mainLayout(new QVBoxLayout())
|
_mainLayout(new QVBoxLayout()),
|
||||||
|
_placeholder(new QLabel(_list->viewport()))
|
||||||
{
|
{
|
||||||
QWidget::connect(_controls, SIGNAL(Add()), this, SLOT(Add()));
|
QWidget::connect(_controls, SIGNAL(Add()), this, SLOT(Add()));
|
||||||
QWidget::connect(_controls, SIGNAL(Remove()), this, SLOT(Remove()));
|
QWidget::connect(_controls, SIGNAL(Remove()), this, SLOT(Remove()));
|
||||||
@@ -15,6 +18,19 @@ ListEditor::ListEditor(QWidget *parent, bool reorder)
|
|||||||
QWidget::connect(_controls, SIGNAL(Down()), this, SLOT(Down()));
|
QWidget::connect(_controls, SIGNAL(Down()), this, SLOT(Down()));
|
||||||
QWidget::connect(_list, SIGNAL(itemDoubleClicked(QListWidgetItem *)),
|
QWidget::connect(_list, SIGNAL(itemDoubleClicked(QListWidgetItem *)),
|
||||||
this, SLOT(Clicked(QListWidgetItem *)));
|
this, SLOT(Clicked(QListWidgetItem *)));
|
||||||
|
QWidget::connect(_list->model(),
|
||||||
|
SIGNAL(rowsInserted(QModelIndex, int, int)), this,
|
||||||
|
SLOT(UpdatePlaceholder()));
|
||||||
|
QWidget::connect(_list->model(),
|
||||||
|
SIGNAL(rowsRemoved(QModelIndex, int, int)), this,
|
||||||
|
SLOT(UpdatePlaceholder()));
|
||||||
|
QWidget::connect(_list->model(), SIGNAL(modelReset()), this,
|
||||||
|
SLOT(UpdatePlaceholder()));
|
||||||
|
|
||||||
|
_placeholder->setAlignment(Qt::AlignCenter);
|
||||||
|
_placeholder->setWordWrap(true);
|
||||||
|
_placeholder->hide();
|
||||||
|
_list->viewport()->installEventFilter(this);
|
||||||
|
|
||||||
_mainLayout->setContentsMargins(0, 0, 0, 0);
|
_mainLayout->setContentsMargins(0, 0, 0, 0);
|
||||||
_mainLayout->addWidget(_list);
|
_mainLayout->addWidget(_list);
|
||||||
@@ -22,6 +38,40 @@ ListEditor::ListEditor(QWidget *parent, bool reorder)
|
|||||||
setLayout(_mainLayout);
|
setLayout(_mainLayout);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ListEditor::SetPlaceholderText(const QString &text)
|
||||||
|
{
|
||||||
|
_placeholder->setText(text);
|
||||||
|
UpdatePlaceholder();
|
||||||
|
}
|
||||||
|
|
||||||
|
void ListEditor::SetMinListHeight(int value)
|
||||||
|
{
|
||||||
|
_minHeight = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ListEditor::SetMaxListHeight(int value)
|
||||||
|
{
|
||||||
|
_maxHeight = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ListEditor::UpdatePlaceholder()
|
||||||
|
{
|
||||||
|
bool visible = !_placeholder->text().isEmpty() && _list->count() == 0;
|
||||||
|
_placeholder->setVisible(visible);
|
||||||
|
if (visible) {
|
||||||
|
_placeholder->setGeometry(_list->viewport()->rect());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ListEditor::eventFilter(QObject *obj, QEvent *event)
|
||||||
|
{
|
||||||
|
if (obj == _list->viewport() && event->type() == QEvent::Resize &&
|
||||||
|
_placeholder->isVisible()) {
|
||||||
|
_placeholder->setGeometry(_list->viewport()->rect());
|
||||||
|
}
|
||||||
|
return QWidget::eventFilter(obj, event);
|
||||||
|
}
|
||||||
|
|
||||||
void ListEditor::showEvent(QShowEvent *e)
|
void ListEditor::showEvent(QShowEvent *e)
|
||||||
{
|
{
|
||||||
QWidget::showEvent(e);
|
QWidget::showEvent(e);
|
||||||
@@ -64,6 +114,24 @@ int ListEditor::GetIndexOfSignal() const
|
|||||||
void ListEditor::UpdateListSize()
|
void ListEditor::UpdateListSize()
|
||||||
{
|
{
|
||||||
SetHeightToContentHeight(_list);
|
SetHeightToContentHeight(_list);
|
||||||
|
|
||||||
|
if (_list->count() == 0 && !_placeholder->text().isEmpty()) {
|
||||||
|
auto height = _list->fontMetrics().height() * 3;
|
||||||
|
_list->setMinimumHeight(height);
|
||||||
|
_list->setMaximumHeight(height);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (_minHeight >= 0 && _list->minimumHeight() != _minHeight) {
|
||||||
|
_list->setMinimumHeight(_minHeight);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (_maxHeight >= 0 && _list->maximumHeight() != _maxHeight) {
|
||||||
|
if (_list->minimumHeight() > _maxHeight) {
|
||||||
|
_list->setMinimumHeight(_maxHeight);
|
||||||
|
}
|
||||||
|
_list->setMaximumHeight(_maxHeight);
|
||||||
|
}
|
||||||
|
|
||||||
adjustSize();
|
adjustSize();
|
||||||
updateGeometry();
|
updateGeometry();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
#include "export-symbol-helper.hpp"
|
#include "export-symbol-helper.hpp"
|
||||||
#include "list-controls.hpp"
|
#include "list-controls.hpp"
|
||||||
|
|
||||||
|
#include <QLabel>
|
||||||
#include <QListWidget>
|
#include <QListWidget>
|
||||||
#include <QLayout>
|
#include <QLayout>
|
||||||
|
|
||||||
@@ -13,9 +14,13 @@ class ADVSS_EXPORT ListEditor : public QWidget {
|
|||||||
public:
|
public:
|
||||||
ListEditor(QWidget *parent = nullptr, bool reorder = true);
|
ListEditor(QWidget *parent = nullptr, bool reorder = true);
|
||||||
int count() const { return _list->count(); };
|
int count() const { return _list->count(); };
|
||||||
|
void SetPlaceholderText(const QString &text);
|
||||||
|
void SetMinListHeight(int);
|
||||||
|
void SetMaxListHeight(int);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void showEvent(QShowEvent *);
|
void showEvent(QShowEvent *);
|
||||||
|
bool eventFilter(QObject *, QEvent *);
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
virtual void Add() = 0;
|
virtual void Add() = 0;
|
||||||
@@ -23,6 +28,7 @@ private slots:
|
|||||||
virtual void Up(){};
|
virtual void Up(){};
|
||||||
virtual void Down(){};
|
virtual void Down(){};
|
||||||
virtual void Clicked(QListWidgetItem *) {}
|
virtual void Clicked(QListWidgetItem *) {}
|
||||||
|
void UpdatePlaceholder();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void UpdateListSize();
|
void UpdateListSize();
|
||||||
@@ -31,6 +37,11 @@ protected:
|
|||||||
QListWidget *_list;
|
QListWidget *_list;
|
||||||
ListControls *_controls;
|
ListControls *_controls;
|
||||||
QVBoxLayout *_mainLayout;
|
QVBoxLayout *_mainLayout;
|
||||||
|
|
||||||
|
private:
|
||||||
|
QLabel *_placeholder;
|
||||||
|
int _minHeight = -1;
|
||||||
|
int _maxHeight = -1;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace advss
|
} // namespace advss
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user