home *** CD-ROM | disk | FTP | other *** search
/ ring.yamanashi.ac.jp/pub/pc/freem/action/ / action.zip / henkyaku1.0.exe / henkyaku / Program / Kernel / Util / MouseManager.tonyu < prev    next >
Text File  |  2002-07-11  |  613b  |  32 lines

  1. extends Object;
  2.  
  3. constructor MouseManager() {
  4.     showCursor(1);
  5.     enabled=1;
  6. }
  7.  
  8. function disable() {
  9.     showCursor(1);
  10.     enabled=0;
  11. }
  12.  
  13. native _n_moveCursor;
  14. function moveCursor(x,y) {
  15.    if (designMode() || !enabled) return;
  16.    relX = -$mouseX; relY=-$mouseY;
  17.    refreshXY();
  18.    relX +=$mouseX;  relY+=$mouseY;
  19.    $mouseX=x;$mouseY=y;
  20.    _n_moveCursor (_body,x,y);
  21. }
  22.  
  23. native _n_showCursor;
  24. function showCursor(n) {
  25.    if (designMode()) return _n_showCursor (_body,1);
  26.    return _n_showCursor (_body,n);
  27. }
  28.  
  29. native _n_refreshXY;
  30. function refreshXY() {
  31.    _n_refreshXY (_body);
  32. }