change obs_scene_destroy to obs_scene_release, add ability to add scenes, fix name dialog sizing

This commit is contained in:
jp9000
2013-12-29 08:54:06 -07:00
parent e5ef03954e
commit c4af3e2a75
10 changed files with 32 additions and 16 deletions
+13
View File
@@ -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)