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. 24
      ctru-rs/src/applets/swkbd.rs

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

@ -135,10 +135,10 @@ impl MiiSelector { @@ -135,10 +135,10 @@ impl MiiSelector {
/// 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
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
// 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.

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

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

Loading…
Cancel
Save