Controls plugin dependency
The Controls dependency has functions for common UI controls for use across plugins. Originally developed for the plugin manager, and now available for everyone to use for a consistent style.
Demo window
In the plugin settings for Controls you can enable the demo window to see all available controls in a single window.

Getting started
To get started with the Controls plugin, add a dependency to it in your info.toml:
[script]
dependencies = [ "Controls" ]
Tags
Tags are small colored boxes with some text in it, usually to signal to the user that some content has some status.

Controls::Tag
Adds a tag with an optional color at the current cursor position to the UI. The default color is dark.
Parameters:
const string &in textThe text within the tag.const vec4 &in color = Controls::COLOR_DEFAULTThe color of the tag.
Instead of passing colors to color, you can also use one of the following functions:
Controls::TagPrimaryControls::TagInfoControls::TagLinkControls::TagSuccessControls::TagWarningControls::TagDanger
Controls::DrawTag
Draws a tag to the screen at a given position. This does not count as a UI control.
Parameters:
const vec2 &in posorconst vec4 &in rectThe position to draw the tag at. If avec2is passed rather than avec4, the width and height will be calculated by measuring the text.const string &in textThe text within the tag.const vec4 &in color = COLOR_DEFAULTThe color of the tag.
Returns: vec4 rectangle at which the tag is drawn at.
Frames
Frames are colored containers for larger portions of text and optional content. This could be used as a warning, error, or informational indicator, for example.

Controls::Frame
Adds a frame with a line of text and an optional color to the UI.
Parameters
const string &in textThe line of text to display.bool requireInput = falseWhether to allow the child to receive input from the user. If this isfalse, thenUI::WindowFlags::NoInputswill be passed to the child control.const vec4 &in color = COLOR_DEFAULTThe color of the frame.
Instead of passing colors to color, you can also use one of the following functions:
Controls::FramePrimaryControls::FrameInfoControls::FrameLinkControls::FrameSuccessControls::FrameWarningControls::FrameDanger
Controls::BeginFrame
Begins a frame with an optional color. Can be used instead of Controls::Frame if you wanted to add more than just a line of text. Remember to call Controls::EndFrame to end the frame.
Parameters:
const string &in textThe name of the child control and the first line of text.bool requireInput = falseWhether to allow the child to receive input from the user. If this isfalse, thenUI::WindowFlags::NoInputswill be passed to the child control.const vec4 &in color = COLOR_DEFAULTThe color of the frame.
Instead of passing colors to color, you can also use one of the following functions:
Controls::BeginFramePrimaryControls::BeginFrameInfoControls::BeginFrameLinkControls::BeginFrameSuccessControls::BeginFrameWarningControls::BeginFrameDanger
Controls::EndFrame
Ends a previously begun frame using Controls::BeginFrame or any of the colored versions.