I´m new to Panda and I´m having some troubles with PGButton. Some help would be very useful.
I create a button with the next code:
- Code: Select all
PGButton *button;
button = new PGButton("BUTTON");
button->setup("Text",0.02);
NodePath butNP = window->get_aspect_2d().attach_new_node(button);
butNP.set_scale(0.1,0.1,0.1);
butNP.set_pos(0 , 0 , 0);
When I run the application appears a button. But, when the mouse is on the button, the button automatically changes like it was pressed.
If I click the button once this behaviour dissapear.
What is going wrong?
Thanks in advance.
[Panda3D 1.7.2]
[Windows 7]
[MSVC 2008]
