mirror of
https://github.com/palera1n/palera1n.git
synced 2026-10-24 19:19:48 +02:00
make tui bigger but within 80x24
This commit is contained in:
1 parent
c2a452d3b1
commit
5f5210b08d
5 files changed
+36
-12
No files matched your search
@@ -26,11 +26,12 @@ tui_screen_t tui_screen_options() {
|
||||
tui_bit_info_t setup_rootful_info = { &palerain_flags, palerain_option_setup_rootful };
|
||||
tui_bit_info_t force_revert_info = { &checkrain_flags, checkrain_option_force_revert };
|
||||
tui_bit_info_t safemode_info = { &checkrain_flags, checkrain_option_safemode };
|
||||
const char* bootargs_entered = NULL;
|
||||
|
||||
int ret = MAIN_SCREEN;
|
||||
|
||||
newtCenteredWindow(60, 16, "palera1n version 2.0.0");
|
||||
newtComponent backButton = newtCompactButton(50, 14, "Back");
|
||||
newtCenteredWindow(WIDTH, HEIGHT, "palera1n version 2.0.0");
|
||||
newtComponent backButton = newtCompactButton(66, 17, "Back");
|
||||
|
||||
newtComponent verboseBootBox = newtCheckbox(1, 1, "Verbose boot", CHECKBOX_STATE(kpf_flags, checkrain_option_verbose_boot), NULL, NULL);
|
||||
newtComponent rootfulBox = newtCheckbox(1, 2, "Rootful", CHECKBOX_STATE(palerain_flags, palerain_option_rootful), NULL, NULL);
|
||||
@@ -38,6 +39,11 @@ tui_screen_t tui_screen_options() {
|
||||
newtComponent forceRevertBox = newtCheckbox(1, 4, "Restore system", CHECKBOX_STATE(checkrain_flags, checkrain_option_force_revert), NULL, NULL);
|
||||
newtComponent safeModeBox = newtCheckbox(1, 5, "Safe mode", CHECKBOX_STATE(checkrain_flags, checkrain_option_safemode), NULL, NULL);
|
||||
|
||||
newtComponent bootCmdlineLabel = newtLabel(1, 6, "Kernel command line:");
|
||||
newtComponent bootCmdlineEntry = newtEntry(1, 7, NULL, WIDTH - 2, &bootargs_entered, NEWT_ENTRY_SCROLL);
|
||||
|
||||
newtComponent flowerChainBox /* dark blockchain */ = newtCheckbox(1, 8, "Flower chain", ' ', NULL, NULL);
|
||||
|
||||
newtComponentAddCallback(verboseBootBox, bitfield_check_cb, &verbose_info);
|
||||
newtComponentAddCallback(rootfulBox, bitfield_check_cb, &rootful_info);
|
||||
newtComponentAddCallback(rootfulSetupBox, bitfield_check_cb, &setup_rootful_info);
|
||||
@@ -46,12 +52,15 @@ tui_screen_t tui_screen_options() {
|
||||
|
||||
newtComponent form = newtForm(NULL, NULL, 0);
|
||||
newtFormAddComponents(form, backButton, verboseBootBox, rootfulBox,
|
||||
rootfulSetupBox, forceRevertBox, safeModeBox, NULL);
|
||||
rootfulSetupBox, forceRevertBox, safeModeBox, bootCmdlineLabel,
|
||||
bootCmdlineEntry, flowerChainBox, NULL);
|
||||
newtRunForm(form);
|
||||
newtRefresh();
|
||||
snprintf(xargs_cmd, 0x270, "xargs %s", bootargs_entered);
|
||||
newtComponent buttonPressed = newtFormGetCurrent(form);
|
||||
if (buttonPressed == backButton) {
|
||||
ret = MAIN_SCREEN;
|
||||
} else assert(0);
|
||||
newtFormDestroy(form);
|
||||
return ret;
|
||||
}
|
||||
Reference in new issue
Block a user