Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Rockbox mail archive

Subject: Re: my next crazy idea... rework the menu system

Re: my next crazy idea... rework the menu system

From: Jonathan Gordon <jdgordy_at_gmail.com>
Date: Thu, 24 Aug 2006 21:09:01 +1000

woops.. forgot the attachment

On 24/08/06, Jonathan Gordon <jdgordy_at_gmail.com> wrote:
> It works!! (umm.. i think... It seems to work for my tests...)
>
> I have attached the diff if you want to have a look, all it does is
> show my test menu which is just the shuffle option twice.. but it
> proves it works...
>
> The problem with the whole thing is its a bit messy to add an option...
> i.e for the shuffle option the folliowing is needed...
> static const struct opt_items bool_onoff[] =
> {{STR(LANG_OFF)},{STR(LANG_ON)}}; <- this will only be done once, so
> no big deal
> static const struct option_item shuffle_option = {
> &global_settings.playlist_shuffle, NULL, (const struct
> opt_items**)&bool_onoff,0,0,0,0,0,0}; <- needed so set_option() can
> work
> static const struct menu_item_ex shuffle_mode = {
> MT_SETTING_BOOL,{&shuffle_option},2, NULL, LANG_SYSFONT_SHUFFLE}; <-
> needed for the menu item
> then &shuffle_mode must go in a menu_item_ex array..
> So, is that easier than doing functions for every setting?
> Im going to play with #define's to hopefully make all that a bit
> smaller, but i dont know how well that will work.
>
> please comment.
>

Received on 2006-08-24

Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy