{"action":"created","issue":{"url":"https://api.github.com/repos/obsproject/obs-studio/issues/1451","repository_url":"https://api.github.com/repos/obsproject/obs-studio","labels_url":"https://api.github.com/repos/obsproject/obs-studio/issues/1451/labels{/name}","comments_url":"https://api.github.com/repos/obsproject/obs-studio/issues/1451/comments","events_url":"https://api.github.com/repos/obsproject/obs-studio/issues/1451/events","html_url":"https://github.com/obsproject/obs-studio/pull/1451","id":354071937,"node_id":"MDExOlB1bGxSZXF1ZXN0MjEwOTM3ODAz","number":1451,"title":"[WIP] UI: Show a message in the Sources list to new users","user":{"login":"WizardCM","id":941350,"node_id":"MDQ6VXNlcjk0MTM1MA==","avatar_url":"https://avatars1.githubusercontent.com/u/941350?v=4","gravatar_id":"","url":"https://api.github.com/users/WizardCM","html_url":"https://github.com/WizardCM","followers_url":"https://api.github.com/users/WizardCM/followers","following_url":"https://api.github.com/users/WizardCM/following{/other_user}","gists_url":"https://api.github.com/users/WizardCM/gists{/gist_id}","starred_url":"https://api.github.com/users/WizardCM/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WizardCM/subscriptions","organizations_url":"https://api.github.com/users/WizardCM/orgs","repos_url":"https://api.github.com/users/WizardCM/repos","events_url":"https://api.github.com/users/WizardCM/events{/privacy}","received_events_url":"https://api.github.com/users/WizardCM/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-08-26T07:02:39Z","updated_at":"2018-08-26T13:41:16Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/obsproject/obs-studio/pulls/1451","html_url":"https://github.com/obsproject/obs-studio/pull/1451","diff_url":"https://github.com/obsproject/obs-studio/pull/1451.diff","patch_url":"https://github.com/obsproject/obs-studio/pull/1451.patch"},"body":"This adds a text label and background image if a user has launched OBS without any sources. The most common use case is when launching OBS Studio for the first time.\r\n\r\nThis makes use of a function introduced by #1344, CountVideoSources().\r\n\r\nThis is a first pass, mainly to get opinions and feedback (first C++ PR, yay!).\r\n\r\nKnown behaviour, on purpose:\r\n* The message will remain if a new scene is created\r\n* The message will appear if a new user closes OBS then reopens it without adding sources\r\n* The message will disappear only if a source is added, or if the user switches to a scene collection that contains sources\r\n* Themes without a background image defined will only show the text - though, this should be OK as Dark is default. All built-in themes contain an image of some kind.\r\n* Users can \"click through\" the text label as if it was part of the background\r\n* The text is part of a label, and therefore can be translated for every language. Currently, it is one label with 2 lines, but if needed I can change this.\r\n* The image is fully controlled by the theme, and therefore can be customized - as can any styling of an empty sources list\r\n\r\nCurrent bugs:\r\n* The message will not re-appear when all sources have been deleted (as that event isn't tracked in window-basic-main) or if a user creates a new, empty scene collection\r\n* Though text is centered, alignment isn't accurate due to the sources box initially being 100px wide, then after loading is complete, changes to 180px\r\n* Resizing the source box (or any surrounding elements) will not adjust the size of the label, and therefore the text will not be centered properly\r\n\r\nCurrent design concerns:\r\n* Might move the initial label creation into OBS::Load directly rather than having it as part of the function\r\n* The label is currently attached to the top of the sources list, and while this looks fine at default sizes (at least on Windows), it becomes.. disconnected from the image as it centered vertically. I might center it with an offset/margin from the center\r\n\r\nNotes:\r\n* Per @Warchamp7's suggestion, I will research ways to enable adding sources through **left** click in empty scenes. Currently only right click is supported.\r\n\r\nScreenshots as of initial PR:\r\n\r\nDark: (what 99% of new users will see)\r\n![2018-08-26_16-36-41](https://user-images.githubusercontent.com/941350/44625627-3adff100-a951-11e8-991c-ac2ebb2dde18.png)\r\n\r\n\"Default\" on Widows: (System-style, for any users who installed before Dark became default)\r\n![2018-08-26_16-36-52](https://user-images.githubusercontent.com/941350/44625630-50551b00-a951-11e8-8bee-7fcde0ac0ef5.png)\r\n\r\nAcri: (I do need to adjust the height of the label a little more here)\r\n![2018-08-26_16-37-05](https://user-images.githubusercontent.com/941350/44625631-5945ec80-a951-11e8-8bde-bfe1e2996a93.png)\r\n\r\nRachni:\r\n![2018-08-26_17-01-25](https://user-images.githubusercontent.com/941350/44625644-b17cee80-a951-11e8-9ff5-dc4b1fd035d8.png)\r\n\r\n\r\nTo test this yourself:\r\n* Run your local build once\r\n* Close OBS\r\n* Create a portable_mode.txt file in the relevant rundir\r\n* Every time you want to test from scratch (reset layout and all settings), delete the config directory created by portable mode"},"comment":{"url":"https://api.github.com/repos/obsproject/obs-studio/issues/comments/416039795","html_url":"https://github.com/obsproject/obs-studio/pull/1451#issuecomment-416039795","issue_url":"https://api.github.com/repos/obsproject/obs-studio/issues/1451","id":416039795,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNjAzOTc5NQ==","user":{"login":"SuslikV","id":19683044,"node_id":"MDQ6VXNlcjE5NjgzMDQ0","avatar_url":"https://avatars0.githubusercontent.com/u/19683044?v=4","gravatar_id":"","url":"https://api.github.com/users/SuslikV","html_url":"https://github.com/SuslikV","followers_url":"https://api.github.com/users/SuslikV/followers","following_url":"https://api.github.com/users/SuslikV/following{/other_user}","gists_url":"https://api.github.com/users/SuslikV/gists{/gist_id}","starred_url":"https://api.github.com/users/SuslikV/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SuslikV/subscriptions","organizations_url":"https://api.github.com/users/SuslikV/orgs","repos_url":"https://api.github.com/users/SuslikV/repos","events_url":"https://api.github.com/users/SuslikV/events{/privacy}","received_events_url":"https://api.github.com/users/SuslikV/received_events","type":"User","site_admin":false},"created_at":"2018-08-26T13:41:16Z","updated_at":"2018-08-26T13:41:16Z","author_association":"CONTRIBUTOR","body":"Also, users rarely read the messages, so the annoying remainder in the sources list will be skipped by major number of new users.\r\n\r\nThe default behavior of obs is to add 2 audio sources on first run (devices at Settings>Audio) and this feature used by users, so, \"You don't have **any** sources...\" is not correct.\r\n\r\nAnd I think (obviously, the intention to keep the application from changes) that the feature not needed, there is one - warning message when you start the output, it already exist in obs."}}
{"actor":{"display_login":"SuslikV"}}