Skip to content

Client API

gdr edited this page Aug 30, 2024 · 2 revisions

Explanation

Client API Module Client

API, that can be used only on the client.
You can get API in your own script with Framework:

repeat task.wait() until _G.GFramework
local Framework = require(_G.GFramework)
local API = Framework:GetAPI()

Client API has many useful methods:

ConvertUDim meta

Arguments: Mode: "Scale" | "Offset", Udim: UDim2.
Converts Offset to Scale and Scale to Offset.

GetFrameMousePosition meta

Arguments: Gui: ScreenGui, Frame: GuiObject, Offset: {X: number, Y: number}?.
Returns UDim2 of mouse position.

GetTopBar meta

Arguments: None.
Returns TopBar Reference, yields until it is created.

TopBarEnabled meta

Arguments: Enabled: boolean.
Enables/disabled TopBar Reference.

Notify meta

Arguments: Type: "Warn" | "Error" | "Notify", Text: string, Timer: number, OnInteract: function.
Creates Notify Instance.

Type - Sound of notification.
Text - Text of notification.
Timer - Number of seconds notification will live.
OnInteract - If specified, will make Notify Instance clickable.

CreateHoverInfo meta

Arguments: Object: GuiObject, Text: string.
Creates hover instance. If mouse will be hovered on Object, info will be displayed.
Returns HoverData.

GetMarkdown meta

Arguments: Button: TextButton.
Returns MarkdownData.

CreateMarkdown meta

Arguments: Button: TextButton, OnActivated: function(State: boolean), Info: string?.
Creates markdown from Button.
Returns MarkdownData.

CreateWindow meta

Arguments: Title: string, Data: Dictionary.
Creates Window Instance.

Title - Name of the Window Instance.
Data - WindowData.

CreateInputWindow meta

Arguments: Title: string, Data: Dictionary.
Creates Input Window Instance.

Title - Name of the Input Window Instance.
Data - InputWindowData.

CloseWindow meta

Arguments: Title: string.
Closes windows with the same titles.

Clear meta

Arguments: None.
Clears all of the windows.