VirtualKeyboard: L/R append @ and /, also fFix accidentally initing with placeholder instead of initial text

This commit is contained in:
UnknownShadow200 2024-05-09 23:08:46 +10:00
parent c4e20e94f4
commit 7fd7d489f1
3 changed files with 9 additions and 5 deletions

View File

@ -207,6 +207,10 @@ static void VirtualKeyboard_ProcessDown(void* obj, int key, cc_bool was) {
VirtualKeyboard_Backspace(); VirtualKeyboard_Backspace();
} else if (key == CCPAD_Y) { } else if (key == CCPAD_Y) {
VirtualKeyboard_AppendChar(' '); VirtualKeyboard_AppendChar(' ');
} else if (key == CCPAD_L) {
VirtualKeyboard_AppendChar('@');
} else if (key == CCPAD_R) {
VirtualKeyboard_AppendChar('/');
} }
} }
@ -330,7 +334,7 @@ static void VirtualKeyboard_Open(struct OpenKeyboardArgs* args, cc_bool launcher
kb_shift = false; kb_shift = false;
kb_str.length = 0; kb_str.length = 0;
if (args) String_AppendConst(&kb_str, args->placeholder); String_AppendString(&kb_str, args->text);
if (launcher) { if (launcher) {
KB_MarkDirty = VirtualKeyboard_MarkDirty2D; KB_MarkDirty = VirtualKeyboard_MarkDirty2D;

View File

@ -130,7 +130,7 @@ void Window_Create2D(int width, int height) {
}; };
vdp2_scrn_bitmap_format_set(&format); vdp2_scrn_bitmap_format_set(&format);
vdp2_scrn_priority_set(VDP2_SCRN_NBG0, 7); vdp2_scrn_priority_set(VDP2_SCRN_NBG0, 5);
vdp2_scrn_display_set(VDP2_SCRN_DISP_NBG0); vdp2_scrn_display_set(VDP2_SCRN_DISP_NBG0);
const vdp2_vram_cycp_t vram_cycp = { const vdp2_vram_cycp_t vram_cycp = {

View File

@ -350,8 +350,8 @@ mergeInto(LibraryManager.library, {
// previously you were required to add interop_LoadIndexedDB to Module.preRun array // previously you were required to add interop_LoadIndexedDB to Module.preRun array
// to load the indexedDB asynchronously *before* starting ClassiCube, because it // to load the indexedDB asynchronously *before* starting ClassiCube, because it
// could not load indexedDB asynchronously // could not load indexedDB asynchronously
// however, as ClassiCube now loads IndexedDB asynchronously itself, this is no longer // however, as ClassiCube now loads IndexedDB asynchronously itself, this is
// necessary, but is kept arounf foe backwards compatibility // no longer necessary, but is kept around for backwards compatibility
}, },
interop_SaveNode__deps: ['IDBFS_getDB', 'IDBFS_storeRemoteEntry'], interop_SaveNode__deps: ['IDBFS_getDB', 'IDBFS_storeRemoteEntry'],
interop_SaveNode: function(path) { interop_SaveNode: function(path) {
@ -441,7 +441,7 @@ mergeInto(LibraryManager.library, {
req.onsuccess = function() { req.onsuccess = function() {
db = req.result; db = req.result;
window.IDBFS_db = db; window.IDBFS_db = db;
// browser will sometimes close connection behind the scenes // browser will sometimes close IndexedDB connection behind the scenes
db.onclose = function(ev) { db.onclose = function(ev) {
console.log('IndexedDB connection closed unexpectedly!'); console.log('IndexedDB connection closed unexpectedly!');
window.IDBFS_db = null; window.IDBFS_db = null;