Hello!
I am trying to create a custom button. I made the .egg file according to the documentation with:
egg-texture-cards -o button.egg -p 240,240 button.png button_full.png button_full.png button_full.png
And I am getting a button with my texture, but the original button is still in the background, and the texture don’t scale with the button.
http://imgur.com/fAkZdKQ
The code is
maps = loader.loadModel('textures/button')
b = DirectButton(text = ("1", ".", ".", "."),
geom = (maps.find('**/button'),
maps.find('**/button_full'),
maps.find('**/button_full'),
maps.find('**/button_full')))
I want a green border when inactive and unselected, and full green otherwise.
Any idea what I am doing wrong?
Thank you!
EDIT: Is there any other way to get mouseover and click on a aspect2d nodePath?
I tried with a mouse CollisionTraverser() , but found in the forum that this way is overkill and is not appropriate for aspect2d.
EDIT_2 : What I am trying to achieve is a custom menu button… Thanks again!