mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-09-03 07:05:52 -05:00
Add option to disable registering of pause control hotkeys
This commit is contained in:
@@ -1,10 +1,12 @@
|
||||
#pragma once
|
||||
#include "macro.hpp"
|
||||
|
||||
#include <QWidget>
|
||||
#include <QDialog>
|
||||
#include <QCheckBox>
|
||||
#include <obs-data.h>
|
||||
|
||||
// Global macro properties
|
||||
class MacroProperties {
|
||||
public:
|
||||
void Save(obs_data_t *obj);
|
||||
@@ -15,15 +17,19 @@ public:
|
||||
bool _highlightActions = false;
|
||||
};
|
||||
|
||||
// Dialog for configuring global and macro specific settings
|
||||
class MacroPropertiesDialog : public QDialog {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
MacroPropertiesDialog(QWidget *parent, const MacroProperties &);
|
||||
static bool AskForSettings(QWidget *parent, MacroProperties &userInput);
|
||||
MacroPropertiesDialog(QWidget *parent, const MacroProperties &,
|
||||
Macro *macro);
|
||||
static bool AskForSettings(QWidget *parent, MacroProperties &userInput,
|
||||
Macro *macro);
|
||||
|
||||
private:
|
||||
QCheckBox *_executed;
|
||||
QCheckBox *_conditions;
|
||||
QCheckBox *_actions;
|
||||
QCheckBox *_hotkeys;
|
||||
};
|
||||
|
||||
@@ -114,6 +114,9 @@ public:
|
||||
bool OnChangePreventedActionsRecently();
|
||||
void ResetUIHelpers();
|
||||
|
||||
void EnablePauseHotkeys(bool);
|
||||
bool PauseHotkeysEnabled();
|
||||
|
||||
private:
|
||||
void SetupHotkeys();
|
||||
void ClearHotkeys();
|
||||
@@ -132,6 +135,7 @@ private:
|
||||
bool _matchOnChange = false;
|
||||
bool _paused = false;
|
||||
int _count = 0;
|
||||
bool _registerHotkeys = true;
|
||||
obs_hotkey_id _pauseHotkey = OBS_INVALID_HOTKEY_ID;
|
||||
obs_hotkey_id _unpauseHotkey = OBS_INVALID_HOTKEY_ID;
|
||||
obs_hotkey_id _togglePauseHotkey = OBS_INVALID_HOTKEY_ID;
|
||||
|
||||
Reference in New Issue
Block a user