# Linoria Modded

## Getting Started

{% code lineNumbers="true" %}

```lua
local repo = 'https://raw.githubusercontent.com/wally-rblx/LinoriaLib/main/'
local Library = loadstring(game:HttpGet("https://raw.githubusercontent.com/NatsuDevs/Linoria-Rewrite-Modded-/main/Lib.lua"))()
local ThemeManager = loadstring(game:HttpGet(repo .. 'addons/ThemeManager.lua'))()
local SaveManager = loadstring(game:HttpGet(repo .. 'addons/SaveManager.lua'))()
```

{% endcode %}

## Creating Window

{% code lineNumbers="true" %}

```lua
local Window = Library:CreateWindow({
    Title = 'Your Window Name Goes Here',
    Center = true, -- Set Center to true if you want the menu to appear in the center
    AutoShow = true, -- Set AutoShow to true if you want the menu to appear when it is created
})
```

{% endcode %}

## Creating Tab

{% code lineNumbers="true" %}

```lua
local Tabs = {
    Main = Window:AddTab('Example'), -- If you want to Create more tab, just copy this then change Name
    ['UI Settings'] = Window:AddTab('Settings'), -- This is settings tab, you can delete this if you want
}
```

{% endcode %}

## Creating Some Group Box&#x20;

{% code title="For Left Group Box, Do This" lineNumbers="true" %}

```lua
local LeftGroupBox = Tabs.Main:AddLeftGroupbox('Stuffs') -- Change the Main to the tab name
```

{% endcode %}

{% code title="For Right Group Box, Do This" lineNumbers="true" %}

```lua
local RightGroupBox = Tabs.Main:AddRightGroupbox('Stuffs 2') -- Change the Main to the tab name
```

{% endcode %}

## Creating Toggles

{% code lineNumbers="true" %}

```lua
LeftGroupBox:AddToggle('FlagName', { -- Flag Name goes here
    Text = 'Toggle Text', -- Toggle Text
    Default = false, -- Default value (true / false)
    Tooltip = 'This is a tooltip', -- Information shown when you hover over the toggle
})
```

{% endcode %}

{% code lineNumbers="true" %}

```lua
-- Toggles is a table added to getgenv() by the library
-- You index Toggles with the specified index, in this case it is 'MyToggle'
-- To get the state of the toggle you do toggle.Value

-- Calls the passed function when the toggle is updated
Toggles.FlagName:OnChanged(function() -- Flag Name
    -- here we get our toggle object & then get its value
    print('FlagName changed to:', Toggles.FlagName.Value) -- Flag Name
end)

-- Change Toggle Info
Toggles.FlagName:SetValue(false) -- true or false
```

{% endcode %}

## Creating Button, Sub Button

<pre class="language-lua" data-line-numbers><code class="lang-lua"><strong>-- Button
</strong><strong>local MyButton = LeftGroupBox:AddButton('Button', function()
</strong>    print('You clicked a button!')
end)

-- Sub Button
local MyButton2 = MyButton:AddButton('Sub button', function()
    print('You clicked a sub button!')
end)
</code></pre>

### You can add Tooltip on a button too!

{% code lineNumbers="true" %}

```lua
-- Works with Button and Sub Button
MyButton:AddTooltip('This is a button')
MyButton2:AddTooltip('This is a sub button')
```

{% endcode %}

## Creating Label

{% code lineNumbers="true" %}

```lua
-- Easy create
LeftGroupBox:AddLabel('This is a label')
-- You can create this too
LeftGroupBox:AddLabel('This is a label\n\nwhich wraps its text!', true)
```

{% endcode %}

## Creating Slider

{% code lineNumbers="true" %}

```lua
LeftGroupBox:AddSlider('FlagName', {
    Text = 'Slider Text',

    -- Text, Default, Min, Max, Rounding must be specified.
    -- Rounding is the number of decimal places for precision.

    -- Example:
    -- Rounding 0 - 5
    -- Rounding 1 - 5.1
    -- Rounding 2 - 5.15
    -- Rounding 3 - 5.155

    Default = 0,
    Min = 0,
    Max = 5,
    Rounding = 1,

    Compact = false, -- If set to true, then it will hide the label
})
```

{% endcode %}

{% code lineNumbers="true" %}

```lua
local Number = Options.FlagName.Value
Options.FlagName:OnChanged(function()
    print('FlagName was changed! New value:', Options.FlagName.Value)
end)

-- You can change Slider value too
Options.FlagName:SetValue(3)
```

{% endcode %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://linoria-rewrite-modded.gitbook.io/linoria-modded/linoria-modded.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
