XS Framework
A 3DS homebrew development framework.
 
Loading...
Searching...
No Matches
swkbd.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <3ds.h>
4#include <cstddef>
5#include <string>
6
7namespace xs::hid {
8
9// Swkbd flags
11 SWKBD_NORMAL = 1 << 0, // normal text input
12 SWKBD_NUMERIC = 1 << 1, // numeric keypad only
13 SWKBD_PASSWORD = 1 << 2, // hide input (password style)
14};
15
16class Swkbd {
17 public:
18 Swkbd(int flags = SWKBD_NORMAL, size_t maxLen = 64);
19
20 void setHint(const char *hint);
21 void setValidation(SwkbdValidInput input);
22 std::string getInput();
23
24 private:
25 SwkbdState kbd;
26 size_t maxLen;
27};
28
29} // namespace xs::hid
void setValidation(SwkbdValidInput input)
void setHint(const char *hint)
std::string getInput()
Swkbd(int flags=SWKBD_NORMAL, size_t maxLen=64)
Definition controls.hpp:11
SwkbdFlags
Definition swkbd.hpp:10
@ SWKBD_NUMERIC
Definition swkbd.hpp:12
@ SWKBD_NORMAL
Definition swkbd.hpp:11
@ SWKBD_PASSWORD
Definition swkbd.hpp:13