cppgfx  0.1.0
C++17 educational graphics library
Input

Input devices like mouse, keyboard, etc. More...

Variables

int cppgfx::App::mouseX = 0
 The current mouse position X [read only]. More...
 
int cppgfx::App::mouseY = 0
 The current mouse position Y [read only]. More...
 
int cppgfx::App::pmouseX = 0
 The previous mouse position X [read only]. More...
 
int cppgfx::App::pmouseY = 0
 The previous mouse position Y [read only]. More...
 
int cppgfx::App::dmouseX = 0
 Delta X: The difference between the current and previous mouse position X [read only]. More...
 
int cppgfx::App::dmouseY = 0
 Delta Y: The difference between the current and previous mouse position Y [read only]. More...
 
bool cppgfx::App::mousePressed = false
 If any mouse button is currently pressed [read only]. More...
 

Detailed Description

Input devices like mouse, keyboard, etc.

Variable Documentation

◆ dmouseX

int cppgfx::App::dmouseX = 0

Delta X: The difference between the current and previous mouse position X [read only].

This is the difference between the current and previous mouse position X. This variable is automatically updated and will not affect anything if you change it.

◆ dmouseY

int cppgfx::App::dmouseY = 0

Delta Y: The difference between the current and previous mouse position Y [read only].

This is the difference between the current and previous mouse position Y. This variable is automatically updated and will not affect anything if you change it.

◆ mousePressed

bool cppgfx::App::mousePressed = false

If any mouse button is currently pressed [read only].

This variable is automatically updated and will not affect anything if you change it.

◆ mouseX

int cppgfx::App::mouseX = 0

The current mouse position X [read only].

This is the current mouse position X in pixels relative to the top left corner of the window. This variable is automatically updated and will not affect anything if you change it.

◆ mouseY

int cppgfx::App::mouseY = 0

The current mouse position Y [read only].

This is the current mouse position Y in pixels relative to the top left corner of the window. The down direction is positive. This variable is automatically updated and will not affect anything if you change it.

◆ pmouseX

int cppgfx::App::pmouseX = 0

The previous mouse position X [read only].

This is the mouse position X from the last frame. You can use it in conjunction with mouseX to calculate the difference between the current and previous mouse position. This variable is automatically updated and will not affect anything if you change it.

◆ pmouseY

int cppgfx::App::pmouseY = 0

The previous mouse position Y [read only].

This is the mouse position Y from the last frame. You can use it in conjunction with mouseY to calculate the difference between the current and previous mouse position. This variable is automatically updated and will not affect anything if you change it.