diff --git a/include/tui.h b/include/tui.h index 18407ca..0a9a241 100644 --- a/include/tui.h +++ b/include/tui.h @@ -15,8 +15,9 @@ #define WIDTH 76 #define HEIGHT 19 -#define MSG_COLOR 1 -#define ICON_COLOR 2 +#define PI_LOG_COLOR NEWT_COLORSET_CUSTOM(0) +#define PI_STEP_CURRENT NEWT_COLORSET_CUSTOM(1) +#define PI_STEP_OTHER NEWT_COLORSET_CUSTOM(2) #define CHECKBOX_STATE(flags, opt) checkrain_option_enabled(flags, opt) ? '*' : ' ' diff --git a/src/tui_main.c b/src/tui_main.c index a22828d..4955ed8 100644 --- a/src/tui_main.c +++ b/src/tui_main.c @@ -42,6 +42,9 @@ int init_window() { newtInit(); newtCls(); + newtSetColor(PI_LOG_COLOR, "yellow", "black"); + newtSetColor(PI_STEP_CURRENT, "lightgray", "black"); + newtSetColor(PI_STEP_OTHER, "gray", "black"); newtDrawRootText(0, 0, "palera1n version 2.0.0"); newtPushHelpLine(NULL); return 0; diff --git a/src/tui_screen_main.c b/src/tui_screen_main.c index e28ca0e..e155685 100644 --- a/src/tui_screen_main.c +++ b/src/tui_screen_main.c @@ -16,12 +16,16 @@ tui_screen_t tui_screen_main() { int ret = MAIN_SCREEN; bool can_start = false; newtCenteredWindow(WIDTH, HEIGHT, NULL); - newtComponent optionsButton = newtCompactButton(46, 17, "Options"); - newtComponent startButton = newtCompactButton(57, 17, "Start"); - newtComponent exitButton = newtCompactButton(66, 17, "Exit"); + newtComponent optionsButton = newtCompactButton(46, 18, "Options"); + newtComponent startButton = newtCompactButton(57, 18, "Start"); + newtComponent exitButton = newtCompactButton(66, 18, "Exit"); newtComponent welcome = newtLabel(1, 0, "Welcome to palera1n!"); + newtComponent deviceMsg = newtTextbox(1, 2, 40, 3, NEWT_FLAG_WRAP); + newtTextboxSetText(deviceMsg, "Connect your iPhone, iPad or iPod Touch to begin."); + newtTextboxSetColors(deviceMsg, PI_LOG_COLOR, PI_LOG_COLOR); newtComponent form = newtForm(NULL, NULL, 0); - newtFormAddComponents(form, optionsButton, startButton, exitButton, welcome, NULL); + newtFormAddComponents(form, optionsButton, startButton, exitButton, welcome, + deviceMsg, NULL); newtRunForm(form); newtRefresh(); newtComponent buttonPressed = newtFormGetCurrent(form); diff --git a/src/tui_screen_options.c b/src/tui_screen_options.c index 8815efd..a368192 100644 --- a/src/tui_screen_options.c +++ b/src/tui_screen_options.c @@ -35,10 +35,11 @@ tui_screen_t tui_screen_options() { int ret = MAIN_SCREEN; newtCenteredWindow(WIDTH, HEIGHT, NULL); - newtComponent backButton = newtCompactButton(66, 17, "Back"); + newtComponent backButton = newtCompactButton(66, 18, "Back"); newtComponent optionsNotice = newtTextbox(1, 0, WIDTH - 2, 3, NEWT_FLAG_WRAP); newtTextboxSetText(optionsNotice, "You may set the following options. If you don't know what they mean you'll probably have no reason to set them."); + // newtTextboxSetColors(optionsNotice, NEWT_COLORSET_LABEL, NEWT_COLORSET_LABEL); newtComponent verboseBootBox = newtCheckbox(1, 3, "Verbose boot", CHECKBOX_STATE(kpf_flags, checkrain_option_verbose_boot), NULL, NULL); newtComponent rootfulBox = newtCheckbox(1, 4, "Rootful", CHECKBOX_STATE(palerain_flags, palerain_option_rootful), NULL, NULL); @@ -62,7 +63,8 @@ tui_screen_t tui_screen_options() { newtComponent form = newtForm(NULL, NULL, 0); newtFormAddComponents(form, backButton, verboseBootBox, rootfulBox, rootfulSetupBox, forceRevertBox, safeModeBox, bootCmdlineLabel, - bootCmdlineEntry, flowerChainBox, optionsNotice, NULL); + bootCmdlineEntry, flowerChainBox, optionsNotice, + NULL); newtRunForm(form); newtRefresh(); snprintf(xargs_cmd, 0x270, "xargs %s", bootargs_entered);