Browse Source

Finish working on applets

pull/107/head
Andrea Ciliberti 2 years ago
parent
commit
9dcae23c23
  1. 4
      ctru-rs/src/applets/mii_selector.rs
  2. 20
      ctru-rs/src/applets/swkbd.rs

4
ctru-rs/src/applets/mii_selector.rs

@ -135,10 +135,10 @@ impl MiiSelector {
/// Set where the cursor will be. /// Set where the cursor will be.
/// If there's no Mii at that index, the cursor will start at the Mii with the index 0 /// If there's no Mii at that index, the cursor will start at the Mii with the index 0
pub fn set_initial_index(&mut self, index: u32) { pub fn set_initial_index(&mut self, index: usize) {
// This function is static inline in libctru // This function is static inline in libctru
// https://github.com/devkitPro/libctru/blob/af5321c78ee5c72a55b526fd2ed0d95ca1c05af9/libctru/include/3ds/applets/miiselector.h#L155 // https://github.com/devkitPro/libctru/blob/af5321c78ee5c72a55b526fd2ed0d95ca1c05af9/libctru/include/3ds/applets/miiselector.h#L155
self.config.initial_index = index self.config.initial_index = index as u32;
} }
/// Launch the Mii Selector. /// Launch the Mii Selector.

20
ctru-rs/src/applets/swkbd.rs

@ -64,19 +64,17 @@ pub enum ValidInput {
bitflags! { bitflags! {
/// Keyboard feature flags /// Keyboard feature flags
pub struct Features: u32 { pub struct Features: u32 {
const ParentalPin = ctru_sys::SWKBD_PARENTAL; const PARENTAL_PIN = ctru_sys::SWKBD_PARENTAL;
const DarkenTopScreen = ctru_sys::SWKBD_DARKEN_TOP_SCREEN; const DARKEN_TOP_SCREEN = ctru_sys::SWKBD_DARKEN_TOP_SCREEN;
const PredictiveInput = ctru_sys::SWKBD_PREDICTIVE_INPUT; const PREDICTIVE_INPUT = ctru_sys::SWKBD_PREDICTIVE_INPUT;
const Multiline = ctru_sys::SWKBD_MULTILINE; const MULTILINE = ctru_sys::SWKBD_MULTILINE;
const FixedWidth = ctru_sys::SWKBD_FIXED_WIDTH; const FIXED_WIDTH = ctru_sys::SWKBD_FIXED_WIDTH;
const AllowHome = ctru_sys::SWKBD_ALLOW_HOME; const ALLOW_HOME = ctru_sys::SWKBD_ALLOW_HOME;
const AllowReset = ctru_sys::SWKBD_ALLOW_RESET; const ALLOW_RESET = ctru_sys::SWKBD_ALLOW_RESET;
const AllowPower = ctru_sys::SWKBD_ALLOW_POWER; const ALLOW_POWER = ctru_sys::SWKBD_ALLOW_POWER;
const DefaultQwerty = ctru_sys::SWKBD_DEFAULT_QWERTY; const DEFAULT_QWERTY = ctru_sys::SWKBD_DEFAULT_QWERTY;
} }
}
bitflags! {
/// Keyboard input filtering flags /// Keyboard input filtering flags
pub struct Filters: u32 { pub struct Filters: u32 {
const DIGITS = ctru_sys::SWKBD_FILTER_DIGITS; const DIGITS = ctru_sys::SWKBD_FILTER_DIGITS;

Loading…
Cancel
Save