|
|
|
@ -1,4 +1,4 @@
@@ -1,4 +1,4 @@
|
|
|
|
|
use ctru::applets::mii_selector::MiiSelector; |
|
|
|
|
use ctru::applets::mii_selector::{LaunchError, MiiSelector, Options}; |
|
|
|
|
use ctru::prelude::*; |
|
|
|
|
|
|
|
|
|
fn main() { |
|
|
|
@ -10,20 +10,24 @@ fn main() {
@@ -10,20 +10,24 @@ fn main() {
|
|
|
|
|
let _console = Console::new(gfx.top_screen.borrow_mut()); |
|
|
|
|
|
|
|
|
|
let mut mii_selector = MiiSelector::new(); |
|
|
|
|
mii_selector.set_options(Options::MII_SELECTOR_CANCEL); |
|
|
|
|
mii_selector.set_initial_index(3); |
|
|
|
|
mii_selector.blacklist_user_mii(0.into()); |
|
|
|
|
mii_selector.set_title("Great Mii Selector!"); |
|
|
|
|
|
|
|
|
|
let result = mii_selector.launch().unwrap(); |
|
|
|
|
|
|
|
|
|
println!("Is Mii selected?: {:?}", result.is_mii_selected); |
|
|
|
|
println!("Mii type: {:?}", result.mii_type); |
|
|
|
|
println!("Name: {:?}", result.mii_data.name); |
|
|
|
|
println!("Author: {:?}", result.mii_data.author_name); |
|
|
|
|
println!( |
|
|
|
|
"Does the Mii have moles?: {:?}", |
|
|
|
|
result.mii_data.mole_details.is_enabled |
|
|
|
|
); |
|
|
|
|
match mii_selector.launch() { |
|
|
|
|
Ok(result) => { |
|
|
|
|
println!("Mii type: {:?}", result.mii_type); |
|
|
|
|
println!("Name: {:?}", result.mii_data.name); |
|
|
|
|
println!("Author: {:?}", result.mii_data.author_name); |
|
|
|
|
println!( |
|
|
|
|
"Does the Mii have moles?: {:?}", |
|
|
|
|
result.mii_data.mole_details.is_enabled |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
Err(LaunchError::InvalidChecksum) => println!("Corrupt Mii selected"), |
|
|
|
|
Err(LaunchError::NoMiiSelected) => println!("No Mii selected"), |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Main loop
|
|
|
|
|
while apt.main_loop() { |
|
|
|
|