fn render_input_box(&self, screen: &mut Screen) {
        let mut field = self.buffer.iter().collect::<String>();
        let additional = coord::to_index(self.actual_max) - self.buffer.len();
        field.extend(iter::repeat(' ').take(additional));

        let style = Style::new()
            .align(1, 2)
            .top_margin(self.y_of_box())
            .colors(self.dialog.box_colors);
        let string = tstring![&field];
        screen.styled_text(&string, style);

        let width = screen.size().x;
        let correction = coord::to_index(self.actual_max % 2 + width % 2 + 1);
        let length = field.len() - correction % 2;

        field.clear();
        for i in 0 .. length + 1 {
            if i == self.cursor {
                field.push('¯')
            } else {
                field.push(' ')
            }
        }

        let style = Style::new()
            .align(1, 2)
            .top_margin(self.y_of_box() + 1)
            .left_margin(1)
            .colors(self.dialog.cursor_colors);
        let string = tstring![&field];
        screen.styled_text(&string, style);
    }
/// Renders the input box of the input dialog.
Renders the input box of the input dialog.
Renders the input box of the input dialog .
fn render_input_box(&self, screen: &mut Screen) {
        let mut field = self.buffer.iter().collect::<String>();
        let additional = coord::to_index(self.actual_max) - self.buffer.len();
        field.extend(iter::repeat(' ').take(additional));
        let style = Style::new()
            .align(1, 2)
            .top_margin(self.y_of_box())
            .colors(self.dialog.box_colors);
        let string = tstring![&field];
        screen.styled_text(&string, style);
        let width = screen.size().x;
        let correction = coord::to_index(self.actual_max % 2 + width % 2 + 1);
        let length = field.len() - correction % 2;
        field.clear();
        for i in 0 .. length + 1 {
            if i == self.cursor {
                field.push('¯')
            } else {
                field.push(' ')
            }
        }
        let style = Style::new()
            .align(1, 2)
            .top_margin(self.y_of_box() + 1)
            .left_margin(1)
            .colors(self.dialog.cursor_colors);
        let string = tstring![&field];
        screen.styled_text(&string, style);
    }
fn render_input_box ( & self , screen : & mut Screen ) { let mut field = self . buffer . iter ( ) . collect :: < String > ( ) ; let additional = coord :: to_index ( self . actual_max ) - self . buffer . len ( ) ; field . extend ( iter :: repeat ( ' ' ) . take ( additional ) ) ; let style = Style :: new ( ) . align ( 1 , 2 ) . top_margin ( self . y_of_box ( ) ) . colors ( self . dialog . box_colors ) ; let string = tstring ! [ field ] ; screen . styled_text ( & string , style ) ; let width = screen . size ( ) . x ; let correction = coord :: to_index ( self . actual_max % 2 + width % 2 + 1 ) ; let length = field . len ( ) - correction % 2 ; field . clear ( ) ; for i in 0 .. length + 1 { if i == self . cursor { field . push ( '¯') } else { field . push ( ' ' ) } } let style = Style :: new ( ) . align ( 1 , 2 ) . top_margin ( self . y_of_box ( ) + 1 ) . left_margin ( 1 ) . colors ( self . dialog . cursor_colors ) ; let string = tstring ! [ field ] ; screen . styled_text ( & string , style ) ; }
Renders the input box of the input dialog.
Renders the input box of the input dialog .
&self
screen
&mut Screen
&self
screen
&mut Screen