76 void move(
double xmove,
double ymove);
109 int xpos(std::size_t width)
const;
SDL_Point get_draw_size() const
Return the size of the label in drawing coordinates.
uint8_t get_alpha(int time)
void show(const bool value)
void set_move(double xmove, double ymove)
rect get_bg_rect(const rect &text_rect) const
LABEL_SCROLL_MODE scroll_
void update(int time)
Finalize draw position and alpha, and queue redrawing if changed.
bool expired(int time) const
void set_lifetime(int lifetime, int fadeout=100)
LABEL_SCROLL_MODE scroll() const
int get_time_alive(int current_time) const
bool create_texture()
Ensure a texture for this floating label exists, creating one if needed.
void set_position(double xpos, double ypos)
floating_label(const std::string &text)
void set_alignment(ALIGN align)
int xpos(std::size_t width) const
int get_fade_time() const
void set_color(const color_t &color)
void set_border_size(int border)
void move(double xmove, double ymove)
Change the floating label's position.
void set_clip_rect(const SDL_Rect &r)
void set_bg_color(const color_t &bg_color)
void set_scroll_mode(LABEL_SCROLL_MODE scroll)
void draw()
Draw the label to the screen.
void undraw()
Mark the last drawn location as requiring redraw.
void set_font_size(int font_size)
Wrapper class to encapsulate creation and management of an SDL_Texture.
int w() const
The draw-space width of the texture, in pixels.
int h() const
The draw-space height of the texture, in pixels.
@ border
The border of the map.
Collection of helper functions relating to Pango formatting.
int add_floating_label(const floating_label &flabel)
add a label floating on the screen above everything else.
void remove_floating_label(int handle, int fadeout)
removes the floating label given by 'handle' from the screen
void show_floating_label(int handle, bool value)
hides or shows a floating label
void scroll_floating_labels(double xmove, double ymove)
moves all floating labels that have 'scroll_mode' set to ANCHOR_LABEL_MAP
SDL_Rect get_floating_label_rect(int handle)
void update_floating_labels()
void move_floating_label(int handle, double xmove, double ymove)
moves the floating label given by 'handle' by (xmove,ymove)
void draw_floating_labels()
void show(const std::string &window_id, const t_string &message, const point &mouse, const SDL_Rect &source_rect)
Shows a tip.
std::shared_ptr< halo_record > handle
std::size_t size(const std::string &str)
Length in characters of a UTF-8 string.
Contains the SDL_Rect helper code.
The basic class for representing 8-bit RGB or RGBA colour values.
structure which will hide all current floating labels, and cause floating labels instantiated after i...
~floating_label_context()
An abstract description of a rectangle with integer coordinates.