The Battle for Wesnoth  1.15.1+dev
Public Member Functions | Private Attributes | List of all members
halo::manager Class Reference

#include <halo.hpp>

Public Member Functions

 manager (display &screen)
 
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 unrender (std::set< map_location > invalidated_locations)
 Render and unrender haloes. More...
 
void render ()
 

Private Attributes

std::shared_ptr< halo_implimpl_
 

Detailed Description

Definition at line 39 of file halo.hpp.

Constructor & Destructor Documentation

◆ manager()

halo::manager::manager ( display screen)

Definition at line 449 of file halo.cpp.

Member Function Documentation

◆ add()

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).

Returns
The handle to the halo object.
Return values
0is 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 452 of file halo.cpp.

References impl_.

Referenced by unit_frame::redraw(), and unit_drawer::redraw_unit().

◆ remove()

void halo::manager::remove ( const handle h)

Remove the halo with the given handle.

Definition at line 466 of file halo.cpp.

References impl_, and halo::NO_HALO.

Referenced by unit_drawer::redraw_unit().

◆ render()

void halo::manager::render ( )

Definition at line 483 of file halo.cpp.

References impl_.

◆ set_location()

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 460 of file halo.cpp.

References impl_.

Referenced by unit_drawer::redraw_unit().

◆ unrender()

void halo::manager::unrender ( std::set< map_location invalidated_locations)

Render and unrender haloes.

Which haloes are rendered is determined by invalidated_locations and the internal state in the control sets (in halo.cpp).

Definition at line 478 of file halo.cpp.

References impl_.

Member Data Documentation

◆ impl_

std::shared_ptr<halo_impl> halo::manager::impl_
private

Definition at line 72 of file halo.hpp.

Referenced by add(), remove(), render(), set_location(), and unrender().


The documentation for this class was generated from the following files: