<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://wiki.crumbledworld.com/index.php?action=history&amp;feed=atom&amp;title=FormExampleCode</id>
	<title>FormExampleCode - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.crumbledworld.com/index.php?action=history&amp;feed=atom&amp;title=FormExampleCode"/>
	<link rel="alternate" type="text/html" href="https://wiki.crumbledworld.com/index.php?title=FormExampleCode&amp;action=history"/>
	<updated>2026-04-22T00:26:30Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.41.4</generator>
	<entry>
		<id>https://wiki.crumbledworld.com/index.php?title=FormExampleCode&amp;diff=191&amp;oldid=prev</id>
		<title>Anders: /* Example Code */</title>
		<link rel="alternate" type="text/html" href="https://wiki.crumbledworld.com/index.php?title=FormExampleCode&amp;diff=191&amp;oldid=prev"/>
		<updated>2025-08-24T17:37:54Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Example Code&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en-GB&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 17:37, 24 August 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l14&quot;&gt;Line 14:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 14:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	if camera then&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	if camera then&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;		--create a form window of size 20% screen width and 20% screen height.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;		--create a form window of size 20% screen width and 20% screen height.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;		form = Form(camera, PanelSize(Vec2(0.2,0.2)))&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;		form = Form(camera, PanelSize(Vec2(0.2,0.2)&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;, &quot;form-name&quot;&lt;/ins&gt;))&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;		--Set layout default is FlowLayout.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;		--Set layout default is FlowLayout.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;		form:setLayout(FallLayout())&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;		form:setLayout(FallLayout())&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key mediawiki:diff:1.41:old-151:rev-191:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>Anders</name></author>
	</entry>
	<entry>
		<id>https://wiki.crumbledworld.com/index.php?title=FormExampleCode&amp;diff=151&amp;oldid=prev</id>
		<title>Anders: Created page with &quot;==Example Code==  &lt;syntaxhighlight lang=&quot;lua&quot;&gt; --this = SceneNode() function destroy() 	--clear form 	form:destroy() end  function create() 	--Get the camera wich the form will be renderd to. 	local camera = this:getRootNode():findNodeByName(&quot;MainCamera&quot;) 	--Check if the camera exist. 	if camera then 		--create a form window of size 20% screen width and 20% screen height. 		form = Form(camera, PanelSize(Vec2(0.2,0.2))) 		--Set layout default is FlowLayout. 		form:setLayo...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.crumbledworld.com/index.php?title=FormExampleCode&amp;diff=151&amp;oldid=prev"/>
		<updated>2025-07-06T07:58:04Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;==Example Code==  &amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt; --this = SceneNode() function destroy() 	--clear form 	form:destroy() end  function create() 	--Get the camera wich the form will be renderd to. 	local camera = this:getRootNode():findNodeByName(&amp;quot;MainCamera&amp;quot;) 	--Check if the camera exist. 	if camera then 		--create a form window of size 20% screen width and 20% screen height. 		form = Form(camera, PanelSize(Vec2(0.2,0.2))) 		--Set layout default is FlowLayout. 		form:setLayo...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Example Code==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
--this = SceneNode()&lt;br /&gt;
function destroy()&lt;br /&gt;
	--clear form&lt;br /&gt;
	form:destroy()&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function create()&lt;br /&gt;
	--Get the camera wich the form will be renderd to.&lt;br /&gt;
	local camera = this:getRootNode():findNodeByName(&amp;quot;MainCamera&amp;quot;)&lt;br /&gt;
	--Check if the camera exist.&lt;br /&gt;
	if camera then&lt;br /&gt;
		--create a form window of size 20% screen width and 20% screen height.&lt;br /&gt;
		form = Form(camera, PanelSize(Vec2(0.2,0.2)))&lt;br /&gt;
		--Set layout default is FlowLayout.&lt;br /&gt;
		form:setLayout(FallLayout())&lt;br /&gt;
		--Set background color red.&lt;br /&gt;
		form:setBackground(Sprite(Vec4(1,0,0,1)))&lt;br /&gt;
		&lt;br /&gt;
		--Allign form to top left.&lt;br /&gt;
		form:setAlignment(Alignment.TOP_LEFT)&lt;br /&gt;
		--Set offset from upper left corner to 200 pixel.&lt;br /&gt;
		form:setFormOffset(PanelSize(Vec2(200,200), PanelSizeType.Pixel))	&lt;br /&gt;
	end&lt;br /&gt;
        return true&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function update()&lt;br /&gt;
	form:update()&lt;br /&gt;
	return true&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Anders</name></author>
	</entry>
</feed>