mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-16 08:38:26 +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(())
|
||||
}
|
||||
|
||||
|
||||
/// 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(
|
||||
&self,
|
||||
title: &str,
|
||||
|
|
|
|||
Loading…
Reference in a new issue