<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://mindattic.com/wiki/docs/index.php?action=history&amp;feed=atom&amp;title=MindAttic.Components%2Funity%2FCOMPONENTS</id>
	<title>MindAttic.Components/unity/COMPONENTS - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://mindattic.com/wiki/docs/index.php?action=history&amp;feed=atom&amp;title=MindAttic.Components%2Funity%2FCOMPONENTS"/>
	<link rel="alternate" type="text/html" href="https://mindattic.com/wiki/docs/index.php?title=MindAttic.Components/unity/COMPONENTS&amp;action=history"/>
	<updated>2026-12-06T14:11:16Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.46.3</generator>
	<entry>
		<id>https://mindattic.com/wiki/docs/index.php?title=MindAttic.Components/unity/COMPONENTS&amp;diff=555&amp;oldid=prev</id>
		<title>Docs Sync: md2wiki: sync from MindAttic.Docs</title>
		<link rel="alternate" type="text/html" href="https://mindattic.com/wiki/docs/index.php?title=MindAttic.Components/unity/COMPONENTS&amp;diff=555&amp;oldid=prev"/>
		<updated>2026-11-29T20:25:37Z</updated>

		<summary type="html">&lt;p&gt;md2wiki: sync from MindAttic.Docs&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= MindAttic Components for Unity =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;com.mindattic.components.unity&amp;lt;/code&amp;gt; is the MindAttic design system for Unity 6: themed uGUI + TextMesh Pro menus and controls that use the same palette and token names as &amp;lt;code&amp;gt;web/themes&amp;lt;/code&amp;gt; and the same looks as &amp;lt;code&amp;gt;web/components&amp;lt;/code&amp;gt;, so a MindAttic game and a MindAttic page read as one family. Every Unity game&amp;#039;s menus, dialogs and HUD are built from it, so a button, a menu or a theme changes in one place.&lt;br /&gt;
&lt;br /&gt;
[[File:MindAttic.Components-docs-unity-images-gallery-lobby-dark.png|frameless|upright=2.6|alt=The Gallery sample&amp;#039;s lobby screen in the dark theme: a join code with a Copy button, a roster with colour swatches, a Host tag, ping and kick buttons, a Ready switch, and Leave and Start buttons|The Gallery sample&amp;#039;s lobby screen in the dark theme: a join code with a Copy button, a roster with colour swatches, a Host tag, ping and kick buttons, a Ready switch, and Leave and Start buttons]]&lt;br /&gt;
&lt;br /&gt;
== What&amp;#039;s in the package ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Assembly&lt;br /&gt;
! Namespace&lt;br /&gt;
! What&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;MindAttic.Components.Unity.Core&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;MindAttic.Components.Unity.Core&amp;lt;/code&amp;gt;&lt;br /&gt;
| Engine-free (&amp;lt;code&amp;gt;noEngineReferences&amp;lt;/code&amp;gt;): the token model (&amp;lt;code&amp;gt;ThemeColor&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ThemePalette&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ThemeTokenNames&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ThemeMetrics&amp;lt;/code&amp;gt;), &amp;lt;code&amp;gt;CssTokenParser&amp;lt;/code&amp;gt; (reads any &amp;lt;code&amp;gt;web/themes&amp;lt;/code&amp;gt; stylesheet), &amp;lt;code&amp;gt;ControlStyles&amp;lt;/code&amp;gt; (every control&amp;#039;s colours per state), &amp;lt;code&amp;gt;Contrast&amp;lt;/code&amp;gt; + &amp;lt;code&amp;gt;ThemeValidator&amp;lt;/code&amp;gt; (WCAG AA), &amp;lt;code&amp;gt;NavigationGraph&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MenuStackModel&amp;amp;lt;T&amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;FocusTrapModel&amp;amp;lt;,&amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MenuDefinition&amp;lt;/code&amp;gt; + &amp;lt;code&amp;gt;MenuValidator&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ToastQueue&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;BannerQueue&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MinimapFit&amp;lt;/code&amp;gt; + &amp;lt;code&amp;gt;MapRect&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;StatusKind&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Motion&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;MindAttic.Components.Unity&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;MindAttic.Components.Unity&amp;lt;/code&amp;gt;&lt;br /&gt;
| The components, the theme provider, the canvas/EventSystem helpers and the back router&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;MindAttic.Components.Unity.Editor&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;MindAttic.Components.Unity.Editor&amp;lt;/code&amp;gt;&lt;br /&gt;
| GameObject &amp;gt; MindAttic UI menu, the ThemeTokens inspector, the prefab builder, menu validation, the TMP Essentials importer&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Unity 6000.0 or later. The only dependency is &amp;lt;code&amp;gt;com.unity.ugui&amp;lt;/code&amp;gt; 2.0.0 (uGUI with TextMesh Pro built in). The Input System is optional: with it installed and enabled the package uses &amp;lt;code&amp;gt;InputSystemUIInputModule&amp;lt;/code&amp;gt;, otherwise the old &amp;lt;code&amp;gt;StandaloneInputModule&amp;lt;/code&amp;gt;; both drive everything.&lt;br /&gt;
&lt;br /&gt;
== Install ==&lt;br /&gt;
&lt;br /&gt;
Add it to the game&amp;#039;s &amp;lt;code&amp;gt;Packages/manifest.json&amp;lt;/code&amp;gt;. The MindAttic games keep this repo next to theirs and reference it by path:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;md-code lang-json&amp;quot;&amp;gt;&amp;quot;com.mindattic.components.unity&amp;quot;: &amp;quot;file:../../MindAttic.Components/unity/com.mindattic.components.unity&amp;quot;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
TextMesh Pro needs its Essential Resources in the project. The package&amp;#039;s editor imports them the first time it loads (no pop-up, also in batch mode); MindAttic &amp;gt; Components &amp;gt; Import TMP Essentials does it by hand, and &amp;lt;code&amp;gt;EditorPrefs.SetBool(&amp;quot;MindAttic.Components.AutoImportTmp&amp;quot;, false)&amp;lt;/code&amp;gt; turns the automatic import off.&lt;br /&gt;
&lt;br /&gt;
== Quick start ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;md-code lang-csharp&amp;quot;&amp;gt;using MindAttic.Components.Unity;&lt;br /&gt;
using MindAttic.Components.Unity.Core;&lt;br /&gt;
&lt;br /&gt;
var stack = MenuStack.Create();                    // its own 1920x1080-reference canvas + EventSystem&lt;br /&gt;
var main = stack.CreateScreen(&amp;quot;My Game&amp;quot;);&lt;br /&gt;
main.AddButton(&amp;quot;Multiplayer&amp;quot;, () =&amp;gt; stack.Push(&amp;quot;Multiplayer&amp;quot;, s =&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    s.AddButton(&amp;quot;Host&amp;quot;, OnHost, ButtonVariant.Primary, MaIcon.Play);&lt;br /&gt;
    var code = s.AddTextbox(&amp;quot;Join code&amp;quot;, &amp;quot;ABC123&amp;quot;).AsCode(6);&lt;br /&gt;
    s.AddButton(&amp;quot;Join&amp;quot;, () =&amp;gt; OnJoin(code.Text));&lt;br /&gt;
}), ButtonVariant.Primary);&lt;br /&gt;
main.AddToggle(&amp;quot;Reduce motion&amp;quot;, false, v =&amp;gt; MaTheme.ReduceMotion = v);&lt;br /&gt;
main.AddButton(&amp;quot;Quit&amp;quot;, Application.Quit, ButtonVariant.Danger, MaIcon.Exit);&lt;br /&gt;
stack.Push(main);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Or one screen on an existing canvas: &amp;lt;code&amp;gt;var menu = MenuScreen.Create(canvas, &amp;quot;Multiplayer&amp;quot;); menu.AddButton(&amp;quot;Host&amp;quot;, OnHost);&amp;lt;/code&amp;gt;. Everything is also available as a prefab (&amp;lt;code&amp;gt;Runtime/Prefabs&amp;lt;/code&amp;gt;) and from GameObject &amp;gt; MindAttic UI.&lt;br /&gt;
&lt;br /&gt;
== Theming ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ThemeTokens&amp;lt;/code&amp;gt; is a ScriptableObject with one colour per token, the size metrics and an optional TMP font. &amp;lt;code&amp;gt;MaTheme&amp;lt;/code&amp;gt; is the provider: &amp;lt;code&amp;gt;MaTheme.Current&amp;lt;/code&amp;gt; is what every component draws with, and changing it (or editing the current asset) restyles everything live.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Web token&lt;br /&gt;
! &amp;lt;code&amp;gt;ThemeTokens&amp;lt;/code&amp;gt; field&lt;br /&gt;
! Used for&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;--bg&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;bg&amp;lt;/code&amp;gt;&lt;br /&gt;
| Menu cards, dialogs, toolbars&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;--bg2&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;bg2&amp;lt;/code&amp;gt;&lt;br /&gt;
| Buttons and fields at rest, lists&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;--bg3&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;bg3&amp;lt;/code&amp;gt;&lt;br /&gt;
| Hover, tracks, code wells&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;--border&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;border&amp;lt;/code&amp;gt;&lt;br /&gt;
| Hairlines&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;--accent&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;--accent2&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;accent&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;accent2&amp;lt;/code&amp;gt;&lt;br /&gt;
| Primary fills, focus rings, slider fills; a hovered primary&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;--text&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;--text2&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;--text3&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;text&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;text2&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;text3&amp;lt;/code&amp;gt;&lt;br /&gt;
| Body, labels and idle buttons, placeholders and captions&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;--tag-bg&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;--tag-text&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;--tag-border&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;--tag-hover-bg&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;--tag-hover-text&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;tagBg&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;tagText&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;tagBorder&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;tagHoverBg&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;tagHoverText&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;MaTag&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;--rule&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;rule&amp;lt;/code&amp;gt;&lt;br /&gt;
| Section rules&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;--danger&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;--danger2&amp;lt;/code&amp;gt; &amp;lt;em&amp;gt;(Unity)&amp;lt;/em&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;danger&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;danger2&amp;lt;/code&amp;gt;&lt;br /&gt;
| Danger buttons (the web&amp;#039;s &amp;lt;code&amp;gt;.ma-btn&amp;lt;/code&amp;gt; red)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;--success&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;--warning&amp;lt;/code&amp;gt; &amp;lt;em&amp;gt;(Unity)&amp;lt;/em&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;success&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;warning&amp;lt;/code&amp;gt;&lt;br /&gt;
| Toasts, tags&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;--on-accent&amp;lt;/code&amp;gt; &amp;lt;em&amp;gt;(Unity)&amp;lt;/em&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;onAccent&amp;lt;/code&amp;gt;&lt;br /&gt;
| Text on an accent or danger fill&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;--overlay&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;--shadow&amp;lt;/code&amp;gt; &amp;lt;em&amp;gt;(Unity)&amp;lt;/em&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;overlay&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;shadow&amp;lt;/code&amp;gt;&lt;br /&gt;
| Modal backdrop, drop shadows&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;MaTheme.Dark&amp;lt;/code&amp;gt; (the default) and &amp;lt;code&amp;gt;MaTheme.Light&amp;lt;/code&amp;gt; carry the exact values of &amp;lt;code&amp;gt;web/themes/Dark/dark.css&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;web/themes/Light/light.css&amp;lt;/code&amp;gt;; &amp;lt;code&amp;gt;dotnet test unity/tests/Core.Tests&amp;lt;/code&amp;gt; parses those files and fails if they drift. Any other web theme loads with &amp;lt;code&amp;gt;ThemeTokens.FromCss(css, &amp;quot;ocean&amp;quot;)&amp;lt;/code&amp;gt; or the inspector&amp;#039;s Load web theme CSS button; tokens a stylesheet leaves out come from the built-in theme of matching darkness.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;md-code lang-csharp&amp;quot;&amp;gt;MaTheme.UseLight();                // or UseDark(), Toggle(), Apply(myTokens)&lt;br /&gt;
MaTheme.ReduceMotion = true;       // every transition instant; spinners pulse instead of turning&lt;br /&gt;
var ocean = ThemeTokens.FromCss(File.ReadAllText(path), &amp;quot;ocean&amp;quot;);&lt;br /&gt;
MaTheme.Apply(ocean);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A &amp;lt;code&amp;gt;ThemeProvider&amp;lt;/code&amp;gt; component sets the theme and reduce motion from the inspector. &amp;lt;code&amp;gt;Runtime/Themes/Dark.asset&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Light.asset&amp;lt;/code&amp;gt; are ready-made assets to duplicate. The inspector checks the palette against WCAG 2.2 AA (&amp;lt;code&amp;gt;ThemeValidator&amp;lt;/code&amp;gt;: text on every surface, on-accent text, status dots, and every button variant&amp;#039;s label on its fill at rest, selected, selected-and-disabled at 4.5:1 and disabled at 3:1) and copies it as CSS for a matching web theme.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ThemeMetrics&amp;lt;/code&amp;gt; is the size scale, in canvas units at 1920x1080 (the web&amp;#039;s pixel sizes doubled): spacing 4/8/16/24/32/48, radii 12/16/24, control height 60, menu width 640, type 20/24/26/32/46, transitions 0.15 s and 0.28 s with the web&amp;#039;s &amp;lt;code&amp;gt;cubic-bezier(0.4, 0, 0.2, 1)&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Components ==&lt;br /&gt;
&lt;br /&gt;
Every component is a &amp;lt;code&amp;gt;MaElement&amp;lt;/code&amp;gt; (a MonoBehaviour) with a static &amp;lt;code&amp;gt;Create(parent, ...)&amp;lt;/code&amp;gt;; &amp;lt;code&amp;gt;parent&amp;lt;/code&amp;gt; is any component (a Canvas, a screen&amp;#039;s &amp;lt;code&amp;gt;Items&amp;lt;/code&amp;gt;, a row). Controls are stock uGUI selectables underneath (&amp;lt;code&amp;gt;Button&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Toggle&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Slider&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;TMP_InputField&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;TMP_Dropdown&amp;lt;/code&amp;gt;), so inspector events and existing code still work; the package switches their own colour transitions off and draws states itself.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Component&lt;br /&gt;
! Create&lt;br /&gt;
! Notes&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;MaButton&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;Create(parent, label, onClick, variant = Secondary, icon = None)&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;Label&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Variant&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;Primary&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Secondary&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Danger&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Ghost&amp;lt;/code&amp;gt;), &amp;lt;code&amp;gt;Icon&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;IconSprite&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Interactable&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Selected&amp;lt;/code&amp;gt; (the chosen one, e.g. a vote&amp;#039;s answer: drawn filled and kept that way, label at AA, when also disabled), &amp;lt;code&amp;gt;OnClick&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Click()&amp;lt;/code&amp;gt;, fluent &amp;lt;code&amp;gt;WithVariant&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;WithIcon&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;WithSelected&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;OnClicked&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;WithWidth&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Stretch&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;WithTooltip&amp;lt;/code&amp;gt;. A disabled button fades, but its label keeps 3:1 on the faded fill&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;MaIconButton&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;Create(parent, icon, onClick, tooltip, variant)&amp;lt;/code&amp;gt;&lt;br /&gt;
| Square; &amp;lt;code&amp;gt;Tooltip&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;WithSize&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;MaToggle&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;Create(parent, label, value, onChanged)&amp;lt;/code&amp;gt;&lt;br /&gt;
| A switch; the whole row is the control; Left/Right set it; &amp;lt;code&amp;gt;Value&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ValueChanged&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;SetValueWithoutNotify&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;MaTextbox&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;Create(parent, label, placeholder, onSubmit, onChanged)&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;Text&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Placeholder&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Label&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ReadOnly&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;IsEditing&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Focus()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;WithContentType&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;WithCharacterLimit&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;AsCode(length)&amp;lt;/code&amp;gt; (letters/digits, upper case)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;MaSelect&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;Create(parent, options, index, onChanged)&amp;lt;/code&amp;gt;&lt;br /&gt;
| Dropdown; Left/Right step it while closed; &amp;lt;code&amp;gt;Value&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;SelectedText&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;SetOptions&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Open&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Close&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;IsExpanded&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;WrapWithArrows&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;MaRange&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;Create(parent, min, max, value, onChanged, wholeNumbers)&amp;lt;/code&amp;gt;&lt;br /&gt;
| Slider; &amp;lt;code&amp;gt;Value&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Min&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Max&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Format&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ShowValueIn(label)&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;MaProgressBar&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;Create(parent, value, indeterminate, height)&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;Value&amp;lt;/code&amp;gt; 0..1 (eases), &amp;lt;code&amp;gt;Indeterminate&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;MaSpinner&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;Create(parent, size)&amp;lt;/code&amp;gt;&lt;br /&gt;
| Busy ring; &amp;lt;code&amp;gt;Period&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;MaTooltip&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;Attach(target, text)&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;element.WithTooltip(text)&amp;lt;/code&amp;gt;&lt;br /&gt;
| Hover (after 0.45 s) and keyboard/gamepad focus; &amp;lt;code&amp;gt;Show&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Hide&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;MaToast&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;MaToast.Show(message, kind, title, seconds)&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;ToastKind&amp;lt;/code&amp;gt; Info/Success/Warning/Error; three at once, the rest queue; &amp;lt;code&amp;gt;DismissAll&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;OnScreen&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;MaModal&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;Create(title, parent)&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Alert&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Confirm&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ConfirmAsync&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Busy&amp;lt;/code&amp;gt;&lt;br /&gt;
| Focus trap; &amp;lt;code&amp;gt;AddMessage&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Add(element)&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;AddButton(label, onClick, variant, closes)&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Open&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Close&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Cancel&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;OnCancel&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Closed&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Dismissable&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;DismissOnBackdropClick&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;SetMessage&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Top&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;OpenCount&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;CloseAll&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;MaToolbar&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;Create(parent, dock = Top)&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;AddButton&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;AddIconButton&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;AddText&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;AddFlexibleSpace&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Add(element)&amp;lt;/code&amp;gt;; wires its own Left/Right navigation when it stands alone&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;MaRow&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;Create(parent, equalWidths)&amp;lt;/code&amp;gt;&lt;br /&gt;
| Side-by-side controls, one navigation row&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;MaFormRow&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;Create(parent, label, control, showValue)&amp;lt;/code&amp;gt;&lt;br /&gt;
| Label column + control (+ live readout for a range)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;MaCodeDisplay&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;Create(parent, label, code)&amp;lt;/code&amp;gt;&lt;br /&gt;
| Large spaced read-only code + Copy (clipboard, &amp;quot;Copied&amp;quot; flip, toast); &amp;lt;code&amp;gt;Code&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Copied&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ToastOnCopy&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;MaList&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;MaListRow&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;MaList.Create(parent, maxVisibleRows, emptyText)&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;list.AddRow(text, swatch, detail, onClick)&amp;lt;/code&amp;gt;&lt;br /&gt;
| Roster rows: colour swatch, text, &amp;lt;code&amp;gt;AddTag&amp;lt;/code&amp;gt;, detail on the right, &amp;lt;code&amp;gt;AddAction(icon, onClick, tooltip)&amp;lt;/code&amp;gt;; scrolls the focused row into view; &amp;lt;code&amp;gt;Remove&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Clear&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;MaTag&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;Create(parent, text, tone)&amp;lt;/code&amp;gt;&lt;br /&gt;
| Pill; &amp;lt;code&amp;gt;TagTone&amp;lt;/code&amp;gt; Neutral/Accent/Success/Warning/Danger&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;MaText&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;Create(parent, text, style, alignment)&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;TextStyle&amp;lt;/code&amp;gt; Title/Heading/Body/Label/Muted/Caption/Section/Control/Code&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;MaPanel&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;Create(parent, style)&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;PanelStyle&amp;lt;/code&amp;gt; Surface (card with shadow), Raised, Inset, Bar&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;MaStatusPill&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;Create(parent, text, kind = Neutral, pulse = null)&amp;lt;/code&amp;gt;&lt;br /&gt;
| HUD status: a dot in the &amp;lt;code&amp;gt;StatusKind&amp;lt;/code&amp;gt; colour (Ok success, Warn warning, Error danger, Neutral muted) and the label in body text; &amp;lt;code&amp;gt;Set(text, kind)&amp;lt;/code&amp;gt; (cheap every frame), &amp;lt;code&amp;gt;Text&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Kind&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Pulse&amp;lt;/code&amp;gt; (the dot breathes; default on for Warn, still with reduce motion)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;MaBanner&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;Create(parent, width = 1100)&amp;lt;/code&amp;gt;&lt;br /&gt;
| Timed title + muted subtitle card, centred; &amp;lt;code&amp;gt;Show(title, subtitle, seconds = 3, replace = false)&amp;lt;/code&amp;gt; fades in, holds, fades out (instant with reduce motion); later ones queue unless &amp;lt;code&amp;gt;replace&amp;lt;/code&amp;gt;; &amp;lt;code&amp;gt;Dismiss&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Clear&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;IsShowing&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Current&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;PendingCount&amp;lt;/code&amp;gt;; never blocks the pointer&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;MaMinimap&amp;lt;/code&amp;gt;&lt;br /&gt;
| &amp;lt;code&amp;gt;Create(parent, size = 320, resolution = 160, padding = 8)&amp;lt;/code&amp;gt;&lt;br /&gt;
| Inset panel drawing caller-supplied world rects and points: &amp;lt;code&amp;gt;Clear()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;AddRect(MapRect, colour, fit = true)&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;AddPoint(x, y, colour, radiusPx, fit = false)&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;SetViewport(MapRect?)&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Apply()&amp;lt;/code&amp;gt;; &amp;lt;code&amp;gt;AutoFit&amp;lt;/code&amp;gt; (default) fits the bounds of what was added with &amp;lt;code&amp;gt;fit&amp;lt;/code&amp;gt; plus &amp;lt;code&amp;gt;padding&amp;lt;/code&amp;gt; texels, &amp;lt;code&amp;gt;FitTo(bounds)&amp;lt;/code&amp;gt; pins them; &amp;lt;code&amp;gt;Panned&amp;lt;/code&amp;gt; gives the world point under a click or drag; &amp;lt;code&amp;gt;Fit&amp;lt;/code&amp;gt; (the &amp;lt;code&amp;gt;MinimapFit&amp;lt;/code&amp;gt;), &amp;lt;code&amp;gt;Texture&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Backdrop&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ViewportColor&amp;lt;/code&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| The icons (&amp;lt;code&amp;gt;MaIcon&amp;lt;/code&amp;gt;: Close, Check, Copy, Chevron*, Back, Plus, Minus, Menu, Info, Warning, Play, Pause, User, Settings, Dot, Exit) and every rounded shape are drawn at runtime from signed distance fields (&amp;lt;code&amp;gt;MaIcons&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MaSprites&amp;lt;/code&amp;gt;); the package ships no textures.&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Menus ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;MenuScreen&amp;lt;/code&amp;gt; is one page: a centred card with a title (and a back chevron when there is somewhere to go back to), a muted subtitle and a vertical list. &amp;lt;code&amp;gt;Add*&amp;lt;/code&amp;gt; methods build the list: &amp;lt;code&amp;gt;AddButton&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;AddTextbox&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;AddToggle&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;AddSelect&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;AddRange&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;AddCode&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;AddList&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;AddProgress&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;AddSpinner&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;AddText&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;AddSection&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;AddRow&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;AddFormRow&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;AddSpace&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Add(element)&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Clear&amp;lt;/code&amp;gt;. &amp;lt;code&amp;gt;Width&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Panel&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Items&amp;lt;/code&amp;gt; let a game reposition or extend it; &amp;lt;code&amp;gt;BackHandler&amp;lt;/code&amp;gt; intercepts back (return true to swallow it, e.g. to confirm leaving a lobby); &amp;lt;code&amp;gt;Shown&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;Hidden&amp;lt;/code&amp;gt; fire on every change; &amp;lt;code&amp;gt;Validate()&amp;lt;/code&amp;gt; checks it against the menu rules.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;MenuStack&amp;lt;/code&amp;gt; holds the screens: &amp;lt;code&amp;gt;Create(parent, backdrop, sortingOrder)&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;CreateScreen(title, subtitle)&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Push(screen)&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Push(title, build)&amp;lt;/code&amp;gt; (destroyed when popped), &amp;lt;code&amp;gt;Pop&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Replace&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;PopToRoot&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;SetRoot&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Back()&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;HandleBack()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Current&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Root&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Count&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;CanGoBack&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Open&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;Close&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;Toggle&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;IsOpen&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ScreenChanged&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Opened&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Closed&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;EscapeEnabled&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Backdrop&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
* A pushed screen selects its first control; popping back re-selects the control the player left from.&lt;br /&gt;
* &amp;lt;code&amp;gt;ConfigureAsPauseMenu(root)&amp;lt;/code&amp;gt; makes an in-game Esc menu: dimmed backdrop, starts closed, Esc/B or gamepad Start opens it on its root, back at the root closes it, and it reopens on its root. Pause the game on &amp;lt;code&amp;gt;Opened&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;Closed&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &amp;lt;code&amp;gt;MaBackRouter&amp;lt;/code&amp;gt; routes Esc/B: a text field being edited or an open dropdown keeps it, else the top modal cancels, else the most recently enabled open stack goes back, else a closed pause menu opens. &amp;lt;code&amp;gt;MaBackRouter.HandleBack()&amp;lt;/code&amp;gt; routes one from code; &amp;lt;code&amp;gt;MaBackRouter.Enabled = false&amp;lt;/code&amp;gt; hands Esc back to the game.&lt;br /&gt;
&lt;br /&gt;
== Keyboard, gamepad and pointer ==&lt;br /&gt;
&lt;br /&gt;
* Navigation is explicit (&amp;lt;code&amp;gt;Navigation.Mode.Explicit&amp;lt;/code&amp;gt;), wired by &amp;lt;code&amp;gt;MaNavigation&amp;lt;/code&amp;gt; from the engine-free &amp;lt;code&amp;gt;NavigationGraph&amp;lt;/code&amp;gt;: Up/Down move through a screen&amp;#039;s rows and wrap, Left/Right move inside a row (a button row, a roster row and its kick button), disabled and hidden controls are skipped, and a modal&amp;#039;s navigation never leaves the modal.&lt;br /&gt;
* The first item is selected when a screen shows; a click on empty space clears uGUI&amp;#039;s selection, so the screen puts it back on the next frame.&lt;br /&gt;
* A text field is reached like any control; Enter/A starts editing (arrows still move past it), Enter submits, Esc cancels the edit only.&lt;br /&gt;
* Focus rings show for keyboard/gamepad use and hide after a pointer press (the web&amp;#039;s &amp;lt;code&amp;gt;:focus-visible&amp;lt;/code&amp;gt;); hovering a control selects it (&amp;lt;code&amp;gt;MaInput.SelectOnHover&amp;lt;/code&amp;gt;), so the keys continue from where the mouse was.&lt;br /&gt;
* &amp;lt;code&amp;gt;MaCanvas.Create&amp;lt;/code&amp;gt; makes a screen-space overlay canvas scaled from 1920x1080 (match 0.5) with a raycaster and an EventSystem; &amp;lt;code&amp;gt;MaCanvas.Configure(canvas)&amp;lt;/code&amp;gt; sets up an existing one. Modals, toasts and tooltips live on &amp;lt;code&amp;gt;MaCanvas.Overlay&amp;lt;/code&amp;gt; (sorting order 29000, kept across scene loads).&lt;br /&gt;
* All motion uses unscaled time, so menus animate while the game is paused (&amp;lt;code&amp;gt;Time.timeScale = 0&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
== Dialogs and feedback ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;md-code lang-csharp&amp;quot;&amp;gt;MaModal.Alert(&amp;quot;Disconnected&amp;quot;, reason);&lt;br /&gt;
MaModal.Confirm(&amp;quot;Leave the lobby?&amp;quot;, &amp;quot;The others keep playing.&amp;quot;, ok =&amp;gt; { if (ok) Leave(); }, &amp;quot;Leave&amp;quot;, &amp;quot;Stay&amp;quot;, ButtonVariant.Danger);&lt;br /&gt;
if (await MaModal.ConfirmAsync(&amp;quot;Host a game?&amp;quot;, &amp;quot;Others join with your code.&amp;quot;)) Host();&lt;br /&gt;
var busy = MaModal.Busy(&amp;quot;Connecting&amp;quot;, &amp;quot;Contacting 10.0.0.2:7777...&amp;quot;, onCancel: CancelConnect);&lt;br /&gt;
busy.SetMessage(&amp;quot;Retrying...&amp;quot;); busy.Close();&lt;br /&gt;
MaToast.Show(&amp;quot;Join code copied&amp;quot;, ToastKind.Success);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A Danger confirm starts with focus on the safe button. A busy dialog without &amp;lt;code&amp;gt;onCancel&amp;lt;/code&amp;gt; can only be closed from code; Esc is swallowed.&lt;br /&gt;
&lt;br /&gt;
== Recipes for the MindAttic games ==&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;strong&amp;gt;Multiplayer front end (Unity.Multiplayer UM-T48)&amp;lt;/strong&amp;gt;: a &amp;lt;code&amp;gt;MenuStack&amp;lt;/code&amp;gt; with Host / Join by IP (&amp;lt;code&amp;gt;AddTextbox&amp;lt;/code&amp;gt;) / Join by code (&amp;lt;code&amp;gt;AddTextbox(...).AsCode(6)&amp;lt;/code&amp;gt;) / Quit; the lobby is a screen with &amp;lt;code&amp;gt;AddCode(&amp;quot;Join code&amp;quot;, code)&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;AddList()&amp;lt;/code&amp;gt; rows (&amp;lt;code&amp;gt;AddRow(name, playerColour, ping)&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;AddTag(&amp;quot;Host&amp;quot;, TagTone.Accent)&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;AddAction(MaIcon.Close, Kick, &amp;quot;Kick&amp;quot;)&amp;lt;/code&amp;gt;), per-player &amp;lt;code&amp;gt;AddToggle&amp;lt;/code&amp;gt;s and an &amp;lt;code&amp;gt;AddRow()&amp;lt;/code&amp;gt; of Leave/Start, with &amp;lt;code&amp;gt;BackHandler&amp;lt;/code&amp;gt; confirming the leave; connecting is &amp;lt;code&amp;gt;MaModal.Busy(..., onCancel)&amp;lt;/code&amp;gt;; a disconnect reason is &amp;lt;code&amp;gt;MaModal.Alert&amp;lt;/code&amp;gt;; the in-game menu is a second stack with &amp;lt;code&amp;gt;ConfigureAsPauseMenu(root)&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &amp;lt;strong&amp;gt;HUD and pause (Unity.Cursory UC-T11, UC-T23)&amp;lt;/strong&amp;gt;: &amp;lt;code&amp;gt;MaToolbar.Create(canvas)&amp;lt;/code&amp;gt; along the top (&amp;lt;code&amp;gt;AddIconButton&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;AddText&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;AddFlexibleSpace&amp;lt;/code&amp;gt;) with a &amp;lt;code&amp;gt;MaStatusPill&amp;lt;/code&amp;gt; for the connection (&amp;lt;code&amp;gt;Set(&amp;quot;Live&amp;quot;, StatusKind.Ok)&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Set(&amp;quot;Connecting...&amp;quot;, StatusKind.Warn)&amp;lt;/code&amp;gt;), a &amp;lt;code&amp;gt;MaBanner&amp;lt;/code&amp;gt; for the level&amp;#039;s title when it changes, a &amp;lt;code&amp;gt;MaMinimap&amp;lt;/code&amp;gt; in a corner fed the level&amp;#039;s walls, goals and bodies (&amp;lt;code&amp;gt;fit: true&amp;lt;/code&amp;gt;), the players as points and the camera as the viewport, panning the camera on &amp;lt;code&amp;gt;Panned&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;MaToast&amp;lt;/code&amp;gt; for events, and a pause stack as above.&lt;br /&gt;
&lt;br /&gt;
== Prefabs and editor tools ==&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;Runtime/Prefabs&amp;lt;/code&amp;gt; holds a prefab of every component (Button, Primary Button, Danger Button, Icon Button, Toggle, Textbox, Select, Range, Progress Bar, Spinner, Tag, Code Display, List, Toolbar, Panel, Menu Screen, Menu Stack). They are built by the same code as &amp;lt;code&amp;gt;Create&amp;lt;/code&amp;gt; (MindAttic &amp;gt; Components &amp;gt; Rebuild Package Prefabs) and get their generated sprites when enabled.&lt;br /&gt;
* GameObject &amp;gt; MindAttic UI adds any component under the selection, or on a new MindAttic canvas.&lt;br /&gt;
* MindAttic &amp;gt; Components &amp;gt; Validate Menus In Open Scenes runs every &amp;lt;code&amp;gt;MenuScreen&amp;lt;/code&amp;gt; through &amp;lt;code&amp;gt;MenuValidator&amp;lt;/code&amp;gt;: a title, at least one focusable item (so a gamepad player is never stranded), labelled controls, no duplicate button labels.&lt;br /&gt;
&lt;br /&gt;
== Sample ==&lt;br /&gt;
&lt;br /&gt;
Package Manager &amp;gt; MindAttic Components &amp;gt; Samples &amp;gt; Gallery imports &amp;lt;code&amp;gt;Gallery.unity&amp;lt;/code&amp;gt;: every component in both themes (a toolbar button switches), a multiplayer front end with a lobby, the inputs, progress, dialogs and toasts, the HUD widgets (status pills, a level banner, a minimap that pans on click), and a pause menu on Esc.&lt;br /&gt;
&lt;br /&gt;
[[File:MindAttic.Components-docs-unity-images-gallery-buttons-light.png|frameless|upright=2.6|alt=The Gallery&amp;#039;s buttons and tags in the light theme|The Gallery&amp;#039;s buttons and tags in the light theme]]&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;md-code lang-powershell&amp;quot;&amp;gt;dotnet test unity/tests/Core.Tests                         # engine-free Core (net10 NUnit; Core.Build checks netstandard2.1 / C# 9)&lt;br /&gt;
powershell -File unity/tests/run-editmode.ps1              # editor: CSS-to-ThemeTokens, theme assets, prefabs, GameObject menu, validation&lt;br /&gt;
powershell -File unity/tests/run-playmode.ps1              # runtime: construction, theming, menu stack, navigation, modal focus, toasts, HUD widgets&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The Unity suites run in batch mode on Unity 6000.4.3f1 in &amp;lt;code&amp;gt;unity/tests/UnityHost&amp;lt;/code&amp;gt;, a bare project whose manifest references the package by &amp;lt;code&amp;gt;file:&amp;lt;/code&amp;gt; path, lists it in &amp;lt;code&amp;gt;testables&amp;lt;/code&amp;gt; and adds the Input System (active input handling: both) and the engine modules most games have (animation, audio, physics, physics 2D), so a name that clashes with a &amp;lt;code&amp;gt;UnityEngine&amp;lt;/code&amp;gt; type in a real game (&amp;lt;code&amp;gt;UnityEngine.Motion&amp;lt;/code&amp;gt; from the animation module, M.COMP-T44) fails the suites here first. Its &amp;lt;code&amp;gt;Library/&amp;lt;/code&amp;gt;, logs and the imported TMP Essentials are git-ignored; the scripts import TMP Essentials on a clean checkout before the first run.&lt;br /&gt;
&lt;br /&gt;
== Layout ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;md-code lang-text&amp;quot;&amp;gt;unity/&lt;br /&gt;
  com.mindattic.components.unity/     the UPM package&lt;br /&gt;
    Runtime/Core/                     engine-free Core (noEngineReferences)&lt;br /&gt;
    Runtime/{Theming,Rendering,Infrastructure,Controls,Menus}/&lt;br /&gt;
    Runtime/Prefabs/, Runtime/Themes/ generated prefabs and Dark/Light ThemeTokens assets&lt;br /&gt;
    Editor/                           menus, inspector, prefab builder, validation, TMP Essentials&lt;br /&gt;
    Tests/Runtime/, Tests/Editor/     PlayMode and EditMode suites&lt;br /&gt;
    Samples~/Gallery/                 the Gallery scene&lt;br /&gt;
  tests/Core.Tests/, tests/Core.Build/&lt;br /&gt;
  tests/UnityHost/                    the batch-mode test host&lt;br /&gt;
  tests/run-editmode.ps1, run-playmode.ps1&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;md2wiki-crumb&amp;quot;&amp;gt;Part of [[MindAttic.Components]].&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;md2wiki-source&amp;quot;&amp;gt;From [https://github.com/mindattic/MindAttic.Components/blob/main/docs/unity/COMPONENTS.md MindAttic.Components/docs/unity/COMPONENTS.md] via MindAttic.Docs; synced automatically, so edit the repo, not this page.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:MindAttic.Components]]&lt;/div&gt;</summary>
		<author><name>Docs Sync</name></author>
	</entry>
</feed>