MouseSubregion

from panda3d.core import MouseSubregion
class MouseSubregion

Bases: MouseInterfaceNode

The MouseSubregion object scales the mouse inputs from within a rectangular region of the screen, as if they were the full-screen inputs.

If you choose your MouseSubregion coordinates to exactly match a DisplayRegion within your window, you end up with a virtual mouse within your DisplayRegion.

Inheritance diagram

Inheritance diagram of MouseSubregion

__init__(param0: MouseSubregion)
__init__(name: str)
getBottom()float

Retrieves the y coordinate of the bottom edge of the rectangle within the window. This number will be in the range [0..1].

static getClassType()TypeHandle
getLeft()float

Retrieves the x coordinate of the left edge of the rectangle within the window. This number will be in the range [0..1].

getRight()float

Retrieves the x coordinate of the right edge of the rectangle within the window. This number will be in the range [0..1].

getTop()float

Retrieves the y coordinate of the top edge of the rectangle within the window. This number will be in the range [0..1].

setDimensions(l: float, r: float, b: float, t: float)None

Changes the region of the window in which the mouse is considered to be active. The parameters are identical to those for a DisplayRegion: they range from 0 to 1, where 0,0 is the lower left corner and 1,1 is the upper right; (0, 1, 0, 1) represents the whole window.