Refactor, fixes and maximized option for title tab (#40)

* move definitions of switcher structs to separate files

* remove useless comment

* cleanup and silence warnings

* add generic switch

* removed delay on main thread startup as it served no purpose

* clean up ultility.hpp

* do not save switchStr to file as it could cause issues when scenes are renamed

* rename sceneRoundTrip to sceneSequence

* add option to switch if window is maximized to title tab
This commit is contained in:
WarmUpTill
2020-09-25 21:42:58 +02:00
committed by GitHub
parent 1559d437ec
commit dd63ff846c
40 changed files with 1266 additions and 981 deletions

View File

@@ -0,0 +1,33 @@
#pragma once
#include <string>
#include "utility.hpp"
#include "switch-generic.hpp"
constexpr auto window_title_func = 5;
constexpr auto default_priority_5 = window_title_func;
struct WindowSceneSwitch : SceneSwitcherEntry {
std::string window;
bool fullscreen;
bool maximized;
bool focus;
const char *getType() { return "window"; }
inline WindowSceneSwitch(OBSWeakSource scene_, const char *window_,
OBSWeakSource transition_, bool fullscreen_,
bool maximized_, bool focus_)
: SceneSwitcherEntry(scene_, transition_),
window(window_),
fullscreen(fullscreen_),
maximized(maximized_),
focus(focus_)
{
}
};
static inline QString MakeWindowSwitchName(const QString &scene,
const QString &value,
const QString &transition,
bool fullscreen, bool maximized,
bool focus);