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 yourDisplayRegion
.Inheritance diagram
-
explicit MouseSubregion(std::string const &name)
-
MouseSubregion(MouseSubregion const&) = default
-
PN_stdfloat get_bottom(void) const
Retrieves the y coordinate of the bottom edge of the rectangle within the window. This number will be in the range [0..1].
-
static TypeHandle get_class_type(void)
-
PN_stdfloat get_left(void) const
Retrieves the x coordinate of the left edge of the rectangle within the window. This number will be in the range [0..1].
-
PN_stdfloat get_right(void) const
Retrieves the x coordinate of the right edge of the rectangle within the window. This number will be in the range [0..1].
-
PN_stdfloat get_top(void) const
Retrieves the y coordinate of the top edge of the rectangle within the window. This number will be in the range [0..1].
-
void set_dimensions(PN_stdfloat l, PN_stdfloat r, PN_stdfloat b, PN_stdfloat 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.
-
explicit MouseSubregion(std::string const &name)