How to add Text in Cosmos GUI???
I'm Using Userkit...
Thanks!
You basically need those 2 files , i found them a while ago somewhere from another project, cant remember which else i would credit the creator, sorry.
https://git.meowviewer.org/Tiger/PS2Progress/src/commit/0b721061e7c1155930df6cc1b546d4d9484c7c56/BufferVGA/FontDrawer.cs
https://git.meowviewer.org/Tiger/PS2Progress/src/commit/0b721061e7c1155930df6cc1b546d4d9484c7c56/BufferVGA/FontDrawer.cs
@KM198912 But How to use theese files???
You edit them to fit your namespace then its just a matter of calling the Function like this
FontDrawer.WriteText("Hello World", 100, 100, Color.White)
for example
Is there a way to make the text "auto-updatable"? Like I want a string that shows the X and Y coordinates of the Mouse, but the string gets weird. Isn't there a way to do that?
it worked for me when i had it running in the Run method using a seperate while loop
bool isRunning = true;
while(isRunning)
{
FontDrawer.WriteText("Mouse X: " + Sys.MouseManager.X + " Mouse Y: " + Sys.MouseManager.Y,100,100,Color.White);
}
But for the string updating it adds another string on top of the original one so it makes it weird, is there any way to make it updating like so?
To keep the strings from drawing over each other, you have to clear the current string before drawing the next one. To clear the string, I draw a filled rectangle the same color as the screen background over the text.
To keep the strings from drawing over each other, you have to clear the current string before drawing the next one. To clear the string, I draw a filled rectangle the same color as the screen background over the text.
You could also redraw the same string in the same color as the background
Thanks @KM198912! I'll try!! 馃榾
I Tried it It's Not Working :(((
I Tried it It's Not Working :(((
show me your code and i will see whats wrong
Most helpful comment
You edit them to fit your namespace then its just a matter of calling the Function like this
FontDrawer.WriteText("Hello World", 100, 100, Color.White)for example