mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-18 08:52:45 +00:00
documentation for slider
This commit is contained in:
parent
5abfca61d6
commit
1977f945da
2 changed files with 27 additions and 0 deletions
BIN
docs/images/modals_slider.png
Normal file
BIN
docs/images/modals_slider.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 30 KiB |
|
|
@ -386,6 +386,33 @@ impl Modals {
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// Human interaction-enabled slider.
|
||||||
|
///
|
||||||
|
/// - Interactable until home/enter is pressed.
|
||||||
|
/// - Use the arrow keys to shift the slider by a step in either direction.
|
||||||
|
/// - Note that it is possible to exceed start or end if you choose the 'step' value poorly.
|
||||||
|
/// - Title text wraps, burden is on the consumer not to exceed the available screen space.
|
||||||
|
///
|
||||||
|
/// <details>
|
||||||
|
/// <summary>Example Image</summary>
|
||||||
|
///
|
||||||
|
/// 
|
||||||
|
///
|
||||||
|
/// </details>
|
||||||
|
///
|
||||||
|
/// # Example
|
||||||
|
/// ```
|
||||||
|
/// use modals::Modals;
|
||||||
|
/// use xous_names::XousNames;
|
||||||
|
/// let xns = XousNames::new().unwrap();
|
||||||
|
/// let modals = Modals::new(&xns).unwrap();
|
||||||
|
///
|
||||||
|
/// let result = modals
|
||||||
|
/// .slider("Human interaction-enabled slider!", 0, 100, 50, 1)
|
||||||
|
/// .expect("slider test failed");
|
||||||
|
/// log::info!("result: {}", &result);
|
||||||
|
/// ```
|
||||||
pub fn slider(
|
pub fn slider(
|
||||||
&self,
|
&self,
|
||||||
title: &str,
|
title: &str,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue