File tree Expand file tree Collapse file tree 4 files changed +20
-2
lines changed Expand file tree Collapse file tree 4 files changed +20
-2
lines changed Original file line number Diff line number Diff line change @@ -547,10 +547,21 @@ ElgatoCloudConfig::ElgatoCloudConfig(QWidget *parent) : QDialog(parent)
547
547
QString checkBoxStyle = ECheckBoxStyle;
548
548
checkBoxStyle.replace (" ${checked-img}" , checkedImage.c_str ());
549
549
checkBoxStyle.replace (" ${unchecked-img}" , uncheckedImage.c_str ());
550
-
551
550
_makerCheckbox->setStyleSheet (checkBoxStyle);
552
551
layout->addWidget (_makerCheckbox);
553
552
553
+ connect (_makerCheckbox, &QCheckBox::stateChanged, [this ](int state) {
554
+ bool makerTools = state == Qt::Checked;
555
+ _makerRestartMsg->setVisible (makerTools != elgatoCloud->MakerToolsOnStart ());
556
+ });
557
+
558
+ std::string restartTxt = elgatoCloud->MakerToolsOnStart () ? " Maker tools will be disabled after restarting OBS." : " Maker tools will be enabled after restarting OBS." ;
559
+ _makerRestartMsg = new QLabel (restartTxt.c_str (), this );
560
+ _makerRestartMsg->setVisible (false );
561
+ _makerRestartMsg->setStyleSheet (
562
+ " QLabel {color: #FFFFFF; padding: 8px 16px 0px 16px; font-size: 12pt; font-style: italic; }" );
563
+ _makerRestartMsg->setAlignment (Qt::AlignCenter);
564
+ layout->addWidget (_makerRestartMsg);
554
565
layout->addStretch ();
555
566
556
567
std::string version = " v" ;
Original file line number Diff line number Diff line change @@ -133,6 +133,7 @@ class ElgatoCloudConfig : public QDialog {
133
133
obs_volmeter_t *_volmeter = nullptr ;
134
134
OBSQTDisplay *_videoPreview = nullptr ;
135
135
QCheckBox *_makerCheckbox = nullptr ;
136
+ QLabel* _makerRestartMsg = nullptr ;
136
137
std::string _installDirectory;
137
138
138
139
signals:
Original file line number Diff line number Diff line change @@ -201,6 +201,9 @@ void ElgatoCloud::_Listen()
201
201
void ElgatoCloud::_Initialize ()
202
202
{
203
203
_config = get_module_config ();
204
+ bool makerTools = obs_data_get_bool (_config, " MakerTools" );
205
+ _makerToolsOnStart = makerTools;
206
+
204
207
_GetSavedState ();
205
208
206
209
const auto now = std::chrono::system_clock::now ();
@@ -277,8 +280,9 @@ void ElgatoCloud::LoadPurchasedProducts()
277
280
auto api = MarketplaceApi::getInstance ();
278
281
std::string api_url = api->gatewayUrl ();
279
282
api_url +=
280
- " /my-products?extension=scene-collections &offset=0&limit=100" ;
283
+ " /my-products?extension=overlays &offset=0&limit=100" ;
281
284
auto productsResponse = fetch_string_from_get (api_url, _accessToken);
285
+ obs_log (LOG_INFO, " url: %s" , api_url.c_str ());
282
286
obs_log (LOG_INFO, " Products: %s" , productsResponse.c_str ());
283
287
products.clear ();
284
288
try {
Original file line number Diff line number Diff line change @@ -65,6 +65,7 @@ class ElgatoCloud {
65
65
void Thread ();
66
66
bool mainWindowOpen = false ;
67
67
ElgatoCloudWindow *window = nullptr ;
68
+ inline bool MakerToolsOnStart () const { return _makerToolsOnStart; }
68
69
69
70
private:
70
71
void _Initialize ();
@@ -86,6 +87,7 @@ class ElgatoCloud {
86
87
int64_t _accessTokenExpiration;
87
88
int64_t _refreshTokenExpiration;
88
89
obs_data_t *_config;
90
+ bool _makerToolsOnStart;
89
91
};
90
92
91
93
class ElgatoCloudThread : public QThread {
You can’t perform that action at this time.
0 commit comments