FoxyOfJungle
Kazan Games
Hello!
I'm making a text editor in GML (for Utiki), and I need to color the text.
I'm wanting to do this via shader (as it's much lighter than using many draw_text and draw_set_color. Scribble would not be an option too):
I want to color the text using the fragment's position, which is based on the GUI's (or room's) position. The shader part is already ok, so skip it for now.
So what I thought, I need:
Don't worry about how I'm going to do it, I just need to get the position of a specific word, example:
(Orange rectangle size: 48x16)
Any help/idea is appreciated! Thanks for listening.
I'm making a text editor in GML (for Utiki), and I need to color the text.
I'm wanting to do this via shader (as it's much lighter than using many draw_text and draw_set_color. Scribble would not be an option too):
I want to color the text using the fragment's position, which is based on the GUI's (or room's) position. The shader part is already ok, so skip it for now.
So what I thought, I need:
- Get all the words, numbers, symbols, etc and put them in an array.
- Acquire the position of the words and then their size and put them in an array.
- Get the room position of these words, so I can use it in the shader.
- Check and compare these positions in the shader, so I can color the words correctly depending on their type (variable, keyword, value, strings...).
Don't worry about how I'm going to do it, I just need to get the position of a specific word, example:
(Orange rectangle size: 48x16)
Any help/idea is appreciated! Thanks for listening.
Last edited: