mirror of
https://github.com/palera1n/palera1n.git
synced 2026-10-24 02:59:49 +02:00
custom colors
This commit is contained in:
1 parent
d3edd09550
commit
597280c3c6
4 files changed
+18
-8
No files matched your search
+3
-2
@@ -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) ? '*' : ' '
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user