#include <floating_textbox.hpp>
Public Member Functions | |
floating_textbox () | |
TEXTBOX_MODE | mode () const |
const std::unique_ptr< gui::button > & | check () const |
const std::unique_ptr< gui::textbox > & | box () const |
const std::vector< std::string > & | command_history () const |
void | close () |
void | update_location (game_display &gui) |
void | show (gui::TEXTBOX_MODE mode, const std::string &label, const std::string &check_label, bool checked, game_display &gui) |
void | tab (const std::set< std::string > &dictionary) |
void | memorize_command (const std::string &command) |
bool | active () const |
Private Attributes | |
std::unique_ptr< gui::textbox > | box_ |
std::unique_ptr< gui::button > | check_ |
TEXTBOX_MODE | mode_ |
std::string | label_string_ |
int | label_ |
std::vector< std::string > | command_history_ |
Definition at line 33 of file floating_textbox.hpp.
gui::floating_textbox::floating_textbox | ( | ) |
Definition at line 32 of file floating_textbox.cpp.
|
inline |
Definition at line 48 of file floating_textbox.hpp.
References box_.
Referenced by close(), play_controller::enter_textbox(), play_controller::have_keyboard_focus(), tab(), and play_controller::textbox_move_vertically().
|
inline |
Definition at line 39 of file floating_textbox.hpp.
References box_.
Referenced by play_controller::enter_textbox(), and play_controller::textbox_move_vertically().
|
inline |
Definition at line 38 of file floating_textbox.hpp.
References check_.
void gui::floating_textbox::close | ( | ) |
Definition at line 41 of file floating_textbox.cpp.
References active(), box_, check_, prefs::get(), label_, mode_, font::remove_floating_label(), prefs::set_message_private(), gui::TEXTBOX_MESSAGE, and gui::TEXTBOX_NONE.
Referenced by play_controller::enter_textbox(), play_controller::process_focus_keydown_event(), and show().
|
inline |
Definition at line 40 of file floating_textbox.hpp.
References command_history_.
Referenced by play_controller::textbox_move_vertically().
void gui::floating_textbox::memorize_command | ( | const std::string & | command | ) |
Definition at line 146 of file floating_textbox.cpp.
References command_history_, utils::find(), and prev.
Referenced by play_controller::enter_textbox(), and play_controller::textbox_move_vertically().
|
inline |
Definition at line 37 of file floating_textbox.hpp.
References mode_.
Referenced by play_controller::enter_textbox(), show(), play_controller::tab(), and play_controller::textbox_move_vertically().
void gui::floating_textbox::show | ( | gui::TEXTBOX_MODE | mode, |
const std::string & | label, | ||
const std::string & | check_label, | ||
bool | checked, | ||
game_display & | gui | ||
) |
Definition at line 106 of file floating_textbox.cpp.
References box_, check_, close(), label, label_string_, mode(), mode_, font::SIZE_NORMAL, gui::button::TYPE_CHECK, and update_location().
Referenced by events::menu_handler::speak().
void gui::floating_textbox::tab | ( | const std::set< std::string > & | dictionary | ) |
Definition at line 125 of file floating_textbox.cpp.
References active(), display_chat_manager::add_chat_message(), box_, game_display::get_chat_manager(), game_display::get_singleton(), utils::join(), events::chat_handler::MESSAGE_PRIVATE, mode_, gui::TEXTBOX_MESSAGE, and utils::word_completion().
Referenced by play_controller::tab().
void gui::floating_textbox::update_location | ( | game_display & | gui | ) |
Definition at line 57 of file floating_textbox.cpp.
References font::add_floating_label(), box_, check_, font::get_floating_label_rect(), label_, label_string_, font::LEFT_ALIGN, font::remove_floating_label(), font::floating_label::set_alignment(), font::floating_label::set_clip_rect(), font::floating_label::set_color(), font::floating_label::set_position(), and font::YELLOW_COLOR.
Referenced by show().
|
private |
Definition at line 51 of file floating_textbox.hpp.
Referenced by active(), box(), close(), show(), tab(), and update_location().
|
private |
Definition at line 52 of file floating_textbox.hpp.
Referenced by check(), close(), show(), and update_location().
|
private |
Definition at line 59 of file floating_textbox.hpp.
Referenced by command_history(), and memorize_command().
|
private |
Definition at line 57 of file floating_textbox.hpp.
Referenced by close(), and update_location().
|
private |
Definition at line 56 of file floating_textbox.hpp.
Referenced by show(), and update_location().
|
private |