From 9e07a6b8c745f3c61466c387d8a1002f9f1b823e Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Wed, 3 Mar 2010 12:45:36 +0000 Subject: [PATCH] some more adjustments to get boot options working in splash mode --- common.inc | 2 +- main.inc | 31 +++++++++++++++++++------------ splash.inc | 5 +++++ 3 files changed, 25 insertions(+), 13 deletions(-) diff --git a/common.inc b/common.inc index 5723506..325dc72 100644 --- a/common.inc +++ b/common.inc @@ -539,7 +539,7 @@ window.current .color.fg get setcolor window.current .ed.font get setfont - boot.ed edit.hidecursor + boot.show { boot.ed edit.hidecursor } if menu.args menu.entry get bootpromptmap diff --git a/main.inc b/main.inc index 107ef16..1eb552b 100644 --- a/main.inc +++ b/main.inc @@ -78,6 +78,7 @@ /menu.init { + % None of this may involve showing anything on the screen. /menu.shift 0 def /menu.visible.entries menu.texts length menu.max.entries min def @@ -90,6 +91,20 @@ menu.entry menu.visible.entries sub 0 ge { /menu.shift menu.entry menu.texts length menu.visible.entries sub min def } if + + boot.pos.init + + /boot.ed.width screen.size pop boot.pos pop sub 20 sub def + /boot.ed.height fontheight 2 add def + + /boot.ed [ + boot.pos exch 10 add exch 1 sub + % can't save background pixmap yet + .undef + boot.buf + boot.buf.size + .undef + ] def } def @@ -130,20 +145,12 @@ window.current .font get setfont - boot.pos.init - - /boot.ed.width screen.size pop boot.pos pop sub 20 sub def - /boot.ed.height fontheight 2 add def - /boot.window window.current def - /boot.ed [ - boot.pos exch 10 add exch 1 sub - over over moveto boot.ed.width boot.ed.height savescreen - boot.buf - boot.buf.size - .undef - ] def + % save background behind boot parameters field + boot.ed dup 0 get exch 1 get + over over moveto boot.ed.width boot.ed.height savescreen + boot.ed 2 rot put boot.setup diff --git a/splash.inc b/splash.inc index 3f08db4..ea6ea3e 100644 --- a/splash.inc +++ b/splash.inc @@ -13,6 +13,9 @@ /window.splash { widget.size array dup .type t_splash put + dup .font font.normal put + dup .ed.font font.normal put + dup .color.fg boot.text.normal put } def @@ -35,6 +38,8 @@ window.push menu.init + % like 'menu.entry true MenuSelect', but without drawing on the screen + bootoptions.init access.file dup .undef ne { setimage