Heres One Now.
In the UserInterface Demo. I wanted to be able to run it and see where my mouse x, y location would be over the entire screen so i could map out where i want to place things, But i only wanted them to show in Debug mode.
so i added this:
- Code: Select all
bool MyEventReceiver::OnEvent(SEvent event)
if (event.EventType == EET_MOUSE_INPUT_EVENT)
//! Left mouse button was pressed down.
case EMIE_LMOUSE_PRESSED_DOWN:// = 0,
//! Right mouse button was pressed down.
//! Middle mouse button was pressed down.
//! Left mouse button was left up.
//! Right mouse button was left up.
//! Middle mouse button was left up.
//! The mouse cursor changed its position.
//spits out the x,y coords for the mouse position
//helpful for designing a layout or sizing Gui items
for(int j=0;j<12;j++) //pre-format the string data
cpos[j] = '\0';
wprintf(L"x:%u y:%u\n", device->getCursorControl()->getPosition());
mbstowcs(pos , cpos , 12);
//end mouse events
The code sets the windows caption to x,y coordinates of the mouse location