SetClsColor bug (maybe - I dunno)
Archives Forums/BlitzMax Bug Reports/SetClsColor bug (maybe - I dunno)| 
 | ||
| Not sure if its a bug or not - just seemed a bit odd to me as I'm doing stuff that's dependent on the background color and it caught me out.  Easy enough to work around, but... meh. :/ I had assumed that after calling EndGraphics and setting a new graphics mode, that the Cls color would remain the same, but apparently it reverts to black. Graphics 800,600 SetClsColor 255,0,0 While Not KeyHit(key_Escape) Cls DrawText "Press SPACE...",10,10 Flip If KeyHit(key_space) EndGraphics Graphics 800,600 EndIf Wend | 
| 
 | ||
| That would make sense. When you set ClsColor, aren't you setting the cls colour of the current graphics object. Therefore, if you create a new graphics object, the cls colour would refer back to its default (black). I may be wrong, but that's how I look at it. | 
| 
 | ||
| Asuming the clsColor is a property of the graphics object, that would make sense but I wasn't sure if that was the case.  I always thought Cls (and therefore the clsColor) were completely independent of any graphics object. | 
| 
 | ||
| Like I said, it's just the way I see it. not having looked at the code in the modules, I couldn't be 100% sure. |