BeardLib
  • Home
  • Things to Know
    • Adding Files
    • ScriptData
  • Modules
    • Achievements
    • Add Files
    • Adding your own modules
    • AssetUpdates (Mod Updates)
    • Classes
    • Contact (contractors)
    • Crime Spree Mission
    • DLC
    • Dependencies
    • Elements
    • Global Value (Tagging weapons/etc)
    • Heist Music
      • Stealth Music
    • Hooks
    • Interactions
    • Keybind
    • Level
    • Localization
    • Mask Material
    • Mask Pattern
    • Mask
    • Melee
    • Menu Music
    • Menu
    • ModuleBase
    • Narrative
    • Options
    • Package
    • Script Mods (Replace script data)
    • Sounds
    • Tweak Modify
    • Weapon Mod
    • Weapon Skin
    • Weapon
    • XML
  • API
    • BeardLib Class
    • Constants
    • File Manager
    • Frameworks
    • Hooks
    • ModCore
    • Package Manager
    • Special Hook IDs
  • Utilities
    • FileIO
    • Input
    • Main
    • Math
    • Menu Helper Plus
    • Path
    • String
    • Sync
    • Table
    • Tweak Data Helper
    • XML
    • YAML
  • MenuUI
    • ComboBox
    • ImageButton
    • Item
    • Items
    • Keybind
    • Menus
    • Slider
    • TextBox
    • Toggle
Powered by GitBook
On this page
  • Keybind
  • Creation
  • Parameters
  • Functions

Was this helpful?

Edit on GitHub
  1. MenuUI

Keybind

Updated for version 3.36.

It's recommended to first read about the base item before reading about other items https://luffyyy.gitbook.io/beardlib/menuui/menuui-item

Keybind

Creation

MyRandomMenu:Keybind({
    name = "MyKeybind",
    text = "Keybind item",
    value = "f1",
    on_callback = ClassClbk(self, "MyClbk")
})

Parameters

Parameter
Return Type
Description

value

String

The keybind key. Defaults to none

supports_keyboard

Boolean

Should the item listen to the keyboard? Defaults to true and the value can be inherited

supports_mouse

Boolean

Should the item listen to the mouse? Defaults to false and the value can be inherited

Functions

Get

Function
Return Type
Description

Value()

String

Returns the keybind as a string

GetKeyBind()

Idstring

Returns the keybind but in idstring form

Set

Function
Description

SetValue(String value, Boolean run_callback)

Sets the value of the item. value is the keybind key and run_callback decides whether to run the callback after the value is set

PreviousItemsNextMenus

Last updated 3 years ago

Was this helpful?