[Information] Image inside cetrainer
Put Image inside cetrainer
Image inside cetrainer Posted on: 06/24/2015 2:41am
Quote Post

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 on: 09/01/2016 3:20pm
Quote Post

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 on: 09/01/2016 3:28pm
Quote Post
Oh, hey...

Someone who is point dropped can't help you. lol

RE: Image inside cetrainer Posted on: 09/01/2016 3:38pm
Quote Post

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]])