• Status Closed
  • Percent Complete
  • Task Type Patches
  • Category Plugins
  • Assigned To No-one
  • Operating System iPod 5G
  • Severity Low
  • Priority Very Low
  • Reported Version
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Rockbox
Opened by maeck - 2006-04-18
Last edited by jdgordon - 2007-07-31

FS#5167 - Graphical Menu (proof of concept)

Gfxmenu rockbox plugin

This plugin is a proof of concept for a graphical menu,
it does about nothing except for showing a number of
icons in a nice 3d circle. Sliding around on the Ipod
scrollwheel will move the icons around. If you stop
scrolling the icons will refocus on the one icon closest
to the center. This is the icon you would ‘select’ if the
select key is clicked.

For the devices without a scrollwheel, the left and right
button lets you scroll through the menu. This is just not
as elegant as the scrollwheel (however it is very effective).

‘Menu’ takes you back to the menu.

things to do:
- Do something when ‘select’ is clicked.
- Insert this code into the existing menu drawing code so

 the graphical menu is shown for Ipod videos on the 
 playlist/plugins menu.

- Scaling of the icons is done outside of Rockbox, just 10

 variations of each icon have been provided to the plugin. 
 This is not the most memory effective way, However it is
 the fastest solution (and I get away with not writing 
 code for real-time scaling...)

- Create paths and icons for Nano, Photo and greyscale Ipods.

 Paths can be created using the code.
Closed by  jdgordon
2007-07-31 07:07
Reason for closing:  Out of Date
bot47 commented on 2006-04-18 16:22

OK, I created paths for the nano.
I got some questions:

1st) Why do you use 24bit depth? The displays of iPods have just 16bit.
2nd) I was blind and didn’t find the line where you display the item name. It has to be adjusted for the nano.
3rd) Isn’t it fast enough to calculate the values at runtime or maybe there is a way to make the precompiler calculate them for us… I added precalculated values for the nano, because you did so, too.

Good work. (309.3 KiB)
maeck commented on 2006-04-18 17:01

1. The 24bit depth images will be converted to 16 bit rockbox images at compile time and statically linked to the plugin.
2. The text placement is a bit weird. Need to select a font and place it correctly and restore is after closing the plugin.
3. I precalculated the paths for various reasons.

a. It is faster. I am not using any floats and complex math in the plugin. I could have precalculated the cos/sin values but that would have also left me with two tables of data.
b. Currently it is an oval, there is no reason to make the path flow differently if desired (for instance when we make these menus themable).  

Thanks for converting for Nano.

bot47 commented on 2006-04-18 20:28

This is a more general version which _SHOULD_ run on most targets, because it doesn’t use precalculated values. Its main problem is that for some reason it seems to work only on iPod Simulators, not on others. The Sim always crashes or displays weired color mixes.

   gfxmenu.c (19.6 KiB)

I’ll try to do some gfx’s as we already discussed

maeck commented on 2006-04-18 21:27

Bot47 very good change. I really appreciate the work you have done on it.
I’ll include the changes in the current patch I am working on (releasing this proof of concept on the main menu).

maeck commented on 2006-04-20 02:07

Cleaned out the source a bit and changed the focus square be placed correctly (use the calculated path to figure out what the focal point on the path is).

   gfxmenu.c (19.6 KiB)
bot47 commented on 2006-04-21 08:22

Unfortunately, it doesn’t build for my if inserted into current CVS. It compiles, but linking fails.

maeck commented on 2006-05-02 00:56

Repackaged the patch. This should link correctly.
The patch is more than just the gfxmenu,c file,
bitmaps and sources files are also changed.

This patch also includes new images (icons).

Jon_ commented on 2006-05-22 18:32

can someone patch me a copy for 5g ipod


Available keyboard shortcuts


Task Details

Task Editing