Tiny bit of help with iPXE menu look



  • Hey guys,

    I’m trying to modify my iPXE boot menu a little bit more. I’ve already changed the background image to show my company’s logo. But, now I have a small thing that i’m trying to fix. The orange “selection” bar that highlights each item, goes almost the full width of the screen. Is there a way to trim it down to only highlight the listed items? I mean an average width… I’m not trying to get it to re-size specific to each line or anything. I just don’t want it covering up the company logo! :D

    Thanks in advance!


  • Developer

    look at BootMenu.class.php - in and around line 1010 which is where it “builds” the menu… have a play around, see what works and luckily it’s all hookable, so you can amend it and won’t be reverted on upgrade (due to the fact hooks get copied during install!)

    here’s my hook doing something similar if it helps you in the right direction :-)

    <?php
    class BrandBootMenu extends Hook
    {
        var $name = 'BrandBootMenu';
        var $description = 'customize boot menu items.';
        var $author = 'Lee Rowlett';
        var $active = true;
        public function tweakmenu($arguments)
        {
            if ($arguments['ipxe']['head'])
            {
                $arguments['ipxe']['head'][7] = 'colour --rgb 0x036802 2';
                $arguments['ipxe']['head'][14] = preg_replace('#right 80#','right 80 --top 80',$arguments['ipxe']['head'][14]);
            }
        }
    }
    $BrandBootMenu = new BrandBootMenu();
    // Hook Event
    $HookManager->register('IPXE_EDIT', array($BrandBootMenu, 'tweakmenu'));
    

  • Moderator

    Edit the logo file so that the logo is in a spot where the bars won’t cover it up.

    That’s the quick and easy fix, it’s what I’d do.


Log in to reply
 

326
Online

38724
Users

10553
Topics

99907
Posts

Looks like your connection to FOG Project was lost, please wait while we try to reconnect.