# MenuOption

# Description

MenuOption is a menu option class used to create and manage various options in menus, such as checkboxes, sliders, hotkeys, etc. It is typically created and accessed through the Menu class methods.

# How to Use

Menu* mainMenu = Menu::Create("Main Menu");
MenuOption* enableOption = mainMenu->AddCheckBox("Enable", true);

if (enableOption->GetBoolean()) {
    // Code to execute when the option is enabled...
}

# GetBoolean

bool GetBoolean()

Gets the boolean value of the menu option.

MenuOption* useQ = mainMenu->AddCheckBox("Use Q", true);
if (useQ->GetBoolean()) {
    // Code to execute when the "Use Q" option is enabled...
}

# GetValue

int GetValue()

Gets the integer value of the menu option, typically used for sliders and list options.

MenuOption* damageSlider = mainMenu->AddSlider("Damage Prediction", 50, 0, 100);
int damagePercent = damageSlider->GetValue();

# SetBoolean

void SetBoolean(bool Value)

Sets the boolean value of the menu option.

MenuOption* useQ = mainMenu->AddCheckBox("Use Q", false);
// Enable the option based on conditions
if (ObjectManager::Player()->GetMana() > 100) {
    useQ->SetBoolean(true);
}

# SetValue

void SetValue(int Value)

Sets the integer value of the menu option.

MenuOption* damageSlider = mainMenu->AddSlider("Damage Prediction", 50, 0, 100);
// Adjust the value based on game state
damageSlider->SetValue(75);

# SetMenuColor

void SetMenuColor(int color)

Sets the color of the menu option.

MenuOption* dangerousOption = mainMenu->AddCheckBox("Dangerous Abilities", true);
dangerousOption->SetMenuColor(MAKE_COLOR(255, 0, 0, 255)); // Red color

# AddToolTip

void AddToolTip(const char* ToolTip)

Adds a tooltip to the menu option.

MenuOption* useQ = mainMenu->AddCheckBox("Use Q", true);
useQ->AddToolTip("When enabled, Q ability will be used automatically");

# Permashow

void Permashow(bool enabled = true)

Sets whether this option should be permanently displayed in the game.

MenuOption* comboKey = mainMenu->AddHotKey("Combo Key", 0x20); // Space key
comboKey->Permashow(); // Permanently display this hotkey status in the game

MenuOption* AddCheckBox(const char* Name, bool Boolean)

Adds a checkbox option to the menu.

MenuOption* enableFeature = mainMenu->AddCheckBox("Enable Feature", true);

MenuOption* AddSlider(const char* Name, int Value, int MinValue, int MaxValue)

Adds a slider option to the menu.

MenuOption* rangeSlider = mainMenu->AddSlider("Range", 600, 300, 1000);

MenuOption* AddHotKey(const char* Name, int DefaultKey)

Adds a hotkey option to the menu.

MenuOption* comboKey = mainMenu->AddHotKey("Combo Key", 0x20); // Space key

MenuOption* AddToggleKey(const char* Name, int DefaultKey, bool Boolean)

Adds a toggle key option to the menu.

MenuOption* farmToggle = mainMenu->AddToggleKey("Farm Mode", 0x41, false); // A key

MenuOption* AddStringList(const char* Name, int DefaultIdx, std::vector<const char*> const& Elements)

Adds a string list option to the menu.

std::vector<const char*> modes = { "Smart", "Always On", "Disabled" };
MenuOption* comboMode = mainMenu->AddStringList("Combo Mode", 0, modes);

MenuOption* AddColorPick(const char* Name, bool Boolean, int DefaultColor)

Adds a color picker option to the menu.

MenuOption* drawColor = mainMenu->AddColorPick("Draw Color", true, MAKE_COLOR(0, 255, 0, 255));