mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-03-21 17:34:57 -05:00
Add temp var for last replay buffer save path
Some checks are pending
debian-build / build (push) Waiting to run
Check locale / ubuntu64 (push) Waiting to run
Push to master / Check Formatting 🔍 (push) Waiting to run
Push to master / Build Project 🧱 (push) Waiting to run
Push to master / Create Release 🛫 (push) Blocked by required conditions
Some checks are pending
debian-build / build (push) Waiting to run
Check locale / ubuntu64 (push) Waiting to run
Push to master / Check Formatting 🔍 (push) Waiting to run
Push to master / Build Project 🧱 (push) Waiting to run
Push to master / Create Release 🛫 (push) Blocked by required conditions
This commit is contained in:
parent
555f7c1381
commit
e6e9f3a831
|
|
@ -2317,6 +2317,9 @@ AdvSceneSwitcher.tempVar.mqtt.message="Message"
|
|||
AdvSceneSwitcher.tempVar.cursor.x="Cursor position (X)"
|
||||
AdvSceneSwitcher.tempVar.cursor.y="Cursor position (Y)"
|
||||
|
||||
AdvSceneSwitcher.tempVar.replay.lastSavePath="Last save path"
|
||||
AdvSceneSwitcher.tempVar.replay.lastSavePath.description="The file path of the last replay buffer saved."
|
||||
|
||||
AdvSceneSwitcher.selectScene="--select scene--"
|
||||
AdvSceneSwitcher.selectCanvas="--select canvas--"
|
||||
AdvSceneSwitcher.selectPreviousScene="Previous Scene"
|
||||
|
|
|
|||
|
|
@ -58,6 +58,10 @@ bool MacroConditionReplayBuffer::ReplayBufferWasSaved()
|
|||
|
||||
bool MacroConditionReplayBuffer::CheckCondition()
|
||||
{
|
||||
char *lastSavePath = obs_frontend_get_last_replay();
|
||||
SetTempVarValue("lastSavePath", lastSavePath ? lastSavePath : "");
|
||||
bfree(lastSavePath);
|
||||
|
||||
switch (_state) {
|
||||
case Condition::STOP:
|
||||
return !obs_frontend_replay_buffer_active();
|
||||
|
|
@ -85,6 +89,16 @@ bool MacroConditionReplayBuffer::Load(obs_data_t *obj)
|
|||
return true;
|
||||
}
|
||||
|
||||
void MacroConditionReplayBuffer::SetupTempVars()
|
||||
{
|
||||
MacroCondition::SetupTempVars();
|
||||
AddTempvar(
|
||||
"lastSavePath",
|
||||
obs_module_text("AdvSceneSwitcher.tempVar.replay.lastSavePath"),
|
||||
obs_module_text(
|
||||
"AdvSceneSwitcher.tempVar.replay.lastSavePath.description"));
|
||||
}
|
||||
|
||||
static inline void populateStateSelection(QComboBox *list)
|
||||
{
|
||||
for (const auto &entry : conditions) {
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
namespace advss {
|
||||
|
||||
class MacroConditionReplayBuffer : public MacroCondition {
|
||||
class MacroConditionReplayBuffer final : public MacroCondition {
|
||||
public:
|
||||
MacroConditionReplayBuffer(Macro *m) : MacroCondition(m) {}
|
||||
bool CheckCondition();
|
||||
|
|
@ -27,6 +27,7 @@ public:
|
|||
Condition _state = Condition::STOP;
|
||||
|
||||
private:
|
||||
void SetupTempVars();
|
||||
bool ReplayBufferWasSaved();
|
||||
|
||||
bool _saveTimeInitialized = false;
|
||||
|
|
@ -35,7 +36,7 @@ private:
|
|||
static const std::string id;
|
||||
};
|
||||
|
||||
class MacroConditionReplayBufferEdit : public QWidget {
|
||||
class MacroConditionReplayBufferEdit final : public QWidget {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
|
|
@ -55,11 +56,10 @@ public:
|
|||
private slots:
|
||||
void StateChanged(int value);
|
||||
|
||||
protected:
|
||||
QComboBox *_state;
|
||||
std::shared_ptr<MacroConditionReplayBuffer> _entryData;
|
||||
|
||||
private:
|
||||
QComboBox *_state;
|
||||
|
||||
std::shared_ptr<MacroConditionReplayBuffer> _entryData;
|
||||
bool _loading = true;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user