TImage Problem
BlitzMax Forums/BlitzMax Beginners Area/TImage Problem
| ||
Hi I have a problem with loading and displaying an Image 'This is what stands in the Type Field Backimage:TImage 'Then I create a type with a function called create() Function Create:CConsole(_length:Int,_height:int,_alpha:Float,_max_chars:Int,_Frame:Byte = True,_border:Int = 5,_Img:String = "") ... ... If _Img <> "" then Debuglog "Loading Image" c.BackImage = LoadImage(_Img,-1) endif Return c End Function 'AFter that I have setup an Update Method: Method Update() ... ... if BackImage = Null then DEbuglog "Backimage = Null" SetColor bcr,bcb,bcg Drawrect(0,0,length,height) else DEbuglog "Drawing Backimage" SetColor 255,255,255 Setscale width/ImageWidth(BackImage),height/Imageheight(Backimage) DrawImage (BackImage,0,0) SetScale 1,1 endif End Method The problem is that is Backimage always is Null. I have checked all pathes and also tried to use the full path of the Image. But no chance. Maybe you could help me? |
| ||
I can't see anything obviously wrong. Are you able to post the full Type and an example of how you're using it? |
| ||
Here is the Full Mod. And here is the Sample where I use it: All pathes seems to be right. |
| ||
I have found the Error, but don't know exactly why: Its the 'Framework pub.console' command in the Sample but I doesn't know what Module I should add now to the Module to catch this error. Any Idea? [Edit] Simply forgot to import BRL.BMPLoader |