diff options
author | Neeraj Kumar | 2010-07-06 16:30:42 +0000 |
---|---|---|
committer | Neeraj Kumar | 2010-07-06 16:30:42 +0000 |
commit | f145391abb1823489ff03e200c50926b5aa97006 (patch) | |
tree | 3cf4c98bd7a259408350bc39de07870f6e4acd80 /engines | |
parent | deb2c189c757b7d3520623a92b7769751eed4717 (diff) | |
download | scummvm-rg350-f145391abb1823489ff03e200c50926b5aa97006.tar.gz scummvm-rg350-f145391abb1823489ff03e200c50926b5aa97006.tar.bz2 scummvm-rg350-f145391abb1823489ff03e200c50926b5aa97006.zip |
some minor fixes in cursor handling
svn-id: r50726
Diffstat (limited to 'engines')
-rw-r--r-- | engines/testbed/events.cpp | 14 | ||||
-rw-r--r-- | engines/testbed/graphics.cpp | 11 |
2 files changed, 14 insertions, 11 deletions
diff --git a/engines/testbed/events.cpp b/engines/testbed/events.cpp index e036551adc..fb71334d78 100644 --- a/engines/testbed/events.cpp +++ b/engines/testbed/events.cpp @@ -30,6 +30,7 @@ #include "graphics/cursorman.h" #include "testbed/events.h" +#include "testbed/graphics.h" namespace Testbed { @@ -62,7 +63,8 @@ struct keycodeToChar { {Common::KEYCODE_w, 'w'}, {Common::KEYCODE_x, 'x'}, {Common::KEYCODE_y, 'y'}, - {Common::KEYCODE_z, 'z'} + {Common::KEYCODE_z, 'z'}, + {Common::KEYCODE_SPACE, ' '} }; char EventTests::keystrokeToChar() { @@ -108,16 +110,18 @@ bool EventTests::mouseEvents() { pt.y = 120; Testsuite::writeOnScreen("Testbed should be able to detect them, Press X to exit", pt); + // Init Mouse Palette + GFXtests::initMousePalette(); bool quitLoop = false; bool passed = true; // handle all mouse events Common::Event event; while (!quitLoop) { - // show mouse + // Show mouse CursorMan.showMouse(true); g_system->updateScreen(); - + while (eventMan->pollEvent(event)) { // Quit if explicitly requested if (Engine::shouldQuit()) { @@ -153,7 +157,7 @@ bool EventTests::mouseEvents() { break; case Common::EVENT_WHEELUP: Testsuite::clearScreen(); - Testsuite::writeOnScreen("Mouse wheel moved down", pt); + Testsuite::writeOnScreen("Mouse wheel moved up", pt); break; case Common::EVENT_MBUTTONUP: Testsuite::clearScreen(); @@ -191,7 +195,7 @@ bool EventTests::mouseEvents() { bool EventTests::kbdEvents() { // Make user type some word and display the output on screen - Common::String text = "You Entered :"; + Common::String text = "You Entered : "; Common::Point pt(0, 100); Testsuite::clearScreen(); Testsuite::writeOnScreen("Enter your word, press ESC when done, it will be echoed back", pt); diff --git a/engines/testbed/graphics.cpp b/engines/testbed/graphics.cpp index 44d2b00cd0..821237b945 100644 --- a/engines/testbed/graphics.cpp +++ b/engines/testbed/graphics.cpp @@ -61,7 +61,7 @@ GFXTestSuite::GFXTestSuite() { // Mouse Layer tests (Palettes and movements) addTest("PalettizedCursors", &GFXtests::palettizedCursors); - // FIXME: need to fix it + // FIXME: Scaled cursor crsh with odd dimmensions addTest("ScaledCursors", &GFXtests::scaledCursors); // Effects @@ -471,8 +471,8 @@ bool GFXtests::palettizedCursors() { } Testsuite::clearScreen(); - // Done with cursors - CursorMan.popAllCursors(); + // Done with cursors, make them invisible, any other test the could simply make it visible + CursorMan.showMouse(false); return passed; } @@ -609,9 +609,8 @@ bool GFXtests::scaledCursors() { return false; } - // Done with cursors - CursorMan.popAllCursors(); - + // Done with cursors, Make them invisible, any other test may enable and use it. + CursorMan.showMouse(false); Testsuite::clearScreen(); return true; } |