🚀
Maclib UI Library
  • Information
    • Welcome
    • Documentation Formatting
    • Miscellaneous
  • Getting Started
    • Loading Maclib
      • Creating a window
        • Adding a Global Setting
        • Displaying a notification
        • Prompting a dialog
        • Creating a tab group
          • Adding tabs
            • Adding sections
              • Button
              • Input
              • Slider
              • Toggle
              • Keybind
              • Colorpicker
              • Dropdown
              • Header
              • Paragraph
              • Label
              • Sub Label
              • Divider
              • Spacer
Powered by GitBook
On this page

Was this helpful?

  1. Getting Started
  2. Loading Maclib

Creating a window

After you have defined the module, you must load a new window.

local Window = MacLib:Window({
  Title <string>
  Subtitle <string>
  Size <UDim2>
  DragStyle <number: 1, 2> -- 1: Uses a move icon to drag, ideal for PC. 2: Uses the entire UI to drag, ideal for Mobile.
  DisabledWindowControls <table: "Exit", "Minimize">
  ShowUserInfo <boolean>
  Keybind <enum>
  AcrylicBlur <boolean> -- Can be detected.
})

Functions

:Unload() -- Destroy the window
.onUnloaded(function(): void) -- Called before the window is unloaded / closed

:SetState(<boolean>) -- Set window visibility
:GetState(: boolean) -- Get window visibility

:SetNotificationsState(<boolean>) -- Set notification visibility
:GetNotificationsState(: boolean) -- Get notification visibility

:SetAcrylicBlurState(<boolean>) -- Set UI Blur enabled
:GetAcrylicBlurState(: boolean) -- Get UI Blur enabled

:SetUserInfoState(<boolean>) -- Show or redact user info
:GetUserInfoState(: boolean) -- Get User Info Visibility

:SetKeybind(<enum>) -- Set window visibility keybind

:SetSize(<UDim2>) -- Sets the UI size
:GetSize(: UDim2) -- Returns the current UI Size

:SetScale(<number>) -- Sets the scale of the UI, 1 is the 100& scale (default), 1.5 is 150% scale, 2 is 200%, you get it. ( This uses the UIScale instance, which has several engine bugs and can cause visual issues with certain elements.)
:GetScale(: number) -- Returns the current scale of the UI

:UpdateTitle(<string>)
:UpdateSubtitle(<string>)

.Settings : table -- Not everything may be updated, but Callback should be correct.

Example

local Window = MacLib:Window({
    Title = "Kuzu Hub",
    Subtitle = "Paid | V3.12",
    Size = UDim2.fromOffset(868, 650),
    DragStyle = 1,
    DisabledWindowControls = {},
    ShowUserInfo = true,
    Keybind = Enum.KeyCode.RightControl,
    AcrylicBlur = true,
})
PreviousLoading MaclibNextAdding a Global Setting

Last updated 7 months ago

Was this helpful?