Making a clickable texturedbuttom doesnt work

So, im like 4 days new to python…
Iv scripted in Roblox version of LUA and im quite good at it…
But since im new to python i really need help XD
So i tried to make a 2d picture on my panda walks the grass script
(the first tutorial)
but it doesnt work at all…
can you guys help me, here the script:

pic = loader.loadTexture (“C:\Users\Andreas\Pictures\Banana.jpg”)
pic.reparentTo(aspect2d)
pic_screen_size_x = 10
pic.setPos(1,0,1)

i cant do setpos and if i erase the setpos i still dont get a picture on my app…
whats wrong?
oh and if you know how to make this clickable wright that too please =)

welcome to panda :slight_smile:

if you want a clickable button i suggest you use the directButton.
see the manual here-> https://www.panda3d.org/manual/index.php/DirectButton

if you have trouble getting it to work feel free to ask :slight_smile:. the directGUI stuff is a little bit confusing so dont hesitate.

About the problem with that code, you should use OS-independent paths:

loader.loadTexture ("/c/Users/Andreas/Pictures/Banana.jpg")