Matthias
  • 👋Welcome
  • 👶Getting started
  • 📞Callbacks
  • 🕑Variables
    • 🎯Getter functions
      • 🙏Fields available for getting
  • 🧑‍🦯Visuals
    • ◻️Shapes
      • 📏Line
      • ⚪Circle
      • ⬜Rectangle
    • 📸Media
      • 🖼️Image
      • 🔡Text
    • 🔔Notifications
  • ☁️Miscellaneous
    • 📲Image memory management
Powered by GitBook
On this page
  1. Visuals
  2. Media

Text

To display Text in Matthias you will have to provide the following arguments:

  • Position of the text: [f32; 2]

  • Size of the font: [f32; 2]

  • Text: String

  • Color of the text: [u8; 4]

--Position (x, y)
position = {500., 500.}

--Font size
size = 30.

--Text color (r, g, b, a(opacity))
color = {255, 0, 0, 255}

--The actual text we are going to display
text = "Hello world!"

--Draw text on draw
function OnDraw()
    draw_text(position, size, text, color)
end
PreviousImageNextNotifications
🧑‍🦯
📸
🔡