Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tallbl0nde/nxboard
A copy of the Nintendo Switch keyboard for LovePotion
https://github.com/tallbl0nde/nxboard
Last synced: 11 days ago
JSON representation
A copy of the Nintendo Switch keyboard for LovePotion
- Host: GitHub
- URL: https://github.com/tallbl0nde/nxboard
- Owner: tallbl0nde
- License: mit
- Created: 2018-11-03T07:42:27.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2019-08-31T05:15:50.000Z (over 5 years ago)
- Last Synced: 2024-10-25T03:57:51.804Z (about 2 months ago)
- Language: Lua
- Homepage:
- Size: 60.5 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# NXboard
A copy of the Nintendo Switch keyboard for LovePotion.**This is likely no longer of use as the native keyboard can be used in newer versions of LovePotion. However, this keyboard can still be used in applet mode.**
![Preview](https://user-images.githubusercontent.com/40382856/48655519-bc827f00-ea67-11e8-909e-203f62aafdfb.jpg)
# PreparationDownload the latest [NXboard.zip](https://github.com/tallbl0nde/NXboard/releases/latest) and extract the contents to your _game_ directory.
_If you wish to change the location of the resources folder, make sure you change the 'path variable' in NXboard.lua_Set up your main.lua as seen in [template.lua](https://github.com/tallbl0nde/NXboard/blob/master/template.lua) so that appropriate events are passed to NXboard.
# Usage
To invoke the keyboard use `[name]:init(var, buffer, theme, type, omit_keys, char_limit, message)` where the arguments are as follows:
* var: A string containing the name of the variable to return/copy the buffer to when the keyboard is closed
* buffer: A string (can be a variable) containing the contents of the keyboard buffer when invoked
* theme: A string (either "dark" or "light") which sets the theme of the keyboard
* type: A string (either "keyboard" or "numpad") which sets which layout is shown
* omit_keys: A table containing single characters that will not be allowed to be typed (valid examples are {} [allow all] or {'a','b','c'} [allow everything but a, b or c] or {"only_numbers"} [only numbers will be allowed])
* char_limit: A number specifying the maximum length of the keyboard buffer allowed
* message: A string to display when the buffer is empty_You will most likely call this in touch/gamepad events as seen in the examples_
For example, if you wanted to store the user's input in the variable _p1_number_, and open a dark numpad with a limit of 10 digits, allowing only numbers to be entered you would type something similar to:
`[name]:init("p1_number",p1_number,"dark","numpad",{"only_numbers"},10,"Enter a 10 digit number...")`