Skip to content

overview

These functions allow you to access the drawing functions inside of CS:GO/TF2.

All table color parameters accept arguments of r, g, b and a as fields part of the table.

All these functions must be called inside the OnPaint callback and they are NOT streamproof.

moonlight.visuals.paint.string

Parameters

  • number x
  • number y
  • number id
  • table color
  • string text

Remarks

  • The id parameter requires the font ID that you can get by adding a font from moonlight.imgui.add_font or moonlight.visuals.add_font.

moonlight.visuals.paint.add_font

Parameters

  • string name
  • number size
  • number weight
  • number blur
  • number lines
  • number flags

Returns

  • number - The ID of the font.

moonlight.visuals.paint.line

Parameters

  • number x
  • number y
  • number x2
  • number y2

moonlight.visuals.paint.box

Parameters

  • number x
  • number y
  • number width
  • number height
  • table color

moonlight.visuals.paint.circle

Parameters

  • number x
  • number y
  • number radius
  • number segments
  • table color

moonlight.visuals.paint.polygon

Parameters

  • number count
  • number x
  • number y
  • number texture_x
  • number texture_y
  • boolean clip
  • table color