SCROLL.H 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. /*
  2. ** Command & Conquer Red Alert(tm)
  3. ** Copyright 2025 Electronic Arts Inc.
  4. **
  5. ** This program is free software: you can redistribute it and/or modify
  6. ** it under the terms of the GNU General Public License as published by
  7. ** the Free Software Foundation, either version 3 of the License, or
  8. ** (at your option) any later version.
  9. **
  10. ** This program is distributed in the hope that it will be useful,
  11. ** but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. ** GNU General Public License for more details.
  14. **
  15. ** You should have received a copy of the GNU General Public License
  16. ** along with this program. If not, see <http://www.gnu.org/licenses/>.
  17. */
  18. /* $Header: /CounterStrike/SCROLL.H 1 3/03/97 10:25a Joe_bostic $ */
  19. /***********************************************************************************************
  20. *** C O N F I D E N T I A L --- W E S T W O O D S T U D I O S ***
  21. ***********************************************************************************************
  22. * *
  23. * Project Name : Command & Conquer *
  24. * *
  25. * File Name : SCROLL.H *
  26. * *
  27. * Programmer : Joe L. Bostic *
  28. * *
  29. * Start Date : 11/18/94 *
  30. * *
  31. * Last Update : November 18, 1994 [JLB] *
  32. * *
  33. *---------------------------------------------------------------------------------------------*
  34. * Functions: *
  35. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
  36. #ifndef SCROLL_H
  37. #define SCROLL_H
  38. #include "help.h"
  39. class ScrollClass: public HelpClass
  40. {
  41. /*
  42. ** If map scrolling is automatic, then this flag is true. Automatic scrolling will
  43. ** cause the map to scroll if the mouse is in the scroll region, regardless of
  44. ** whether or not the mouse button is held down.
  45. */
  46. unsigned IsAutoScroll:1;
  47. /*
  48. ** Scroll speed is regulated by this count down timer. When this value reaches zero,
  49. ** scroll the map in the direction required and reset this timer.
  50. */
  51. static CDTimerClass<SystemTimerClass> Counter;
  52. /*
  53. ** Inertia control for scrolling
  54. */
  55. int Inertia;
  56. public:
  57. ScrollClass(void);
  58. ScrollClass(NoInitClass const & x) : HelpClass(x) {};
  59. bool Set_Autoscroll(int control);
  60. virtual void AI(KeyNumType &input, int x, int y);
  61. virtual void Init_IO(void) {Counter = 0;HelpClass::Init_IO();};
  62. };
  63. #endif