About disable the function of mouse

I’m now using the following code the make the cursor invisable:

props = WindowProperties()
self.props.setCursorHidden(1)
base.win.requestProperties(self.props)

However, I can still click something on the screen (although I can’t see the cursor)
I would like to ask how to totally disable the mouse click function?

Thanks

base.disableMouse()

Is that what you are looking for?

Thanks for reply.
But this function doesn’t work.

panda3d.org/manual/index.php/Mouse_Support

I don’t think Microsoft Windows has a way to disable the mouse. I don’t think I’ve ever seen a windows program disable the mouse.

Of course, you can go fullscreen. If you do that, then there’s nothing else to click on but your program. And of course, your program can easily ignore the mouse.

Do you mean you want to prevent the user from clicking on things outside of the Panda window, or do you mean to disable all of the currently-active DirectGUI objects within the Panda window?

As Josh said, there’s no way to prevent the rest of the world outside of Panda from being clickable. But if you mean to disable the DirectGUI stuff, there are several approaches. Without knowing your intentions, I might recommend popping up a fade transition:


base.transitions.fadeScreen()

This will also have the side-effect of darkening the screen, so that the user can visually tell that the DirectGUI items have been disabled. When you want to enable it again:


base.transitions.noFade()

This is what the DirectDialog uses when you specify fadeScreen = 0.5 to make it a modal dialog.

David

Thanks all guys.
I solved the problem by hiding all the buttons in the game I don’t want the player to click instead of disabling the mouse click function