Auto suggest scene and source names.
NameDialog can have placeholder text. Localize scene number. Pre-select scene and source text.
This commit is contained in:
parent
978de126b3
commit
6dc84ad8fe
5 changed files with 22 additions and 3 deletions
|
|
@ -18,6 +18,7 @@
|
|||
#include "window-basic-main.hpp"
|
||||
#include "window-basic-source-select.hpp"
|
||||
#include "qt-wrappers.hpp"
|
||||
#include "obs-app.hpp"
|
||||
|
||||
bool OBSBasicSourceSelect::EnumSources(void *data, obs_source_t source)
|
||||
{
|
||||
|
|
@ -143,5 +144,13 @@ OBSBasicSourceSelect::OBSBasicSourceSelect(OBSBasic *parent, const char *type_)
|
|||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
const char *placeHolderText = obs_source_getdisplayname(
|
||||
OBS_SOURCE_TYPE_INPUT,
|
||||
type_, App()->GetLocale());
|
||||
|
||||
ui->sourceName->setText(QT_UTF8(placeHolderText));
|
||||
ui->sourceName->setFocus(); //Fixes deselect of text.
|
||||
ui->sourceName->selectAll();
|
||||
|
||||
obs_enum_sources(EnumSources, this);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue