SubmenuTag
settings-submenu
Description
Adds a clickable text that opens a submenu in Mod Settings
Only useable inside of Mods settings
Components and Properties
ClickableText
click-event
event-click
event
Event that will fire on click.
default-color
color string
Default color of text.
highlight-color
color string
Color when this text has a pointer over it.
on-click
UIAction
UIAction that will fire on click.
Graphic
raycast-padding
Vector4
Padding to be applied to the masking, ordered counter-clockwise (left, bottom, right, top).
raycast-target
raycast
bool
Whether or not this graphic be considered a target for raycasting.
LocalizedTextMeshProUGUI
maintain-text-alignment
bool
Whether or not to maintain the text alignment regardless of the reading direction of the current language.
text-key
localization key
The localization key for the text to display.
RectTransform
active
bool
Whether or not the GameObject this RectTransform belongs to is active.
anchor-max
Vector2
The anchor point for the upper right corner of the rectangle defined as a fraction of the size of the parent rectangle.
anchor-max-x
float
The normalized x position in the parent RectTransform that the upper right corner is anchored to.
anchor-max-y
float
The normalized y position in the parent RectTransform that the upper right corner is anchored to.
anchor-min
Vector2
The anchor point for the lower left corner of the rectangle defined as a fraction of the size of the parent rectangle.
anchor-min-x
float
The normalized x position in the parent RectTransform that the lower left corner is anchored to.
anchor-min-y
float
The normalized y position in the parent RectTransform that the lower left corner is anchored to.
anchored-position
Vector2
Position of the rectangle’s pivot point relative to the anchors.
anchored-position-x
anchor-pos-x
float
The x position of the pivot of this RectTransform relative to the anchor reference point.
anchored-position-y
anchor-pos-y
float
The y position of the pivot of this RectTransform relative to the anchor reference point.
hover-hint
string
Text that will appear when a pointer hovers over.
hover-hint-key
localization key
The localization key used for the hover hint text.
local-scale
scale
Vector3
Scale factor applied to the object in the X, Y and Z dimensions.
name
string
The name of the GameObject.
pivot
Vector2
The location around which the rectangle rotates.
pivot-x
float
Normalized x position to rotate around.
pivot-y
float
Normalized y position to rotate around.
size-delta
Vector2
The size added to the rectangle defined by the anchors.
size-delta-x
float
The width added to the rectangle defined by the anchors.
size-delta-y
float
The height added to the rectangle defined by the anchors.
TextMeshProUGUI
font-align
align
TextAlignmentOptions
How to align the text.
all-uppercase
bool
Whether or not to make the text all uppercase.
bold
bool
Whether or not text is bold.
font-color
color
color string
Color of font.
face-color
color string
Face color of font.
font-size
float
Size of font.
italics
bool
Whether or not to italicize text.
outline-color
color string
Outline color of font.
outline-width
float
Width of font outline.
overflow-mode
TextOverflowModes
How to handle text overflow.
rich-text
bool
Whether or not to enable rich text.
strikethrough
bool
Whether or not to strikethrough text.
text
string
Text to display.
underlined
bool
Whether or not to underline text.
word-wrapping
bool
Whether or not to wrap text.
Example Usage
example.bsml
<scrollable-settings-container>
<settings-submenu text="Secret info" hover-hint="much secret">
<settings-container>
<vertical spacing="4" vertical-fit="PreferredSize">
<horizontal pad-left="5" pad-right="5" horizontal-fit="PreferredSize">
<text font-size="6" text="Imagine Beat Saber having"/>
</horizontal>
<horizontal pad-left="-45" horizontal-fit="PreferredSize">
<dropdown-list-setting value="list-choice" text="" choices="list-options"></dropdown-list-setting>
</horizontal>
<horizontal horizontal-fit="PreferredSize">
<text font-size="5" text="degrees levels!"/>
</horizontal>
<horizontal pad-top="5" horizontal-fit="PreferredSize">
<button text="Back" click-event="back" />
</horizontal>
</vertical>
</settings-container>
</settings-submenu>
</scrollable-settings-container>
using System.Collections.Generic;
using System.Linq;
using BeatSaberMarkupLanguage.Attributes;
using BeatSaberMarkupLanguage.Parser;
public class ExampleSettingsController : PersistentSingleton<ExampleSettingsController>
{
[UIValue("list-options")]
private List<object> options = new object[] { "360", "90" }.ToList();
[UIValue("list-choice")]
private string listChoice = "360";
}
This example shows how you can display a submenu and some interactable content in the Mods settings
panel.