This code:
function ScrollableTextBox()
--draw stencil box node
local stenbox = gui.new_box_node(vmath.vector3(ScreenWidth/2,ScreenHeight/2-100,1), vmath.vector3(ScreenWidth*.86,ScreenHeight*.70,1))
gui.set_layer(stenbox, "background") -- text and box on same layer
--draw text node
local texty = gui.new_text_node(vmath.vector3(562,ScreenHeight/2+300+100,1), "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam ut euismod risus. Sed dignissim euismod viverra. Nulla molestie erat faucibus purus tincidunt, et porta erat venenatis. Sed ut ultricies ipsum. Sed dolor risus, commodo mattis rutrum vitae, cursus vel ipsum. Interdum et malesuada fames ac ante ipsum primis in faucibus. Suspendisse potenti. Nullam efficitur at leo porta mollis. Ut pulvinar scelerisque maximus. Donec iaculis non nunc ac consequat. Donec sed urna a metus consectetur convallis ut in mi. Fusce aliquet enim sed neque egestas, ut egestas mi interdum. Sed posuere quam quis risus consectetur bibendum. Aenean pharetra, erat non ultricies sodales, ipsum nulla malesuada elit, a tempor magna turpis pulvinar magna. Cras nisi augue, efficitur at vehicula vel, sollicitudin quis lacus. In nisl libero, ultrices ac viverra sed, varius sed risus.")
gui.set_layer(texty, "background") -- text and box on same layer
--parent textnode(child) to stencil (parent)
gui.set_parent(texty, stenbox, true)
--invoke clipping mode on stencilbox
gui.set_clipping_mode(stenbox, gui.CLIPPING_MODE_STENCIL)
gui.set_clipping_visible(stenbox, true)
-- **** this line of code when active causes no text...
gui.set_position(texty,vmath.vector3(562, 1600,1))
gui.set_color(texty, ColorTable["black"])
gui.set_font(texty, "NormalSans1MEDIUM+")
gui.set_size(texty, vmath.vector3(ScreenWidth*.80,ScreenHeight*.64,1))
gui.set_line_break(texty, true)
gui.set_id(texty, "votext")
InputMode="SCROLLTEXT"
print("here------")
print(gui.get_position(gui.get_node("votext")))
end
Acts weird - in that the stencil works but the second I MOVE the text box using a set_position statement it literally disappears from the screen.
Any thoughts what I’m doing wrong?