Thursday 16 November 2017

E2B v1.97c BETA available

Changes from v1.96 are:
  1. New Make_E2B.exe - extract button now works even if no USB drive detected and not run as admin
  2. Desinfect 2017 sample .mnu file added,
  3. Fix $Default E2B Menu.cfg by adding !BAT to prevent initial error message after using PimpMydrive.cmd.
  4. Snappy SDIO .cfg file changed to suppress GNU licence EULA on first run. 
  5. Change to all menus and language files - menu help text now does not have leading space at start of each help line. 
  6. New hstart and hwidth parameters can be set in MyE2B.cfg to set the x start offset and width of the menu help text.
  7. No !BAT warning message if no MyE2B.cfg exists (bugfix)
  8. SDI Origin .exe files updated.
Items 5 and 6 actually involved changing a great many .txt, .mnu, .g4b and language files to remove the space that was used in the menu help text.

The new version is available from the Alternate Downloads Areas.

About the help text change

In previous versions of E2B, the menu help text that appears just below the menu area, could wrap over to the next line and cause a ragged edge:

Ragged edge cause by line wrap.
This was because in all menus, etc. I always used a space before each line of help text in order to align the help text directly below the menu. All help text was specified by using a space after \n, e.g.

title This is a menu entry\n Here is Line 1 of help text\n Here is Line 2 of help text

However, if the line wrapped over to the next line (e.g. if using a narrow menu), then you get a 'ragged' edge.

Because recent versions of grub4dos 0.4.6a now support the 'setmenu' command which allows us to position the help text anywhere on the display, I have now modified all the E2B files so that there is no space after the \n, e.g.

title This is a menu entry\nHere is Line 1 of help text\nHere is Line 2 of help text

This involved changing many files within E2B.

New variables for help text positioning


As well as the tophelp variable, E2B v1.97c now supports the hstart and hwidth variables. 
E2B will choose default hstart and hwidth values if you do not specify the values.

# hstart = x position of menu help text (default = rstart-1), min = 1, 0=use menu width and menu start
# hwidth = width of menu help text (default = menuw+2), 0=use whole width - 2 x hstart
### set hwidth=70 && set hstart=6

# Example 1 - define exact position of help text
set tophelp=26
set hwidth=70
set hstart=6
# Example 2 - use whole screen width (minus 2 x hstart value) - so 3 spaces at start and 3 spaces at end
set hstart=3
set hwidth=0
# Example 3 - use menu default position and width
set hstart=0

More details here.

For instance, we can now have the menu entry help text at the side of the menu:
Help text is on right-hand side of menu.
set hstart=69
set hwidth=30
set tophelp=20

Note that we are still limited to only 4 lines of menu help text though!
There is a bug in grub4dos which may affect you if using help text in a side window. I have reported it here.

Write text to the menu background

Grub4dos 0.4.6a also supports writing text onto the menu using the setmenu --string command. This can be used in your MyE2B.cfg file, e.g.:

setmenu --string=69=28=0xFF00FF="Hello world"

writes the string in Magenta (red+blue) to the lower right portion of the menu starting at character position 69,28. You can use multiple command lines if you need to display more lines of text.

What to do after you update to v1.97c

After updating, you should not notice any difference to you menus, except that if you have used .mnu files or .txt files, the help text may now be shifted to the right by one character under the menu.

1. If you had previously run PimpMyDrive.cmd, run it again to update the .mnu files in the \_ISO\MAINMENU\PIMP folder with the new versions.

2. Run E2B and check the help text for each of your own menu entries. If you have used any of the Sample .mnu files, you may need to edit them to remove the space character after each \n

3. If you have created your own language files, you may need to remove the space after each \n in the STRINGS.txt file and F1.cfg file.

Please let me know if you find any problems with this version.

No comments:

Post a Comment