mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-03-22 01:44:49 -05:00
* Script can be defined in the macro segment or loaded from a file * Supports both LUA and Python * Can be used for actions and conditions * obs_script_create and obs_script_destroy are resolved at runtime (Let's hope the API remains stable)
37 lines
839 B
C++
37 lines
839 B
C++
#pragma once
|
|
#include "macro-condition-edit.hpp"
|
|
#include "macro-segment-script-inline.hpp"
|
|
|
|
namespace advss {
|
|
|
|
class MacroConditionScriptInline : public MacroCondition,
|
|
public MacroSegmentScriptInline {
|
|
public:
|
|
MacroConditionScriptInline(Macro *m) : MacroCondition(m) {}
|
|
|
|
bool CheckCondition();
|
|
|
|
bool Save(obs_data_t *obj) const;
|
|
bool Load(obs_data_t *obj);
|
|
|
|
std::string GetId() const { return _id; };
|
|
|
|
static std::shared_ptr<MacroCondition> Create(Macro *m);
|
|
|
|
private:
|
|
static bool _registered;
|
|
static const std::string _id;
|
|
};
|
|
|
|
class MacroConditionScriptInlineEdit : public MacroSegmentScriptInlineEdit {
|
|
Q_OBJECT
|
|
|
|
public:
|
|
MacroConditionScriptInlineEdit(
|
|
QWidget *,
|
|
std::shared_ptr<MacroConditionScriptInline> = nullptr);
|
|
static QWidget *Create(QWidget *, std::shared_ptr<MacroCondition>);
|
|
};
|
|
|
|
} // namespace advss
|