This commit is contained in:
Fangal-Airbag 2026-04-11 22:30:39 +08:00 committed by GitHub
commit f90cbc8902
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 17 additions and 14 deletions

View File

@ -98,10 +98,10 @@ enum class State
enum class InputFormType
{
//! Input form seen when adding an NNID on Friends List or creating a folder on the System Menu. (Individual square design with up to 40 characters)
InputForm0 = 0,
//! The default input layout that is usually used (Page design)
Default = 1,
//! Spaced boxes design with up to 40 characters
Boxes = 0,
//! The page design
Page = 1,
};
enum class KeyboardLayout
@ -247,7 +247,7 @@ WUT_CHECK_SIZE(KeyboardArg, 0xC0);
struct InputFormArg
{
//! The type of input form
InputFormType type = InputFormType::Default;
InputFormType type = InputFormType::Page;
int32_t unk_0x04 = -1;
//! Initial string to open the keyboard with
const char16_t *initialText = nullptr;
@ -258,8 +258,8 @@ struct InputFormArg
//! Which password inputting preset to use
nn::swkbd::PasswordMode passwordMode = nn::swkbd::PasswordMode::Clear;
uint32_t unk_0x18 = 0;
//! Whether or not to draw a cursor. Exclusive to the inputform0 input form type.
bool drawInput0Cursor = false;
//! Whether or not to draw a cursor. Exclusive to the boxes input form type.
bool drawCursorForBoxes = true;
//! Whether or not to highlight the initial string. Exclusive to the Default input form type.
bool higlightInitialText = false;
//! Whether or not to show a copy and a paste button.
@ -273,7 +273,7 @@ WUT_CHECK_OFFSET(InputFormArg, 0x0C, hintText);
WUT_CHECK_OFFSET(InputFormArg, 0x10, maxTextLength);
WUT_CHECK_OFFSET(InputFormArg, 0x14, passwordMode);
WUT_CHECK_OFFSET(InputFormArg, 0x18, unk_0x18);
WUT_CHECK_OFFSET(InputFormArg, 0x1C, drawInput0Cursor);
WUT_CHECK_OFFSET(InputFormArg, 0x1C, drawCursorForBoxes);
WUT_CHECK_OFFSET(InputFormArg, 0x1D, higlightInitialText);
WUT_CHECK_OFFSET(InputFormArg, 0x1E, showCopyPasteButtons);
WUT_CHECK_SIZE(InputFormArg, 0x20);

View File

@ -1,6 +1,8 @@
#include <coreinit/filesystem.h>
#include <coreinit/memdefaultheap.h>
#include <nn/erreula.h>
#include <sndcore2/core.h>
#include <sysapp/launch.h>
#include <vpad/input.h>
#include <whb/gfx.h>
@ -15,7 +17,7 @@ main(int argc, char **argv)
WHBProcInit();
WHBGfxInit();
FSInit();
VPADInit();
AXInit();
// Create FSClient for erreula
FSClient *fsClient = (FSClient *)MEMAllocFromDefaultHeap(sizeof(FSClient));
@ -33,6 +35,9 @@ main(int argc, char **argv)
return -1;
}
// Play a sound effect that will play when erreula appears on screen
nn::erreula::PlayAppearSE(true);
// Show the error viewer
nn::erreula::AppearArg appearArg;
appearArg.errorArg.errorType = nn::erreula::ErrorType::Message2Button;
@ -62,7 +67,8 @@ main(int argc, char **argv)
if (nn::erreula::IsDecideSelectButtonError()) {
nn::erreula::DisappearErrorViewer();
break;
// Cause ProcUI to exit.
SYSLaunchMenu();
}
WHBGfxBeginRender();

View File

@ -1,5 +1,6 @@
#include <coreinit/filesystem.h>
#include <coreinit/memdefaultheap.h>
#include <gx2/surface.h>
#include <nn/swkbd.h>
#include <sndcore2/core.h>
#include <sysapp/launch.h>
@ -17,7 +18,6 @@ main(int argc, char **argv)
WHBProcInit();
WHBGfxInit();
FSInit();
VPADInit();
AXInit();
// Create FSClient for swkbd
@ -35,9 +35,6 @@ main(int argc, char **argv)
return -1;
}
// Enable sound
nn::swkbd::MuteAllSound(false);
// Show the keyboard
nn::swkbd::AppearArg appearArg;
appearArg.keyboardArg.configArg.languageType = nn::swkbd::LanguageType::English;