printing colored s
BlitzMax Forums/BlitzMax Beginners Area/printing colored s
| ||
i made a program that u can type in, but for some reason it wont let me type colored s. i made a separate program that simply prints green s and it says the letter s does not exist??? |
| ||
you need to expand on your bug report some more, perhaps with some example code. Notes on posting bugs |
| ||
example code: mx=(mousex()+10) if keyhit(key_s) setcolor 0,255,0 drawtext "S" mousex(),mousey() movemouse mx,mousey() endif Note:The problem is not that mx isn't working, i did this with all letters of the alphabet and it worked with them |
| ||
Graphics 640,480,0,0 While Not KeyDown(KEY_ESCAPE) Cls mx=(MouseX()+10) If KeyDown(key_s) SetColor 0,255,0 DrawText "S", MouseX(),MouseY() MoveMouse mx,MouseY() EndIf Flip FlushMem Wend End |
| ||
it ONLY doesnt work with s, all the other letters work |
| ||
(i'm already using flip) |
| ||
Drawing S works fine for me. *EDIT* The code I posted works for me. Make sure you have the latest version |
| ||
i dont know what the problem for me is, but i did exactly what you did and it didn't work |
| ||
post the code *exactly* as it is in your source file. |
| ||
Try this, Drnmr: Print key_s Does it print the correct code (83) on your computer, or something else altogether? If you see something different, it's possible that the internal variable definitions somehow got messed up on your computer? |
| ||
Also - make sure there is actually an "s" in the font you're using. |
| ||
yes, i see 83, but how do i change the font? |
| ||
Using the LoadImageFont command, although if you haven't switched to a different font then you're using the default font which 'should' have the entire alphabet. What happend when you change the code from one of your other letters to print the 's'? e.g. mx=(mousex()+10) if keyhit(key_e) setcolor 0,255,0 drawtext "S" mousex(),mousey() movemouse mx,mousey() endif Which should print an 's' if you hit the letter 'e'? Or what about: mx=(mousex()+10) if keyhit(key_s) setcolor 0,255,0 drawtext "E" mousex(),mousey() movemouse mx,mousey() endif Which should draw an 'E' when you press the 'S'? Do either one of those work, or do they fail as well? |
| ||
So how did you fix it |
| ||
i already used the key s in a saving function that didn't work and i forgot about, and it tried to save instead of draw s. |