29 #define ERR_DP LOG_STREAM(err, log_display)
64 const int border_size = 10;
66 const int ypos = area.y+area.h-30 - (
check_ !=
nullptr ?
check_->height() + border_size : 0);
83 const int textbox_width = area.w - label_area.w - border_size*3;
85 if(textbox_width <= 0) {
91 box_->set_volatile(
true);
93 area.x + label_area.w + border_size * 2
98 box_->set_location(rect);
102 check_->set_volatile(
true);
103 check_->set_location(
box_->location().x,
box_->location().y +
box_->location().h + border_size);
115 if(check_label !=
"") {
117 check_->set_check(checked);
133 std::vector<std::string> matches(dictionary.begin(), dictionary.end());
136 if (matches.empty())
return;
138 text.append(line_start ?
": " :
" ");
139 }
else if (matches.size() > 1) {
144 box_->set_text(text);
void set_clip_rect(const SDL_Rect &r)
void remove_floating_label(int handle)
removes the floating label given by 'handle' from the screen
util::scoped_ptr< gui::textbox > box_
std::string label_string_
void set_alignment(ALIGN align)
void update_location(game_display &gui)
void set_color(const SDL_Color &color)
void set_position(double xpos, double ypos)
void invalidate_all()
Function to invalidate all tiles.
void set_message_private(bool value)
std::string join(T const &v, const std::string &s=",")
Generates a new string joining container items in a list.
void tab(const std::set< std::string > &dictionary)
int add_floating_label(const floating_label &flabel)
add a label floating on the screen above everything else.
SDL_Rect get_floating_label_rect(int handle)
void show(gui::TEXTBOX_MODE mode, const std::string &label, const std::string &check_label, bool checked, game_display &gui)
SDL_Rect create_rect(const int x, const int y, const int w, const int h)
Creates an empty SDL_Rect.
static lg::log_domain log_display("display")
display_chat_manager & get_chat_manager()
util::scoped_ptr< gui::button > check_
Standard logging facilities (interface).
const SDL_Rect & map_outside_area() const
Returns the available area for a map, this may differ from the above.
CVideo & video()
Gets the underlying screen object.
const SDL_Color YELLOW_COLOR
void add_chat_message(const time_t &time, const std::string &speaker, int side, const std::string &msg, events::chat_handler::MESSAGE_TYPE type, bool bell)
void close(game_display &gui)
GLsizei const GLcharARB ** string
bool word_completion(std::string &text, std::vector< std::string > &wordlist)
Try to complete the last word of 'text' with the 'wordlist'.
TEXTBOX_MODE mode() const