"Menu2", PLEASE HELP?

Good day,
Where can I find some working source code where the ThemeColor function is linked to Menu2?

There is no such sample in the Garmin\Sdks folder.

I know I can't ask anyone to send me this feature, but it would really help, just a quick example...

For me, these are a few color combinations, e.g.

function Themes(){
    
    var Key = "Theme";
    
    var Layout = App.Properties.getValue(Key);
    
    if (Layout == 1)
    {
   
            Bg = Graphics.COLOR_BLACK;
            Hour = Graphics.COLOR_GREEN;		
           
     }else if (Layout == 2)
     {       
       
            Bg = Graphics.COLOR_BLACK;
            Houur = Graphics.COLOR_RED;
            
       }
         }

function onSelect(item)
{
if(item) {

// I don't know what to put there :-(


}

Thanks

  • Have you looked at the Menu2Sample in the SDK?

    And you can't change the colors for Menu2.  

  • Yes, I looked at the source code of the "Menu2" project, but unfortunately I can't modify it much, I'm not yet as proficient in CIQ as the programmers here. Here I wrote for help, I don't want the whole code,

  • By "Theme" you seem to mean the colors used in Menu2.  You can't change those.

  • Yes, but I want to make a Color scheme where multiple colors will alternate at once, e.g. background, clock...

  • You want to set these values with Menu2 or use these values in a Menu2?

  • I want to use the values ​​in Menu2 to change multiple colors at once.

    Imagine you have, for example, a color scheme "Theme_1" where you change the color of the background, clock, icons, etc...

    BTW: someone help please

  • If your question is about selecting Theme1 or Theme2 in your app, look at the Analog Sample in the SDK as it demonstrates on device settings.

  • Thanks for the advice, but the "Analog" project in the SDks\samples folder doesn't solve my problem.

    So I will try to describe once more what they need to do.

    I created a "Theme" function that changes multiple element - colors at once, not individually as in the "Sdks\samplesMenu2" example.

    Here is the Theme function:

    function Themes(){
        
        var Key = "Theme";
        
        var Layout = App.Properties.getValue(Key);
        
        if (Layout == 1)
        {
       
                Bg = Graphics.COLOR_BLACK;
                Hour = Graphics.COLOR_GREEN;		
               
         }else if (Layout == 2)
         {       
           
                Bg = Graphics.COLOR_BLACK;
                Houur = Graphics.COLOR_RED;
                
           }
             }

    Furthermore, I created a MENU through which I would need to select individual Themes.

    I don't know how to properly delegate the menu to select Themes.

    Feature menu:

    class MenuDelegate extends WatchUi.Menu2InputDelegate {
    
        function initialize() {
            Menu2InputDelegate.initialize();
        }
    
        function onSelect(menuItem) {
            
            ????????
        }
    }

    That's what I'm trying to solve here and what they need help with.

  • as you use properties to read settings save here properties

    if(item.getId()==...)

    {

        save here correct properties

  • Well, that's exactly what I don't know, what properties I should put there. :-(

    function onSelect(item) {

    var Key = "Theme";

    var Layout = App.Properties.getValue(Key);

    if (item.getId() == Layout_1) {