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
  • adapter
  • frame_time
  • time
  • scale
  • display
  • textures
  • fonts
  • shaders
  • surface
Export as PDF
  1. API
  2. Instances

Draw

Previousevents_tNextTypes

Last updated 3 months ago

Usage: draw.{func_or_field}

This table describes the rendering system of the software.

All types and enums described in the child sections must be prefixed with draw.. This is done so specific types are not confused with others, such as the separate color types present in rendering and the game.

adapter

FieldRead only

Type:

Rendering adapter.


frame_time

FieldRead only

Type: float

Rendering frame time. An alias to .


time

FieldRead only

Type: float


scale

FieldRead only

Type: float

Global DPI scale.


display

FieldRead only


textures

FieldRead only

Built-in textures:

  • gui_loading: loading spinner

  • gui_user_avatar: current user's profile picture. May be nil if you don't have any avatar set

  • gui_icon_up: up chevron

  • gui_icon_down: down chevron

  • gui_icon_copy: copy icon

  • gui_icon_paste: paste icon

  • gui_icon_add: add icon

  • gui_icon_search: search icon

  • gui_icon_settings: settings icon (a cogwheel)

  • gui_icon_bug: bug icon

  • gui_icon_key.N: keyboard/mouse key icons. Replace N with the char code of a required button

  • icon_rage: RAGE tab icon

  • icon_legit: LEGIT tab icon

  • icon_visuals: VISUALS tab icon

  • icon_misc: MISC tab icon

  • icon_scripts: LUA tab icon

  • icon_skins: SKINS tab icon

  • icon_cloud: cloud icon

  • icon_file: file icon

  • icon_refresh: refresh icon

  • icon_save: save icon

  • icon_configs: "Configs" popup icon

  • icon_keys: keyboard icon

  • icon_info: "About" popup icon

  • icon_close: close icon (cross)

  • icon_load: load icon

  • icon_import: import icon

  • icon_export: export icon

  • icon_delete: delete icon

  • icon_autoload: "Autoload" icon

  • icon_allow_insecure: "Allow insecure" icon

  • icon_cloud_upd: cloud update icon

  • player_texture: player preview texture


fonts

FieldRead only

Built-in fonts:

  • gui_debug: Verdana, 13px

  • gui_title: Figtree ExtraBold, 23px

  • gui_main: Figtree Medium, 14px

  • gui_main_shadow: Figree Medium, 14px, with shadow

  • gui_main_fb: Segoe UI Semibold, 14px

  • gui_bold: Figtree ExtraBold, 14px

  • gui_bold_fb: Segoe UI Black, 14px

  • gui_semi_bold: Figtree SemiBold, 14px

  • gui_semi_bold_fb: Segoe UI Bold, 14px


shaders

FieldRead only

Build-in shaders:

  • blur_f: gaussian blur shader


surface

FieldRead only

The layer you can render on.

Time, in seconds. An alias to .

Type:

Display area size (viewport dimensions). will return exactly the same values. Overriding any of this vector's values will lead to an undefined behavior.

Type:

A string to map of all managed textures. You can query and push textures with custom IDs. When you add a texture to this map, it will be automatically destroyed and recreated when required (such as when DX11 device gets lost).

Type:

A string to map of all managed fonts. You can query and push fonts with custom IDs. When you add a font to this map, it will be automatically destroyed and recreated when required (such as when DX11 device gets lost).

Type:

A string to map of all managed shader. You can query and push shader with custom IDs. When you add a shader to this map, it will be automatically destroyed and recreated when required (such as when DX11 device gets lost).

Type:

⚙️
✏️
vec2
accessor<texture>
texture
accessor<font_base>
font_base
accessor<shader>
shader
layer
adapter
global_vars_t.frame_time
global_vars_t.real_time
cengine_client:get_screen_size