<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://wiki.skycorp.global/index.php?action=history&amp;feed=atom&amp;title=Modding%3ADynamicOptions</id>
	<title>Modding:DynamicOptions - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.skycorp.global/index.php?action=history&amp;feed=atom&amp;title=Modding%3ADynamicOptions"/>
	<link rel="alternate" type="text/html" href="http://wiki.skycorp.global/index.php?title=Modding:DynamicOptions&amp;action=history"/>
	<updated>2026-04-05T12:50:08Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.7</generator>
	<entry>
		<id>http://wiki.skycorp.global/index.php?title=Modding:DynamicOptions&amp;diff=1229&amp;oldid=prev</id>
		<title>SkyCorp: Documentation for DynamicOptions</title>
		<link rel="alternate" type="text/html" href="http://wiki.skycorp.global/index.php?title=Modding:DynamicOptions&amp;diff=1229&amp;oldid=prev"/>
		<updated>2026-01-16T00:46:02Z</updated>

		<summary type="html">&lt;p&gt;Documentation for DynamicOptions&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Introduced in r56.1, this class provides a means to build customized scene flows in your mods.&lt;br /&gt;
&lt;br /&gt;
This object holds a set of buttons that can be pushed to the UI.&lt;br /&gt;
&lt;br /&gt;
Sample code:  [https://skycorp.global/skyscript/mods/v/91/sample-dynamic-options-example DynamicOptionsExample]&lt;br /&gt;
&lt;br /&gt;
== Public static methods ==&lt;br /&gt;
&lt;br /&gt;
=== DynamicOptions generateNew() ===&lt;br /&gt;
Creates a new DynamicOptions&lt;br /&gt;
&lt;br /&gt;
== Public methods ==&lt;br /&gt;
&lt;br /&gt;
=== void clearOptions() ===&lt;br /&gt;
Removes all options/buttons from this object&lt;br /&gt;
&lt;br /&gt;
(This does not immediately affect UI, see [[Modding:MainScreen|MainScreen]].resetUI() for that)&lt;br /&gt;
&lt;br /&gt;
=== void addOption(string name, Closure onButtonScript, int preferredButtonLocation=-1) ===&lt;br /&gt;
Adds a new button to the collection.&lt;br /&gt;
&lt;br /&gt;
name - The name for the button.  Highly recommended to keep short or it will be unreadable.&lt;br /&gt;
&lt;br /&gt;
onButtonScript - pass the function to be called if user presses the button.  Usually just a function name, but you could create a lambda-style function, also.&lt;br /&gt;
&lt;br /&gt;
preferredButtonLocation - An integer from 0-9, inclusive, will decide the button location.  -1 will let the button go anywhere.  If you plan to have a lot of buttons, just leave most of them as -1 and a dropdown will be created.&lt;br /&gt;
&lt;br /&gt;
=== void showOptions() ===&lt;br /&gt;
Render options to MainScreen.  This function assumes all buttons are already reset / non-enabled.&lt;/div&gt;</summary>
		<author><name>SkyCorp</name></author>
	</entry>
</feed>