]> git.sesse.net Git - nageru-docs/blobdiff - html.rst
Document the return value of choose() and how it is useful.
[nageru-docs] / html.rst
index 644e9248656d764e2c3bf7e0735b2124a3f8fd3d..9a62a9bda40e96cb43b8160ff94a0386cc89b38b 100644 (file)
--- a/html.rst
+++ b/html.rst
@@ -31,10 +31,16 @@ so that you can load remote resources from local files. (If you wish to locate
 your HTML path by way of the theme, the variable Nageru.THEME_PATH could prove
 useful, as it contains the absolute path to the theme in current use.)
 
-You can then add this HTMLInput to a chain (or multiple chains if you'd like),
-using code like::
+You can then display HTMLInput or any input in your scene (that you created
+earlier with scene:add_input()), using code like::
 
-  local image = chain:add_html_input(html_input)
+  input:display(html_input)
+
+or, as described in :ref:`locking`, you can create an input that can *only*
+show HTML when you create it::
+
+  local scene = Scene.new(16, 9)
+  local input = scene:add_input(html_input)
 
 Like video inputs, you can call *get_signal_num()* on the HTML input to get
 its signal number, for getting its resolution etc. (see below for changing
@@ -54,7 +60,7 @@ however, this is normal even in a hardware chain, and most overlay graphics
 does not need to be timed to the input more than through a few frames.
 
 This, and the fact that the theme can not present a very detailed UI
-(short of :ref:`simple menus <menu>`), means that it can be hard to
+(short of :ref:`simple menus <menus>`), means that it can be hard to
 exert detailed control over the graphics using Nageru alone—you will
 probably want to have the theme contact some non-Nageru backend (possibly over
 WebSockets) from where it can take detailed instructions.