| 30 | } |
| 31 | |
| 32 | void Window_Help::SetText(std::string text, int color, Text::Alignment align, bool halfwidthspace) { |
| 33 | if (this->text != text || this->color != color || this->align != align) { |
| 34 | contents->Clear(); |
| 35 | |
| 36 | text_x_offset = 0; |
| 37 | AddText(text, color, align, halfwidthspace); |
| 38 | |
| 39 | this->text = std::move(text); |
| 40 | this->align = align; |
| 41 | this->color = color; |
| 42 | this->text_x_scroll = 0; |
| 43 | this->text_x_scroll_dir = false; |
| 44 | this->text_x_width = text_x_offset; |
| 45 | } |
| 46 | } |
| 47 | |
| 48 | void Window_Help::Clear() { |
| 49 | this->text = ""; |
no test coverage detected