1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-06 09:09:40 +02:00

* added fast graphical cursor :)

* building structures should work
This commit is contained in:
Michał W. Urbańczyk
2008-08-01 18:13:33 +00:00
parent e5a064f36b
commit bfad10a8e4
11 changed files with 54 additions and 312 deletions

View File

@@ -1,6 +1,7 @@
#ifndef CCURSORHANDLER_H
#define CCURSORHANDLER_H
#include "global.h"
#include <vector>
struct SDL_Thread;
class CDefHandler;
struct SDL_Surface;
@@ -8,21 +9,16 @@ struct SDL_Surface;
class CCursorHandler //handles cursor
{
public:
SDL_Thread * myThread; //thread that updates cursor
bool curVisible; //true if cursor is visible
int mode, number;
SDL_Surface * behindCur;
int xbef, ybef; //position of cursor after last move (to restore background)
SDL_Surface * help;
CDefHandler * adventure, * combat, * deflt, * spell; //read - only
int xpos, ypos; //position of cursor - read only
std::vector<CDefHandler*> cursors;
int xpos, ypos; //position of cursor
void initCursor(); //inits cursorHandler
void showGraphicCursor(); //shows default graphic cursor
void cursorMove(int x, int y); //change cursor's positions to (x, y)
void changeGraphic(int type, int no); //changes cursor graphic for type type (0 - adventure, 1 - combat, 2 - default, 3 - spellbook) and frame no (not used for type 3)
void hideCursor(); //no cursor will be visible
void hardwareCursor(); // returns to hardware cursor mode
friend int cursorHandlerFunc(void * cursorHandler);
void draw1();
void draw2();
};