/// Renders the scorecard for a particular match
Renders the scorecard for a particular match
Renders the scorecard for a particular match
fn draw_scorecard<B>(f: &mut Frame<B>, area: Rect, app: &App, ui_state: &mut UiState)
where
    B: Backend,
{
    let scorecard = app.current_match_scorecard_info(ui_state.focused_tab);
    let text = format_scorecard_info(scorecard);
    ui_state.update_scroll_max_length(text.len() as u16);
    let block = Block::default().borders(Borders::ALL).title("Scorecard");
    let paragraph = Paragraph::new(text)
        .block(block)
        .wrap(Wrap { trim: true })
        .scroll((ui_state.current_scroll_value(), 0));
    f.render_widget(paragraph, area);
}
fn draw_scorecard < B > ( f : & mut Frame < B > , area : Rect , app : & App , ui_state : & mut UiState ) where B : Backend , { let scorecard = app . current_match_scorecard_info ( ui_state . focused_tab ) ; let text = format_scorecard_info ( scorecard ) ; ui_state . update_scroll_max_length ( text . len ( ) as u16 ) ; let block = Block :: default ( ) . borders ( Borders :: ALL ) . title ( " " ) ; let paragraph = Paragraph :: new ( text ) . block ( block ) . wrap ( Wrap { trim : true } ) . scroll ( ( ui_state . current_scroll_value ( ) , 0 ) ) ; f . render_widget ( paragraph , area ) ; }
Renders the scorecard for a particular match
Renders the scorecard for a particular match
f
&mut Frame<B>
area
Rect
app
&App
ui_state
&mut UiState