feat(menu): add a graphical boot menu - #106
Merged
Merged
Conversation
Adds the graphical menu style, selected with menu-style = "graphical" or --menu-style=graphical. It draws to the graphics output with the existing framebuffer, using a built-in 8x8 font, and takes input from the keyboard and from relative or absolute pointers. The Sprout logo is drawn in the bottom right corner. If there is no graphics output, the simple menu is used, which still falls back to the basic menu. The logo is converted from assets/logo-small.png to raw pixels by the build crate, which adds the png crate as a build-time dependency only. The default menu style is still simple. Pointer input is untested, as OVMF has no mouse driver.
CI builds the whole workspace for the UEFI target, which also builds the build crate for UEFI. The png dependency pulls in simd-adler32, which crashes LLVM on that target. The logo conversion only runs in build scripts on the host, so png and the conversion are now left out when targeting UEFI.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a
graphicalmenu style that draws to the graphics output and is used with the keyboard or a pointer, with the Sprout logo in the bottom right corner. It falls back to the simple menu when there is no graphics output, and the default style is stillsimple.The logo is converted to raw pixels at build time, which adds the
pngcrate to the build crate only.I could not test pointer input, since OVMF has no mouse driver. Keyboard input and rendering were tested in QEMU.