mirror of
https://github.com/wesnoth/wesnoth
synced 2025-04-30 17:11:17 +00:00
60 lines
1.2 KiB
C++
60 lines
1.2 KiB
C++
/* $Id$ */
|
|
/*
|
|
Copyright (C) 2003 - 2013 by David White <dave@whitevine.net>
|
|
Part of the Battle for Wesnoth Project http://www.wesnoth.org/
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
it under the terms of the GNU General Public License as published by
|
|
the Free Software Foundation; either version 2 of the License, or
|
|
(at your option) any later version.
|
|
This program is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY.
|
|
|
|
See the COPYING file for more details.
|
|
*/
|
|
|
|
/** @file */
|
|
|
|
#ifndef CURSOR_HPP_INCLUDED
|
|
#define CURSOR_HPP_INCLUDED
|
|
|
|
#include "SDL.h"
|
|
struct surface;
|
|
|
|
namespace cursor
|
|
{
|
|
|
|
struct manager
|
|
{
|
|
manager();
|
|
~manager();
|
|
};
|
|
|
|
enum CURSOR_TYPE { NORMAL, WAIT, MOVE, ATTACK, HYPERLINK, MOVE_DRAG, ATTACK_DRAG, NO_CURSOR, NUM_CURSORS };
|
|
|
|
/**
|
|
* Use the default parameter to reset cursors.
|
|
* e.g. after a change in color cursor preferences
|
|
*/
|
|
void set(CURSOR_TYPE type = NUM_CURSORS);
|
|
void set_dragging(bool drag);
|
|
CURSOR_TYPE get();
|
|
|
|
void draw(surface screen);
|
|
void undraw(surface screen);
|
|
|
|
void set_focus(bool focus);
|
|
|
|
struct setter
|
|
{
|
|
setter(CURSOR_TYPE type);
|
|
~setter();
|
|
|
|
private:
|
|
CURSOR_TYPE old_;
|
|
};
|
|
|
|
} // end namespace cursor
|
|
|
|
#endif
|