First time poster
I've got an nds program that is working ok so far, but I really need too add a virtual keyboard to it.
Not having much luck so far working out how to make use of the stuff in examples/nds/input/keyboard
I'm setting up my screens like this:
PrintConsole topScreen;
PrintConsole bottomScreen;
videoSetMode(MODE_0_2D);
videoSetModeSub(MODE_0_2D);
vramSetBankA(VRAM_A_MAIN_BG);
vramSetBankC(VRAM_C_SUB_BG);
consoleInit(&topScreen, 3,BgType_Text4bpp, BgSize_T_256x256, 31, 0, true, true);
consoleInit(&bottomScreen, 3,BgType_Text4bpp, BgSize_T_256x256, 31, 0, false, true);
Any suggestions how to get started setting up a virtual keyboard (on the bottom screen) would be appreciated !
Help with nds virtual keyboard examples
Re: Help with nds virtual keyboard examples
keyboardDemoInit installs the keyboard on the subscreen for layer 3.
It is hard to give advice for layers and map/tile bases without knowing what (if anything) you want to use - vram, layers, etc - or maybe explain why keyboardDemoInit wont work for you.
Code: Select all
keyboardInit(NULL, 3, BgType_Text4bpp, BgSize_T_256x512, defaultKeyboard.mapBase, defaultKeyboard.tileBase, false, true);
Re: Help with nds virtual keyboard examples
Well .. I'm able to build keyboard_stdin.nds, however it complains:
"Sorry, no$gba needs a copy of the original GBA BIOS (in a file named gba.rom or no$gba.rom) to execute BIOS sound functions."
My own project compiles and runs without this warning .. I don't need access to sound functions, I'm not sure how/where they are getting pulled in when using the keyboard_stdin.pnproj example.
"Sorry, no$gba needs a copy of the original GBA BIOS (in a file named gba.rom or no$gba.rom) to execute BIOS sound functions."
My own project compiles and runs without this warning .. I don't need access to sound functions, I'm not sure how/where they are getting pulled in when using the keyboard_stdin.pnproj example.
Re: Help with nds virtual keyboard examples
Try desmume instead - or better yet, a real ds!
Re: Help with nds virtual keyboard examples
Ok cool, desmume works without complaint.
I'm not sure how to use both of the screens ? For the most part, I only need to print text, which works great for me in my own project using either consoleSelect(&bottomScreen); or consoleSelect(&topScreen); and print statements. (But with no keyboard)
How can I do this, adding these from template.c has no obvious effect ?
keyboardDemoInit();
keyboardShow();
I assume I'm not using the right screen modes or something like this ..
I'm not sure how to use both of the screens ? For the most part, I only need to print text, which works great for me in my own project using either consoleSelect(&bottomScreen); or consoleSelect(&topScreen); and print statements. (But with no keyboard)
How can I do this, adding these from template.c has no obvious effect ?
keyboardDemoInit();
keyboardShow();
I assume I'm not using the right screen modes or something like this ..
Re: Help with nds virtual keyboard examples
Update: Maybe I should rephrase the question slightly
I can get example projects that use the keyboard (like examples/nds/input/keyboard/keyboard_stdin) to work ok.
I can get example projects that print to both screens (like examples/nds/Graphics/Printing/print_both_screens) to work ok.
What I'm missing is how to get the keyboard use and printing to the both screens working together ?
Does anyone have any suggestions about how to update either of these examples as a way to show how to do this ?
I can get example projects that use the keyboard (like examples/nds/input/keyboard/keyboard_stdin) to work ok.
I can get example projects that print to both screens (like examples/nds/Graphics/Printing/print_both_screens) to work ok.
What I'm missing is how to get the keyboard use and printing to the both screens working together ?
Does anyone have any suggestions about how to update either of these examples as a way to show how to do this ?
Who is online
Users browsing this forum: Ahrefs [Bot] and 2 guests