Sorry for my inexperience, I haven’t really used Panda3D or Python much before. I’m actually trying to modify some existing code. For some reason, whenever I try to bind a DirectButton such that a right mouse button executes a different command than a left mouse button, I get a runtime error that causes the program to exit immediately. Here’s what I’m working with now:
button_gotIt = DirectButton(frameSize=(-2.5,2.5,-0.5,1),pos=(-0.3,0,-0.65),text="Got it!", scale=.1, rolloverSound=None,clickSound=None,pressEffect=1)
button_gotIt.bind(DGG.B1PRESS, command = messenger.send, extraArgs=['a_got_it'])
button_gotIt.bind(DGG.B3PRESS, command = messenger.send, extraArgs=['b_got_it'])
If I do something like this, I’m fine:
button_gotItA = DirectButton(frameSize=(-2.5,2.5,-0.5,1),pos=(-0.8,0,-0.65),text="Got it!", scale=.1, commandButtons=[DGG.LMB], command=messenger.send, extraArgs=['a_got_it'],rolloverSound=None,clickSound=None,pressEffect=1)
However, that’s kind of limiting; ideally I’d like to only have one button with different methods for right and left mouse clicks. If anyone could help me with this, or even with some sort of equivalent of system pause so I could actually see what the error is, I’d greatly appreciate it.