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__(*args, **kwargs)
getBottom()

C++ Interface: get_bottom(MouseSubregion self)

/**
  • Retrieves the y coordinate of the bottom edge of the rectangle within the

  • window. This number will be in the range [0..1].

*/

getClassType()

C++ Interface: get_class_type()

getLeft()

C++ Interface: get_left(MouseSubregion self)

/**
  • Retrieves the x coordinate of the left edge of the rectangle within the

  • window. This number will be in the range [0..1].

*/

getRight()

C++ Interface: get_right(MouseSubregion self)

/**
  • Retrieves the x coordinate of the right edge of the rectangle within the

  • window. This number will be in the range [0..1].

*/

getTop()

C++ Interface: get_top(MouseSubregion self)

/**
  • Retrieves the y coordinate of the top edge of the rectangle within the

  • window. This number will be in the range [0..1].

*/

get_bottom()

C++ Interface: get_bottom(MouseSubregion self)

/**
  • Retrieves the y coordinate of the bottom edge of the rectangle within the

  • window. This number will be in the range [0..1].

*/

get_class_type()

C++ Interface: get_class_type()

get_left()

C++ Interface: get_left(MouseSubregion self)

/**
  • 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()

C++ Interface: get_right(MouseSubregion self)

/**
  • 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()

C++ Interface: get_top(MouseSubregion self)

/**
  • Retrieves the y coordinate of the top edge of the rectangle within the

  • window. This number will be in the range [0..1].

*/

setDimensions()

C++ Interface: set_dimensions(const MouseSubregion self, float l, float r, float b, float t)

/**
  • 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.

*/

set_dimensions()

C++ Interface: set_dimensions(const MouseSubregion self, float l, float r, float b, float t)

/**
  • 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.

*/