Search found 3 matches
- Sun Mar 21, 2021 12:53 am
- Forum: Games and Creations
- Topic: Drawing different parts of a string with different colors.
- Replies: 4
- Views: 5003
Re: Drawing different parts of a string with different colors.
str_table= { {text="I want the word ", color={1,1,1}}, {text="RED", color={1,0,0}}, {text=" to be colored red.", color={1,1,1}} } function printc (tabl, x,y) font=love.graphics.getFont() for i, v in ipairs (tabl) do love.graphics.setColor(v.color) love.graphics.print(v...
- Sat Mar 20, 2021 9:42 pm
- Forum: Games and Creations
- Topic: Drawing different parts of a string with different colors.
- Replies: 4
- Views: 5003
Drawing different parts of a string with different colors.
So say I have the string, "I want the word RED to be colored red." How could I make it so that the word RED is drawn red, but the rest is
drawn white? I know I would have to loop through the string somehow, but I cant quite figure out what I have to do.
Any help is appreciated!
drawn white? I know I would have to loop through the string somehow, but I cant quite figure out what I have to do.
Any help is appreciated!
- Fri Nov 27, 2020 10:04 pm
- Forum: Support and Development
- Topic: STI and collision
- Replies: 9
- Views: 13457
Re: STI and collision
Should I draw the tilemap myself, would it be easier for me to test collisions? Depending of the complexity of your tileset, but I would say no. Can you provide a .love file or something we can see? Actually I have found the perfect solution. The cartographer library! It is capable of doing the sam...