mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-03-21 17:34:57 -05:00
Add warning for macro action source
This commit is contained in:
parent
198a5dc1ec
commit
e7f031641f
|
|
@ -171,6 +171,7 @@ AdvSceneSwitcher.action.source="Source"
|
|||
AdvSceneSwitcher.action.source.type.enable="Enable"
|
||||
AdvSceneSwitcher.action.source.type.disable="Disable"
|
||||
AdvSceneSwitcher.action.source.entry="{{actions}} {{sources}}"
|
||||
AdvSceneSwitcher.action.source.warning="Warning: Enabling and disabling sources globally cannot be controlled by the OBS UI"
|
||||
AdvSceneSwitcher.action.media="Media"
|
||||
AdvSceneSwitcher.action.media.type.play="Play"
|
||||
AdvSceneSwitcher.action.media.type.pause="Pause"
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
#pragma once
|
||||
#include <QSpinBox>
|
||||
#include <QLabel>
|
||||
#include "macro-action-edit.hpp"
|
||||
|
||||
enum class SourceAction {
|
||||
|
|
@ -50,6 +51,7 @@ private slots:
|
|||
protected:
|
||||
QComboBox *_sources;
|
||||
QComboBox *_actions;
|
||||
QLabel *_warning;
|
||||
std::shared_ptr<MacroActionSource> _entryData;
|
||||
|
||||
private:
|
||||
|
|
|
|||
|
|
@ -73,6 +73,8 @@ MacroActionSourceEdit::MacroActionSourceEdit(
|
|||
{
|
||||
_sources = new QComboBox();
|
||||
_actions = new QComboBox();
|
||||
_warning = new QLabel(
|
||||
obs_module_text("AdvSceneSwitcher.action.source.warning"));
|
||||
|
||||
populateActionSelection(_actions);
|
||||
populateSourceSelection(_sources);
|
||||
|
|
@ -82,13 +84,16 @@ MacroActionSourceEdit::MacroActionSourceEdit(
|
|||
QWidget::connect(_sources, SIGNAL(currentTextChanged(const QString &)),
|
||||
this, SLOT(SourceChanged(const QString &)));
|
||||
|
||||
QHBoxLayout *mainLayout = new QHBoxLayout;
|
||||
QVBoxLayout *mainLayout = new QVBoxLayout;
|
||||
QHBoxLayout *entryLayout = new QHBoxLayout;
|
||||
std::unordered_map<std::string, QWidget *> widgetPlaceholders = {
|
||||
{"{{sources}}", _sources},
|
||||
{"{{actions}}", _actions},
|
||||
};
|
||||
placeWidgets(obs_module_text("AdvSceneSwitcher.action.source.entry"),
|
||||
mainLayout, widgetPlaceholders);
|
||||
entryLayout, widgetPlaceholders);
|
||||
mainLayout->addLayout(entryLayout);
|
||||
mainLayout->addWidget(_warning);
|
||||
setLayout(mainLayout);
|
||||
|
||||
_entryData = entryData;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user