mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-09-24 23:31:36 +08:00
change obs_scene_destroy to obs_scene_release, add ability to add scenes, fix name dialog sizing
This commit is contained in:
@@ -21,6 +21,8 @@
|
||||
#include "wx-wrappers.hpp"
|
||||
#include "window-basic-settings.hpp"
|
||||
#include "window-basic-main.hpp"
|
||||
#include "window-namedialog.hpp"
|
||||
using namespace std;
|
||||
|
||||
void OBSBasic::SceneAdded(obs_source_t source)
|
||||
{
|
||||
@@ -182,6 +184,17 @@ void OBSBasic::scenesRDown(wxMouseEvent &event)
|
||||
|
||||
void OBSBasic::sceneAddClicked(wxCommandEvent &event)
|
||||
{
|
||||
string name;
|
||||
int ret = NameDialog::AskForName(this,
|
||||
Str("MainWindow.AddSceneDlg.Title"),
|
||||
Str("MainWindow.AddSceneDlg.Text"),
|
||||
name);
|
||||
|
||||
if (ret == wxID_OK) {
|
||||
obs_scene_t scene = obs_scene_create(name.c_str());
|
||||
obs_add_source(obs_scene_getsource(scene));
|
||||
obs_scene_release(scene);
|
||||
}
|
||||
}
|
||||
|
||||
void OBSBasic::sceneRemoveClicked(wxCommandEvent &event)
|
||||
|
||||
Reference in New Issue
Block a user