pub struct PopUp { /* private fields */ }Expand description
Configuration struct to set up the Error applet.
Implementations§
Source§impl PopUp
impl PopUp
Sourcepub fn new(word_wrap: WordWrap) -> Self
pub fn new(word_wrap: WordWrap) -> Self
Initializes the error applet with the provided word wrap setting.
Sourcepub fn writer(&mut self) -> Utf16Writer<'_>
pub fn writer(&mut self) -> Utf16Writer<'_>
Returns a Utf16Writer that writes its output to the PopUp’s internal text buffer.
§Notes
The input will be converted to UTF-16 for display with the applet, and the message will be truncated if it exceeds 1900 UTF-16 code units in length after conversion.
§Example
use ctru::applets::error::{PopUp, WordWrap};
use std::fmt::Write;
let mut popup = PopUp::new(WordWrap::Enabled);
let _ = write!(popup.writer(), "Look mom, I'm a custom error message!");