Panda3D
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties
Public Member Functions | Static Public Member Functions
MouseSubregion Class Reference

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

Inheritance diagram for MouseSubregion:
MouseInterfaceNode DataNode PandaNode TypedWritable Namable LinkedListNode ReferenceCount TypedObject

List of all members.

Public Member Functions

 MouseSubregion (string name)
float getBottom ()
 Retrieves the y coordinate of the bottom edge of the rectangle within the window.
float getLeft ()
 Retrieves the x coordinate of the left edge of the rectangle within the window.
float getRight ()
 Retrieves the x coordinate of the right edge of the rectangle within the window.
float getTop ()
 Retrieves the y coordinate of the top edge of the rectangle within the window.
 setDimensions (float l, float r, float b, float t)
 Changes the region of the window in which the mouse is considered to be active.

Static Public Member Functions

static TypeHandle getClassType ()

Detailed Description

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.


Constructor & Destructor Documentation

MouseSubregion ( string  name)

Member Function Documentation

float getBottom ( )

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 getClassType ( ) [static]

Reimplemented from MouseInterfaceNode.

float getLeft ( )

Retrieves the x coordinate of the left edge of the rectangle within the window.

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

float getRight ( )

Retrieves the x coordinate of the right edge of the rectangle within the window.

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

float getTop ( )

Retrieves the y coordinate of the top edge of the rectangle within the window.

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

setDimensions ( 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.

 All Classes Namespaces Functions Variables Enumerations Enumerator Properties