Skip to content

Commit

Permalink
Update API docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jellyfin-bot committed Oct 31, 2023
1 parent 949c14a commit 443497b
Show file tree
Hide file tree
Showing 3 changed files with 119 additions and 7 deletions.
14 changes: 9 additions & 5 deletions docs/api/components_settings_settings.brs.html
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ <h1 class="page-title">Source: components/settings/settings.brs</h1>
class="sunlight-highlight-javascript linenums">import "pkg:/source/utils/config.brs"
import "pkg:/source/utils/misc.brs"
import "pkg:/source/roku_modules/log/LogMixin.brs"
import "pkg:/source/api/sdk.bs"

sub init()
m.log = log.Logger("Settings")
Expand Down Expand Up @@ -274,16 +273,21 @@ <h1 class="page-title">Source: components/settings/settings.brs</h1>
set_user_setting(selectedSetting.settingName, m.radioSetting.content.getChild(m.radioSetting.checkedItem).id)
end sub

' Returns true if any of the data entry forms are in focus
function isFormInFocus() as boolean
if isValid(m.settingDetail.focusedChild) or m.radioSetting.hasFocus() or m.boolSetting.hasFocus() or m.integerSetting.hasFocus()
return true
end if
return false
end function

function onKeyEvent(key as string, press as boolean) as boolean
if not press then return false

if (key = "back" or key = "left") and m.settingsMenu.focusedChild &lt;> invalid and m.userLocation.Count() > 1
LoadMenu({})
return true
else if (key = "back" or key = "left") and m.settingDetail.focusedChild &lt;> invalid
m.settingsMenu.setFocus(true)
return true
else if (key = "back" or key = "left") and m.radioSetting.hasFocus()
else if (key = "back" or key = "left") and isFormInFocus()
m.settingsMenu.setFocus(true)
return true
end if
Expand Down
110 changes: 109 additions & 1 deletion docs/api/module-settings.html
Original file line number Diff line number Diff line change
Expand Up @@ -507,6 +507,114 @@ <h5>Returns:</h5>



</dd>



<hr>
<dt>
<h4 class="name" id=".isFormInFocus"><span class="type-signature">&lt;static> </span>isFormInFocus()</h4>


</dt>
<dd>


<div class="description">
<p>Returns true if any of the data entry forms are in focus</p>
</div>










<dl class="details">





























<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
<dd class="tag-source">
<ul class="dummy">
<li>
<a href="components_settings_settings.brs.html">components/settings/settings.brs</a>,
<a href="components_settings_settings.brs.html#sunlight-1-line-58">line 58</a>
</li>
</ul>
</dd>







</dl>













<h5>Returns:</h5>




<dl>
<dt>
Type
</dt>
<dd>

<span class="param-type">boolean</span>



</dd>
</dl>





</dd>


Expand Down Expand Up @@ -638,7 +746,7 @@ <h5>Parameters:</h5>
<ul class="dummy">
<li>
<a href="components_settings_settings.brs.html">components/settings/settings.brs</a>,
<a href="components_settings_settings.brs.html#sunlight-1-line-59">line 59</a>
<a href="components_settings_settings.brs.html#sunlight-1-line-66">line 66</a>
</li>
</ul>
</dd>
Expand Down
2 changes: 1 addition & 1 deletion docs/api/quicksearch.html

Large diffs are not rendered by default.

0 comments on commit 443497b

Please sign in to comment.