In this chapter we’ll get mouse input, and the art of making decisions, computer style.
Mouse functions
Example
4-1 shows a program to detect where you clicked the mouse and report the result. Amazing, huh? Thus, we introduce three mouse functions:
SSDL_GetMouseX,
SSDL_GetMouseY, and
SSDL_WaitMouse.
//Program to get a mouse click, and report its location
// -- from _C++ for Lazy Programmers_
int main(int argc, char** argv)
{
sout << "Click the mouse and we'll see where you clicked.\n";
//Get the mouse click
SSDL_WaitMouse(); //wait for click...
int ...