I'm developing for PC (not tablet/mobile) and would like to use a virtual keyboard for the player to enter their name and save game file names etc but a google search fill the results with love.keyboard.
Anyone got a lib or know of one that will work without me coding my own? Really just looking for 26 letters. Even numbers are optional but nice. Not looking for bling. Thanks.
Anyone got or knows an onscreen virtual keyboard?
Anyone got or knows an onscreen virtual keyboard?
Last project:
https://togfox.itch.io/hwarang
A card game that brings sword fighting to life.
Current project:
Idle gridiron. Set team orders then idle and watch: https://togfox.itch.io/idle-gridiron
https://togfox.itch.io/hwarang
A card game that brings sword fighting to life.
Current project:
Idle gridiron. Set team orders then idle and watch: https://togfox.itch.io/idle-gridiron
Re: Anyone got or knows an onscreen virtual keyboard?
yes, here you are: https://codeberg.org/glitchapp/love2d-code-editortogFox wrote: ↑Tue Jun 11, 2024 10:49 am I'm developing for PC (not tablet/mobile) and would like to use a virtual keyboard for the player to enter their name and save game file names etc but a google search fill the results with love.keyboard.
Anyone got a lib or know of one that will work without me coding my own? Really just looking for 26 letters. Even numbers are optional but nice. Not looking for bling. Thanks.
I have other layouts like this here: https://codeberg.org/glitchapp/love-QWERTY-mobile
and this one may be better for big screens: https://codeberg.org/glitchapp/love-QWERTY
Feel free to fork them and I hope you find them useful.
* It doesn't matter if you plan to use it on desktop or touch devices, they work on both, all you need to do is to adjust the size and space of the keys and disable the touch functions if you don't need them
Re: Anyone got or knows an onscreen virtual keyboard?
Will it be easy to extract just the keyboard to use in my game or is it all tangled up with the editor?
Last project:
https://togfox.itch.io/hwarang
A card game that brings sword fighting to life.
Current project:
Idle gridiron. Set team orders then idle and watch: https://togfox.itch.io/idle-gridiron
https://togfox.itch.io/hwarang
A card game that brings sword fighting to life.
Current project:
Idle gridiron. Set team orders then idle and watch: https://togfox.itch.io/idle-gridiron
Re: Anyone got or knows an onscreen virtual keyboard?
As you said you want to use it on a desktop I guess you prefer the big one, I attached it here.
There's nothing else apart from the keyboard in this love game.
to retrieve the pressed key there is this code in the love.update function:
so the variable selectedKey retrieves the keys you press on the touch keyboard.
The position, size of the keyboard and keys, space between keys etc you can tweak from this file:
https://codeberg.org/glitchapp/love-QWE ... yboard.lua
Beware that I declared those variable twice, remove one of them.
Any question you have feel free to ask.
There's nothing else apart from the keyboard in this love game.
to retrieve the pressed key there is this code in the love.update function:
Code: Select all
if selectedKey then
print("Selected Key:", selectedKey)
end
The position, size of the keyboard and keys, space between keys etc you can tweak from this file:
https://codeberg.org/glitchapp/love-QWE ... yboard.lua
Code: Select all
-- Define the position and size of the keyboard
--keyboardX = 50
--keyboardY = 100
keyWidth = 150
keyHeight = 150
keyPadding = 2
Any question you have feel free to ask.
- Attachments
-
- love-QWERTY.love
- (630.26 KiB) Downloaded 144 times
Re: Anyone got or knows an onscreen virtual keyboard?
Thanks. I forked and made a pull request. Feel free to decline if you don't have the time or interest to review my PR.
Last project:
https://togfox.itch.io/hwarang
A card game that brings sword fighting to life.
Current project:
Idle gridiron. Set team orders then idle and watch: https://togfox.itch.io/idle-gridiron
https://togfox.itch.io/hwarang
A card game that brings sword fighting to life.
Current project:
Idle gridiron. Set team orders then idle and watch: https://togfox.itch.io/idle-gridiron
Re: Anyone got or knows an onscreen virtual keyboard?
I accepted it and restored the resolution because without resizing the keyboard is partially out of the screen, there are two branches now: one with your resolution and one with the original one which keeps all the keyboard visible.
I'm ok with your changes, I usually separate the drawing functions on different files to keep everything modular but I'm fine with putting all the keyboard together.
I'm ok with your changes, I usually separate the drawing functions on different files to keep everything modular but I'm fine with putting all the keyboard together.
Who is online
Users browsing this forum: No registered users and 2 guests