Add status dock

This commit is contained in:
WarmUpTill
2022-01-02 04:08:02 +01:00
committed by WarmUpTill
parent 2649efe8b3
commit 3417fc5407
7 changed files with 141 additions and 8 deletions

View File

@@ -8,6 +8,7 @@
#include <obs-frontend-api.h>
#include "headers/advanced-scene-switcher.hpp"
#include "headers/status-dock.hpp"
#include "headers/curl-helper.hpp"
#include "headers/utility.hpp"
#include "headers/version.h"
@@ -635,14 +636,19 @@ extern "C" void InitSceneSwitcher()
PlatformInit();
dock = new StatusDock(
static_cast<QMainWindow *>(obs_frontend_get_main_window()));
obs_frontend_add_dock(dock);
auto cb = []() {
if (switcher->settingsWindowOpened) {
ssWindow->show();
ssWindow->raise();
ssWindow->activateWindow();
} else {
ssWindow = new AdvSceneSwitcher(
(QMainWindow *)obs_frontend_get_main_window());
ssWindow =
new AdvSceneSwitcher(static_cast<QMainWindow *>(
obs_frontend_get_main_window()));
ssWindow->setAttribute(Qt::WA_DeleteOnClose);
ssWindow->show();
}