API Reference
This documentation is a work in progress. UI scripting is a new feature, and additional content is still being added.
This guide is for Nighty 2.4 Beta only.
If you haven't updated yet, you can download it from our Discord server at Get Links.
UI Scripting allows you to use the Nighty scripting engine to write Python scripts that dynamically update Nighty's user interface.
To get started, navigate to the Tab section.
Note: The content below is dynamic, meaning you'll be directed here from other sections of the documentation when specific attributes or parameters are referenced.
Shared Attributes & Parameters
A collection of commonly used properties that apply to multiple UI components, ensuring consistent styling and behavior across your layouts.
Gap
Sets the spacing between child elements. Accepts a value from 0
to 10
, where 0
removes the gap and 10
applies the maximum spacing.
Examples:
gap=0
gap=1
gap=6
gap=10
Margin
The margin
option adds extra spacing around or inside a UI element. It accepts Tailwind CSS margin classes ranging from 0
to 10
.
Examples:
margin="m-4"
: Adds a margin of 4 units to all sides.margin="m-0"
: Removes all margins.margin="mr-6"
: Adds a margin of 6 units to the right side.margin="mx-3"
: Adds a margin of 3 units to both the left and right sides.
Note: Not all prefixes are available!
All available prefixes: m- mt- mr- mb- ml- mx- my-
Visible
Controls the visibility of the UI element. When set to True
, the element is displayed; when set to False
, the element is hidden from the UI.
Examples:
visible=True
visible=False
Last updated