Drawing in NTT

Color functions

Text drawing
Text drawing

State:



Measurement:

Drawing:

Non-standard:

draw_text_shadow(x, y, string)

Draws text with a simple shadow (black text at +1,0; 0,+1; +1,+1).

Converts hashtags (#) to new lines.

draw_text_nt(x, y, string)

Draws text with tags!

  • @s: Silver
  • @d: Dark gray
  • @y: Yellow
  • @r: Red
  • @b: Blue
  • @g: Green
  • @p: Purple
  • @w: White
  • @q: Cursed/shaky text
  • @(...), @0(...), @9(...):
    You can do @(sprAmmo) or @(sprAmmo:1) to draw sprites.

    @0 .. @9 indicates how much space the sprite takes up in text.

    This is also used for some special things:

    • @(keysmall:action):
      Displays the current key binding for an action.

      Possible actions are:

      • fire
      • spec
      • pick
      • swap
      • nort
      • sout
      • east
      • west
    • @(keysmall2:action):
      Displays the alternate key binding for an action.
    • @(butsmall:action):
      Displays the current gamepad button binding for an action.
    • @(butsmall2:action):
      Displays the alternate gamepad button binding for an action.
    • @(butbig:action):
      Like above, but for big buttons.
    • @(butbig2:action):
      Like above, but for big buttons and alternate binding.
    • @(color:value):
      Applies a custom color.

      value can be either a numeric BGR color in GameMaker format (such as from make_color_rgb) or a #RrGgBb hex.

draw_tooltip(x, y, string)

Draws a tooltip in a signature balloon above the given point.

Same tag support as draw_text_nt.

State





Projection
Shapes
Shapes

Non-standard:

draw_rect_ext(x, y, width, height, color, alpha)

Draws a colored filled rectangle using a sprite.

Sprites
Backgrounds

Backgrounds aren't real in current GameMaker versions so these just draw the first frame of a sprite.

Surfaces
Primitives

Texture/UV functions:

Matrices
Visibility API
Visibility API

These let you change whether the subsequently drawn graphics will be visible to specific player(s).

These were intended to be slightly easier to work with than using dp_player_is_viewed_nonsync.

draw_set_visible(player, visible)
draw_set_visible_all(visible)
draw_get_visible(player)​
draw_set_visible_bbox(player, left, top, right, bottom)
draw_set_visible_bbox_all(left, top, right, bottom)
draw_set_visible_bbox(player, left, top, right, bottom)

Enables or disables drawing based on whether the given player can see any portion of the given rectangle.

draw_set_visible_bbox_all(left, top, right, bottom)

Enables or disables drawing based on whether the local player can see any portion of the given rectangle.