pierro 0.1.0

An immediate mode UI library for Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

use crate::{Response, Size, UINodeParams, UI};

use super::label_text_style;

pub fn label<S: Into<String>>(ui: &mut UI, label: S) -> Response {
    let text_style = label_text_style(ui);

    ui.node(
        UINodeParams::new(Size::text(), Size::text())
            .with_text(label)
            .with_text_style(text_style)
    )

}