#include <halo.hpp>
Public Member Functions | |
manager () | |
handle | add (int x, int y, const std::string &image, const map_location &loc, halo::ORIENTATION orientation=NORMAL, bool infinite=true) |
Add a haloing effect using 'image centered on (x,y). More... | |
void | set_location (const handle &h, int x, int y) |
Set the position of an existing haloing effect, according to its handle. More... | |
void | remove (const handle &h) |
Remove the halo with the given handle. More... | |
void | update () |
Process animations, remove deleted halos, and invalidate screen regions now requiring redraw. More... | |
void | render (const rect &r) |
Render halos in region. More... | |
Private Attributes | |
std::shared_ptr< halo_impl > | impl_ |
handle halo::manager::add | ( | int | x, |
int | y, | ||
const std::string & | image, | ||
const map_location & | loc, | ||
halo::ORIENTATION | orientation = NORMAL , |
||
bool | infinite = true |
||
) |
Add a haloing effect using 'image centered on (x,y).
0 | is the invalid handle. |
If the halo is attached to an item, it needs to be hidden if the shroud is active. (Note it will be shown with the fog active.) If it is not attached to an item, the location should be set to -1, -1
Definition at line 402 of file halo.cpp.
Referenced by unit_frame::redraw(), and unit_drawer::redraw_unit().
void halo::manager::remove | ( | const handle & | h | ) |
Remove the halo with the given handle.
Definition at line 416 of file halo.cpp.
References h, impl_, and halo::NO_HALO.
Referenced by unit_drawer::redraw_unit().
void halo::manager::render | ( | const rect & | r | ) |
Render halos in region.
Definition at line 427 of file halo.cpp.
References impl_.
Referenced by display::expose().
void halo::manager::set_location | ( | const handle & | h, |
int | x, | ||
int | y | ||
) |
Set the position of an existing haloing effect, according to its handle.
Definition at line 410 of file halo.cpp.
Referenced by unit_drawer::redraw_unit().
void halo::manager::update | ( | ) |
Process animations, remove deleted halos, and invalidate screen regions now requiring redraw.
Definition at line 422 of file halo.cpp.
References impl_.
Referenced by display::invalidate_animations().
|
private |