Lua API
  • 🔎Overview
  • Introduction
    • 🚀Creating scripts
      • 🧠First Steps
      • 🖥️Adding UI
      • 📚Creating Libraries
  • API
    • 🌐Global Functions
    • ⚙️Instances
      • 🔢Math
      • ☎️Events
        • event_t
      • 🎮Game
        • global_vars_t
        • cengine_client
          • cnet_chan
        • ccsgo_input
        • cinput_system
        • cgame_ui_funcs
        • ccvar
          • convar
      • 🕹️Mods
        • events_t
      • ✏️Draw
        • ⚙️Types
          • ⚙️rect
          • ⚙️vec2
          • ⚙️color
          • ⚙️accessor
        • 🖥️Adapter
        • ✏️Layer
          • outline_mode
          • rounding
          • glow_parts
          • text_params
            • text_alignment
          • shadow_dir
          • command
            • render_mode
        • 🖼️Managed
          • 🖼️texture
            • svg_texture
            • animated_texture
          • 🖼️shader
          • ™️font_base
            • font
            • font_gdi
            • glyph_t
            • font_flags
      • 🙋Entities
        • entity_list_t
          • entity_entry_t
        • base_entity
          • schema_accessor_t
          • cs2_weapon_base_gun
          • cs2_player_pawn
          • cs2_player_controller
          • cs2_weapon_base
          • cs2_grenade_projectile
        • ccsweapon_base_vdata
          • cfiring_mode
        • chandle
        • csweapon_mode
        • csweapon_type
        • weapon_id
        • csweapon_category
        • observer_mode_t
      • 🖥️Gui
        • ⚙️Types
          • ⚙️bits
          • ⚙️control_id
        • context
          • user_t
        • context_input
          • mouse_button
        • notification_system
          • notification
        • control
          • control_type
          • value_param
          • checkbox
          • slider
          • label
          • selectable
          • button
          • color_picker
          • spacer
          • text_input
          • combo_box
          • image
        • container
          • control_container
            • layout
            • group
      • ⚙️Utils
    • ⚙️Types
      • ⚙️ptr
      • ⚙️ref_holder_t
      • ⚙️vector
      • ⚙️vector4d
      • 🎮veccolor
      • 🎮color
      • 🎮cview_setup
      • 🎮cuser_cmd
      • 🎮game_event_t
    • 🟰Enums
      • 🟰client_frame_stage
      • 🟰input_bit_mask
Powered by GitBook

© 2025 - FATALITY

On this page
  • get
  • get_direct
  • set
  • get_hotkey_state
  • disable_hotkeys
Export as PDF
  1. API
  2. Instances
  3. Gui
  4. control

value_param

This type represents a value data used by some control types.

Note, that this part: <type> is used to designate what exact type the instance of this type is holding. For example, when it says value_param<bool>, it means that get will return a bool value, and set will accept only the type bool as it's val parameter.

get

Returns the value.

Arguments

None.

Returns

Type

Description

<type>

Value.

Example

ctrl:get_value():get();

get_direct

Returns the value disrgarding any active keybinds.

Arguments

None.

Returns

Type

Description

<type>

Value.

Example

ctrl:get_value():get_direct();

set

Sets the value.

It is advised to use set_value method of the control, if any.

Arguments

Name

Type

Description

val

<type>

Value.

Returns

Nothing.

Example

ctrl:get_value():set(123);

get_hotkey_state

Returns true if there's any active hotkeys.

Arguments

None.

Returns

Type

Description

bool

true if any hotkey is active.

Example

if ctrl:get_value():get_hotkey_state() then
    -- ...
end

disable_hotkeys

Disables all active hotkeys. This allows you to override the value.

Arguments

None.

Returns

Nothing.

Example

ctrl:get_value():disable_hotkeys();
Previouscontrol_typeNextcheckbox

Last updated 3 months ago

⚙️
🖥️