Logo
  • Features
  • Educators
  • What's New
  • Blog
  • Showcase
  • About us
  • Contact
Try it now!
How To Create Easy Text UI Without Clones Using Canvas V2 Extension?
💡

How To Create Easy Text UI Without Clones Using Canvas V2 Extension?

✍️
This best practice is created by Outrunfungus43 from Gandi IDE community.
image

Outrunfungus43 Cocrea: https://cocrea.world/@Outrunfungus43

Outrunfungus43 Dulst: https://dulst.com/morphapeed

Canvas V2 Is similar to the pen tool. However, anything made with it has a kind of layer system allowing you to use it for UI elements for example showing the name of lots of clones. (I used this in devil corp. If you saw that from Scratch Game Jam 2, look at the provided image for more info.)

image
⚠️
WARNING: Position 0, 0 for canvas is the top left while for Scratch its the center. There's an easy fix for this use "translate scratch x/y to canvas".

I will post the steps separately so I can include images for all those "visual learners" (me) (it's easy to copy an image).

Step 1: First, we need to display some text. This will forever reset all text. Then, it will create a msg based on mouse x pos. If the msg changes in game, you know it’s working. (make sure you change the color. It defaults to white.)

image

Step 2: The text is in game in center position. However, the actual msg has a bit of offset. You can fix this by offsetting itself right based on half the length of whatever you have it displaying.

image

Step 3: (optional) You can style how the text looks by adding font or outline like this.

image
image

This extension really helps me in a lot of cases. So it might help you lot.

💡
If you have any questions or suggestions, you can find us in the discord channel: https://discord.gg/U3nyveCvRa
Logo

Designed by 2ndR with love

Discord