Skip to main content

Draw

Menu.Draw(Type : String, Properties : Table)

-- Returns an instance of the specified class 'Type', with the given properties (optional). Appends the render to the Menu.Renders table and increases the Menu's ZIndex by 1.
-- Note: the FontFace property must be a table, Menu.Fonts return the default fonts used by the menu, the font and textsize will be extracted from the table. TextSize can be overwritten by passing in the TextSize property.
-- For Example: to use a custom font that is not in the Menu.Fonts table, you can pass in: { [1] = Font, [2] = TextSize }

Remove

Menu.Remove(Render : Instance)

-- Removes a render and it's descendants from the Menu.Renders table, then destroys the instance.
-- This is the proper way to destroy renders created by Menu.Draw.

ShadeColor

Menu.ShadeColor(Color : Color3, Red : Number, Green : Number, Blue : Number)

-- Returns a new Color3, the result of the base Color's R/G/B values multiplied by the new R/G/B values

GetDescendants

Menu.GetDescendants(Render : Instance)

-- Returns a table of the render's descendants and the render itself at idx 1 of the table.

ToRichText

Menu.ToRichText(Text : String, Color : Color3)

-- // Usage Example

Menu.ToRichText('Hello <font color="rgb(#s)">this is red</font>', Color3.fromRGB(255, 0, 0))

-- Returns a formatted string for Rich Text.

Tween

Menu.Tween(Render : Instance, TweenInfo : TweenInfo, Properties : Table)

-- // Usage Example

Menu.Tween(Frame, TweenInfo.new(1, Enum.EasingStyle.Linear), { Position = UDim2.new(1, 0, 1, 0) })

-- Tweens a render with the given data. Returns the tween object back.

ImportImage

Menu.ImportImage(Name : String, Data : String)

-- Returns an assetid of the image. Data is a base64 encoded string of the Image.

ImportFont

Menu.ImportFont(Name : String, Data : String, WeightNumber : Number, WeightEnum : Enum, StyleEnum : Enum)

-- Returns a Font object from the given data. Data is a base64 encoded string of the Font's ttf file.
-- Note: Only Name and Data are required. WeightNumber falls back to 400. WeightEnum falls back to Regular. StyleEnum falls back to Normal.

GetTextBounds

Menu.GetTextBounds(Text : String, FontFace : Table, TextSize : Number)

-- Returns the TextBounds (Vector2) of a text from the given data.
-- Note: FontFace should be a table [for reference check the Draw function's notes to understand]. TextSize overwrites the FontFace's textsize and is optional.