#include "global.hpp"
#include "cursor.hpp"
#include "game_config.hpp"
#include "image.hpp"
#include "preferences_display.hpp"
#include "scoped_resource.hpp"
#include "sdl_utils.hpp"
#include "video.hpp"
#include "SDL.h"
#include <iostream>
#include <vector>
Go to the source code of this file.
Namespaces | |
namespace | cursor |
Functions | |
static bool | use_colour_cursors () |
static SDL_Cursor * | create_cursor (surface surf) |
static SDL_Cursor * | get_cursor (cursor::CURSOR_TYPE type) |
static void | clear_cache () |
void | cursor::temporary_use_bw () |
This function uses temporary the b&w cursors while the display is busy. | |
void | cursor::set (CURSOR_TYPE type=NUM_CURSORS) |
Use the default parameter to reset cursors. | |
void | cursor::set_dragging (bool drag) |
CURSOR_TYPE | cursor::get () |
void | cursor::set_focus (bool focus) |
void | cursor::draw (surface screen) |
void | cursor::undraw (surface screen) |
Variables | |
SDL_Cursor * | cache [cursor::NUM_CURSORS] = { NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL} |
const std::string | bw_images [cursor::NUM_CURSORS] = { "normal.png", "wait.png", "move.png", "attack.png", "select.png", "move_drag.png", "attack_drag.png", "no_cursor.png"} |
const std::string | colour_images [cursor::NUM_CURSORS] = { "normal.png", "wait.png", "move.png", "attack.png", "select.png", "move_drag.png", "attack_drag.png", ""} |
const int | shift_x [cursor::NUM_CURSORS] = {0, 0, 0, 0, 0, 2, 3, 0} |
const int | shift_y [cursor::NUM_CURSORS] = {0, 0, 0, 0, 0, 20, 22, 0} |
cursor::CURSOR_TYPE | current_cursor = cursor::NORMAL |
int | cursor_x = -1 |
int | cursor_y = -1 |
surface | cursor_buf = NULL |
bool | have_focus = true |
bool | colour_ready = false |
Definition in file cursor.cpp.
static void clear_cache | ( | ) | [static] |
Definition at line 127 of file cursor.cpp.
References cache, cursor_buf, and cursor::NUM_CURSORS.
Referenced by cursor::manager::~manager().
static SDL_Cursor* create_cursor | ( | surface | surf | ) | [static] |
Definition at line 38 of file cursor.cpp.
References a, b, data, g, make_neutral_surface(), and r.
Referenced by get_cursor().
static SDL_Cursor* get_cursor | ( | cursor::CURSOR_TYPE | type | ) | [static] |
Definition at line 116 of file cursor.cpp.
References bw_images, cache, create_cursor(), and image::get_image().
Referenced by cursor::set().
static bool use_colour_cursors | ( | ) | [static] |
Definition at line 33 of file cursor.cpp.
References game_config::editor, and preferences::use_colour_cursors().
Referenced by cursor::draw(), cursor::set(), and cursor::undraw().
const std::string bw_images[cursor::NUM_CURSORS] = { "normal.png", "wait.png", "move.png", "attack.png", "select.png", "move_drag.png", "attack_drag.png", "no_cursor.png"} [static] |
SDL_Cursor* cache[cursor::NUM_CURSORS] = { NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL} [static] |
Definition at line 91 of file cursor.cpp.
Referenced by image::locator::add_to_cache(), clear_cache(), image::exists(), get_cursor(), image::getMinimap(), image::locator::in_cache(), font::line_size(), image::locator::locate_in_cache(), and reset_cache().
const std::string colour_images[cursor::NUM_CURSORS] = { "normal.png", "wait.png", "move.png", "attack.png", "select.png", "move_drag.png", "attack_drag.png", ""} [static] |
bool colour_ready = false [static] |
Definition at line 112 of file cursor.cpp.
Referenced by cursor::draw(), cursor::set(), cursor::set_focus(), and cursor::temporary_use_bw().
cursor::CURSOR_TYPE current_cursor = cursor::NORMAL [static] |
Definition at line 107 of file cursor.cpp.
Referenced by cursor::draw(), cursor::get(), cursor::set(), cursor::set_dragging(), and cursor::undraw().
surface cursor_buf = NULL [static] |
Definition at line 110 of file cursor.cpp.
Referenced by clear_cache(), cursor::draw(), and cursor::undraw().
int cursor_x = -1 [static] |
Definition at line 109 of file cursor.cpp.
Referenced by cursor::draw(), cursor::undraw(), and gui::textbox::update_text_cache().
int cursor_y = -1 [static] |
bool have_focus = true [static] |
const int shift_x[cursor::NUM_CURSORS] = {0, 0, 0, 0, 0, 2, 3, 0} [static] |
Definition at line 104 of file cursor.cpp.
Referenced by cursor::draw(), display::draw_minimap(), and cursor::undraw().
const int shift_y[cursor::NUM_CURSORS] = {0, 0, 0, 0, 0, 20, 22, 0} [static] |
Definition at line 105 of file cursor.cpp.
Referenced by cursor::draw(), display::draw_minimap(), and cursor::undraw().
Generated by doxygen 1.5.5 on 23 May 2008 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |