Announcement

Collapse
No announcement yet.

*** New RideRunner Dynamic Menus ****

Collapse
This is a sticky topic.
X
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • *** New RideRunner Dynamic Menus ****

    ALL New for Ride Runner is the Dynamic Menus

    I've had this idea for over a year... just takes something to get me to do it...
    So... I spent a good 2 days coding this... its available NOW for testers (ftp)


    Q What is Dynamic Menus?
    A. A menu system that RideRunner manages, based on skin designer options and automatic plugin subscription.

    Q. Whats a menu system?
    A. Generally the buttons on menu.skin, menu1.skin.... menu9.skin

    Q. What is plugin subscription?
    A. When a plugin is instantiated, RR will ask the plugin for a property, and this is added to Dynamic Menu Selector.


    Pros:
    • No more lines and lines of cryptic code in Exectbl.ini.
    • Fast, no more long delay at skin load for all the commands to build the menus to run.
    • No more reloading skin just to change the menu.
    • Standardized, now all skins can use this method.
    • Plugin Subscription, plugins can subscribe to the Dynamic Menu to provide easy end user integration.
    • Menu skins are easily expandable, a new menu can be added at any time.
    • Skin object code for menu navigation simplified.

    Cons:
    • None


    I prob can use some help documenting this new feature.
    Attached Files
    Last edited by mitchjs; 03-08-2012, 08:32 PM.
    -Thanks
    Mitch
    www.rush2112.net

    "Did you test it in carwings??"

    Sun, Come shine my way
    May healing waters bury all my pain
    Wind, Carry me home
    The fabric of reality is tearing apart
    The piece of me that died
    Will return To live again

  • #2
    Lets talk Commands, specifically the Dynamic Menu Navigation commands.

    Starting with:

    "RRMenuNext" & "RRMenuPrev"

    Referring to the Image in POST #1

    I have in this example, "RRMenuNext" on the button circled in Green on menu.skin
    B00,76,509,138,29,"RRMenuNext"

    I also have the SAME command on the same button, in menu2.skin,
    infact MENU.skin and Menu2.skin are basicaly identical (only the top right button different)

    now what the commands do

    "RRMenuNext" will load the next menu in the sequence up to menu9, and loop around.
    example; if you have "menu.skin" and "menu2.skin" (yes you can have "menu1.skin")
    and you are on "menu.skin" it will go "menu2.skin" the same command on "menu2.skin" goes to "menu.skin".
    (since you dont have 3-9)

    "RRMenuPrev" will load the previous menu, and loop around.
    example; if you have "menu.skin" and "menu1.skin" and "menu3.skin" and "menu4.skin", and you are
    on "menu3.skin" it will go to "menu2.skin", the same command on "menu.skin" goes to "menu4.skin".
    Last edited by mitchjs; 03-08-2012, 08:33 PM.
    -Thanks
    Mitch
    www.rush2112.net

    "Did you test it in carwings??"

    Sun, Come shine my way
    May healing waters bury all my pain
    Wind, Carry me home
    The fabric of reality is tearing apart
    The piece of me that died
    Will return To live again

    Comment


    • #3
      Next lets talk about Dynamic Menu Item; Commands, Labels, and Indicators, and that one variable

      Commands:

      "RRMenuItem;x" - where "x" is 1-n
      "RRMenuItem;x;Set" - where "x" is 1-n
      "RRMenuItemSave;key;(menuitem)" - where "key" is the MenuItemKey, "menuitem" is the MenuItemValue

      Labels:
      "RRMenuItem;x" - where "x" is 1-n

      Indicators:
      "RRMenuItem;x" - where "x" is 1-n


      Important, USER Variable:
      "RRMenuItemKey" - contains the current MenuItemKey when "Set" is used.


      Referring to the Image in POST #1

      looking at the item in the RED circle, actually its two obects there, a Button Object and a Label Object
      The Button:

      lets look at the Skin Object Code on that:
      B02,53,079,352,57,"RRMenuItem;1",@RRMenuItem;1;set @

      We got a click command of "RRMenuItem;1", and a HOLD command of "RRMenuItem;1;set", where 1 is the 1st button on the menu.skin, so on this menu.skin, we have 6 menu buttons
      they would be (1-6):

      B02,53,079,352,57,"RRMenuItem;1",@RRMenuItem;1;set @
      B03,62,152,370,52,"RRMenuItem;2",@RRMenuItem;2;set @
      B04,66,222,370,54,"RRMenuItem;3",@RRMenuItem;3;set @
      B05,72,296,356,53,"RRMenuItem;4",@RRMenuItem;4;set @
      B06,65,368,361,53,"RRMenuItem;5",@RRMenuItem;5;set @
      B07,53,438,358,50,"RRMenuItem;6",@RRMenuItem;6;set @


      Simple enough

      Now the Label:

      L05,107,081,277,31,255,255,255,28,"Arial:B","RRMen uItem;1","LEFT",,"DS=3,3,0,0,0"
      L06,122,153,294,34,255,255,255,28,"Arial:B","RRMen uItem;2","LEFT",,"DS=3,3,0,0,0"
      L07,134,225,293,38,255,255,255,28,"Arial:B","RRMen uItem;3","LEFT",,"DS=3,3,0,0,0"
      L08,139,298,279,36,255,255,255,28,"Arial:B","RRMen uItem;4","LEFT",,"DS=3,3,0,0,0"
      L09,133,371,283,35,255,255,255,28,"Arial:B","RRMen uItem;5","LEFT",,"DS=3,3,0,0,0"
      L10,119,440,279,37,255,255,255,28,"Arial:B","RRMen uItem;6","LEFT",,"DS=3,3,0,0,0"


      simple enough

      now the Indicator images, the violet circle (ok they all ovals, but thats not important )

      The Indicators:

      I,355,080,56,56,"RRMenuItem;1"
      I,376,151,56,56,"RRMenuItem;2"
      I,387,223,56,56,"RRMenuItem;3"
      I,388,294,56,56,"RRMenuItem;4"
      I,384,366,56,56,"RRMenuItem;5"
      I,369,435,56,56,"RRMenuItem;6"


      simple enough


      thats it, no more skin code is needed to create a menu... and yes Menu2.skin or Menu3.skin, is IDENTICAL!!
      Last edited by mitchjs; 03-08-2012, 08:43 PM.
      -Thanks
      Mitch
      www.rush2112.net

      "Did you test it in carwings??"

      Sun, Come shine my way
      May healing waters bury all my pain
      Wind, Carry me home
      The fabric of reality is tearing apart
      The piece of me that died
      Will return To live again

      Comment


      • #4
        Now we talk about Data...where is the data coming from...

        There is a new "menu.ini" file with that keeps the Dynamics of the menu.
        This file is not ment to ever be hand edited (you can) but you dont need to...realy! (even the 1st time without one)
        this file is with the skin, just like "general.ini" and "skin.ini"

        using say button #1

        now what lets detail "RRMenuItem;1;set" the set is the trigger, rr will now show a menu popup (Reserved skin name) of "MenuItemSet.skin".
        This is a required skin if you are going to have user changable menus.
        Its content is up to the skinner... here is a quick one put together for Carwings
        There is nothing that special here, its just a CustomList, and in this case with ICONS
        RR will populate it for you. No code is required, the skin name is how rr knows what to do

        While on this skin, an Indicator "RRMenuItemSelIcon" is active, with the icon of the selected list item. (more this later, im not even using it)

        lets look at the SELECT button code:
        B,67,370,109,55,"RRMenuItemSave;$RRMenuItemKey$;($ ListText$)||EXIT"

        "RRMenuItemSave" is the command, with 2 arguments, 1 is the KEY and 2 is the Value
        note the ( ), they are required! as they define the value start/end.

        The Key is the Dynamic Menu Key, as soon as you go into this popup, from a menu.skin, the key is set in User Var: "RRMenuItemKey"
        Example, if on menu.skin, the key is "RRMenuItem1"
        Example, if on menu2.skin the key is "RRMenu2Item1"
        (remember we are talking about the 1st button, hense the 1, the 6th button would be "RRMenuItem6")

        The Value is the metadata for the menu item, which is, the COMMAND rr is to exec when pressed, the LABEL of the button, and the INDICATOR image.
        Ill show you what that looks like... lets do Radio

        "RADIO",RADIO,Icons\Radio.png

        the format is

        "COMMAND",LABEL,Iconpath,,discription

        Command is in qoutes

        Iconpath is path to the indicator image relative the SKINPATH

        4th argument is blank
        description is a textual description available in LABEL "RRMenuItemSelDesc"


        simple still hu?

        the USER never touches this stuff (unless he wants to tweak/add MenuItems)
        Attached Files
        Last edited by mitchjs; 04-18-2012, 10:17 PM.
        -Thanks
        Mitch
        www.rush2112.net

        "Did you test it in carwings??"

        Sun, Come shine my way
        May healing waters bury all my pain
        Wind, Carry me home
        The fabric of reality is tearing apart
        The piece of me that died
        Will return To live again

        Comment


        • #5
          Metadata

          This is the Skin Designers job, to create the Metadata list
          of course a User may add to it.. tweak it too, if one wants to change the text

          the list is in a file called "menu.lst"

          its a Key Value Pair text file

          KEY=VALUE

          (yea, like just a ini file)

          lets look at the one in CARWINGS, at least the one i created so far...
          (spaces are trimmed)

          Code:
          [ Available Menu Items]
          # LISTITEM = "COMMAND",LABEL,[ICON_PATH][,,[DESCRIPTION]]
          ################################################
          CLEAR BUTTON	= "",,,,Clear the Buttons functionality
          AUDIO(mp3s)     = "AUDIO",MUSIC,Icons\MUSIC.png,,This is the Audio Player
          RADIO           = "RADIO",RADIO,Icons\RADIO.png
          XM              = "XM",XM RADIO,Icons\XM RADIO.png
          SIRIUS          = "SIRIUS",SIRIUS,Icons\SIRIUS.png
          VIDEO           = "VIDEO",VIDEO,Icons\VIDEO.png
          DVD             = "DVD",DVD,Icons\DVD.png
          NAVIGATION      = "GPS",NAVIGATION,Icons\GPS.png
          WEATHER         = "HOMEWEATHER",WEATHER,Icons\Weather.png
          PICTURES        = "PICS",PICTURES,Icons\PICTURES.png
          WEB BROWSER     = "WEB",BROWSER,Icons\INTERNET.png
          APPS            = "LAUNCH",LAUNCH,Icons\LAUNCH.png
          DIMMER          = "menu;dimmer.skin",DIMMER,Icons\DIMMER.png
          CAMERA          = "CAMERA",CAMERA,Icons\CAMERA.png
          PLUGIN MANAGER  = "RRPLUGINMGR",PLUGIN MGR,Icons\PLUGINMGR.png
          #
          #
          # Other Navigation
          IGUIDANCE       = "IGUIDANCE",iGUIDANCE,Icons\GPS.png
          GMPC            = "GMPC||GMPCOVERLAY||GMPCRUN",GMPC,Icons\GPS.png
          the KEY (left side of the equals) is what is SHOWN in the LIST on the "MenuItemSet.skin"
          the VALUE is the MenuItem Data, that RR uses to create the menu

          so.. if you want an option for say some Fuel plugin... ill make it up

          add to the file:

          Fuel Finder = "RR_FUEL",FUEL,Icons\Fuel.png

          oh, by the way, if you dont have the icon, no biggy, its not required, it just shows nothing in the list and on the indicator...

          Well, thats the Dynamic Menu System in Ride Runner (build 3/8/2012 onward)

          I might tweak a thing or two, but thats why we testing... its avail on my FTP now
          Last edited by mitchjs; 04-18-2012, 10:18 PM.
          -Thanks
          Mitch
          www.rush2112.net

          "Did you test it in carwings??"

          Sun, Come shine my way
          May healing waters bury all my pain
          Wind, Carry me home
          The fabric of reality is tearing apart
          The piece of me that died
          Will return To live again

          Comment


          • #6
            RECAP:


            New reserved files:

            Menu.ini
            Menu.lst


            New reserved skin files:

            MenuItemSet.skin

            Standard RR Reserved skin files:

            Menu.skin, Menu1.skin... Menu9.skin

            New Commands, Indicators, labels:

            Skin Command: "RRMenuItem;x;[set]"
            Skin Label: "RRMenuItem;x"
            Skin Indicator: "RRMenuItem;x"
            Skin Command: "RRMenuItemSave;key;(menuitem)"
            Skin Indicator: "RRMenuItemSelIcon" shows icon(if any) of selected item in the MenuItemSet.Skin List
            User Variable: "RRMenuItemKey"

            Skin Command: "RRMenuNext" goes to next menuX.skin (looping)
            Skin Command: "RRMenuPrev" goes to previous menuX.skin (looping)
            Last edited by mitchjs; 03-08-2012, 09:37 PM.
            -Thanks
            Mitch
            www.rush2112.net

            "Did you test it in carwings??"

            Sun, Come shine my way
            May healing waters bury all my pain
            Wind, Carry me home
            The fabric of reality is tearing apart
            The piece of me that died
            Will return To live again

            Comment


            • #7
              Plugins,

              Plugins that support Property : "menuitem" will be subscribed to the Dynamic Menu Item list

              c# (in the properties method)
              Code:
              // Dynamic Menu
              case "menuitem":
                  properties = "\"WEBRADIO\",WEB RADIO,Icons\\WebRadio.png,Web Radio (Internet)";
                  break;
              note a 4th item (Web Radio (Internet)), its the text that shows in the "MenuItemSet.skin" list

              vb6:
              Code:
              Case "menuitem"
                  Properties = Chr(34) + "MAPPOINT" + Chr(34) + ",MAPPOINT,Icons\GPS.png,Mappoint by Microsoft as Navigation"
              note the 4th item, the text in the list will be the PLUGIN Assembly Name, in this case "Mappoint"

              note the 5th item, is a textual description, which is available in the label "RRMenuItemSelDesc" on the "MenuItemSet.skin"

              Plugins start with PI-
              as you can see

              All these plugins, now support this property

              My plugins are on my DropBox, Web Browser, and Web Radio already updated
              Attached Files
              Last edited by mitchjs; 04-18-2012, 10:11 PM.
              -Thanks
              Mitch
              www.rush2112.net

              "Did you test it in carwings??"

              Sun, Come shine my way
              May healing waters bury all my pain
              Wind, Carry me home
              The fabric of reality is tearing apart
              The piece of me that died
              Will return To live again

              Comment


              • #8
                Been working with mitch on this and its simply awesome. Noone will ever have to edit a exectbl.ini or menu.skin file again to customize their setup. It's a simple hold of the command and replace with an alternative from the list. THIS is the simplicity that RR has been missing... outside of DFX and a few other skins lol
                mp3Car.com Senior Tech Blogger (Want a product reviewed? Contact me.)
                Follow Me on Twitter or Facebook
                Live mp3Car Facebook Chat

                Comment


                • #9
                  This is funny actually...I did tinker in the RR Code awhile ago (~6 months) to make an attempt at making the that whole process easier and better then doing it through one of the old methods...skin plugin/exectbl/skin.ini/ect... Good thing that my attempt never made it into the svn...would have been "re-written"....
                  RideRunner...The #1 FE, PERIOD.

                  Current Project: DFXVoice [v1.0 Released]
                  Next in line: RRMedia v2.0

                  DFX 5.1.1 Skin
                  Appstore Link

                  My RideRunner Plugins
                  RRMedia
                  RRExtended
                  DFXVoice

                  "There are no bugs - only undocumented features."

                  Comment


                  • #10
                    This is a great feature for RR.
                    Greats thanks

                    Comment


                    • #11
                      Been testing this new great feature and I must say this will simplify menu system greatly! No need to hassle with code anymore... if you don't want to hehe.
                      Also documentation is more than sufficient.

                      Excellent work Mitch as usually.

                      Comment


                      • #12
                        In fact , i have tested this new feature that is a great news for RR .
                        Very good job and easy to use .

                        Comment


                        • #13
                          Mitch...

                          I just started looking into adjusting the Elite2 skin to use this new dynamic menu system. This definitely makes the menu system easy and clean. One thing that Elite2 uses is colored themes... He's got awesome icons in several different colors for each of the menu items. I was unable to get the new system to use a variable to add a specific theme color to the path of the icon....
                          An example:

                          Old way:
                          Code:
                          IMG,93,132,100,100,"$usethemeiconpath$\icons\menus\$MENUBUTTONICON01$.png",ALL
                          New way:
                          Code:
                          I,93,132,100,100,"RRMenuItem;1"
                          Menu.lst has
                          Code:
                          AUDIO(mp3s)     = "AUDIO",Music,Icons\menus\MUSIC.png
                          I tried making the Menu.lst
                          Code:
                          AUDIO(mp3s)     = "AUDIO",Music,$usethemeiconpath$\Icons\menus\MUSIC.png
                          Where $usethemeiconpath$ is "theme\RED" according to SkinTool, but it didn't work.

                          With the April RideRunner version, is it possible to do the themed menu icons?
                          If not, I have a couple of suggestions...
                          1) process the variables in the icon path... or
                          2) let a variable specify the filename of a Menu.lst.... a Menu-Red-Theme.lst

                          What do you think?

                          Ryan

                          Comment


                          • #14
                            thats correct... the path cannot be a variable, it is never processed by engine, since its not skin language
                            anyway.. we have a solution

                            #2
                            -Thanks
                            Mitch
                            www.rush2112.net

                            "Did you test it in carwings??"

                            Sun, Come shine my way
                            May healing waters bury all my pain
                            Wind, Carry me home
                            The fabric of reality is tearing apart
                            The piece of me that died
                            Will return To live again

                            Comment


                            • #15
                              Ok.... one more feature request.......

                              Elite 2 has a nifty feature in it's legacy menu item selection method.... a description for the action. That really makes a nice, easy to use configuration tool.

                              Another thing that wasn't totally obvious.... how to clear out a button... I had to add a "Clear Button" menu item option to the menu.lst file. I'm not a huge fan of that method, and I think an image still showed up after I "cleared" the button.

                              Thanks Mitch for all your efforts...

                              Ryan

                              Comment

                              Working...
                              X