Skip to content
[Information]

Image inside cetrainer

Put Image inside cetrainer

4 posts

Image inside cetrainer

Posted Jun 24, 2015 2:41 am

Hello friends!
here the function to place image on your cetrainer,
to add image, go in Table ----> add file,
add the function to your trainer where name_image refers to the file that you added.
I hope this helps

attachBackground function (wc, tblFile)
MainGUI [xxx] = createPicture (MainGUI [xx])
MainGUI [xxx] .loadFromStream (findTableFile (tblFile) .Stream)
wc.OnPaint = function (sender)
Local c = sender.getCanvas ()
Local bitmap = MainGUI [xxx] .getBitmap ()
c.draw (120.0, bitmap)
end
end
attachBackground (MainGUI [1], [[name_image.jpg]])

RE: Image inside cetrainer

Posted Sep 1, 2016 3:20 pm

hi bro pleas can you help me?

when copy your script and give only NAME_IMAGE (use image with www)
give me error FUNCTION - you know why?

and what is MainGUI (xxx)
for XXX muss give some ????

and more one pleas i need TRANSPARENT picture


thanx to answer me


RE: Image inside cetrainer

Posted Sep 1, 2016 3:38 pm

here post image
https://unsee.cc/rigemosu/
pleas help


and i use konghack LUA script

i can change color - green, blue, yellow.....


but dont know how to use transparent background picture for it :(





OK NOW i use this code no give me error
but no show picture :(
WHY?

function attachBackground(wc,tblFile)
local p = createPicture()
wc.OnPaint = function(sender)
local c = sender.getCanvas()
local bitmap = p.getBitmap()
c.draw(0,0,bitmap)
end
end
attachBackground(MainGUI[1],[[http://www.rebel-darkorbit.estranky.cz/img/mid/4/upiri-lebka-hruzi.jpg]])