MouseSubregion

from panda3d.core import MouseSubregion
class MouseSubregion

Bases:

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)
get_bottom() 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 get_class_type() TypeHandle
get_left() float

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

get_right() float

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

get_top() float

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

set_dimensions(l: float, r: float, b: float, t: float)

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.