Home of the Squeezebox™ & Transporter® network music players.
Page 2 of 2 FirstFirst 12
Results 11 to 18 of 18
  1. #11
    Babelfish's Best Boy mherger's Avatar
    Join Date
    Apr 2005
    Location
    Switzerland
    Posts
    20,586

    Slider Control in Home Menus?

    > Well its probable that I suck at interpreting the jive.pm sample for a
    > slider but all I got on the player was a menu item labeled Text that
    > went to another blank panel. No sight of a slider on the original panel
    > the menu was slated for. :-(


    It's my reading that you shouldn't return the slider in an item loop
    directly. What Jive.pm does is it defines a custom command which would
    only return the slider (the element you put inside the item_loop). And
    he menu calling it would use that command as the "go" action for the
    menu item. See around line 1435.

  2. #12
    Senior Member Aesculus's Avatar
    Join Date
    Jan 2008
    Posts
    433
    Quote Originally Posted by mherger View Post
    > Well its probable that I suck at interpreting the jive.pm sample for a
    > slider but all I got on the player was a menu item labeled Text that
    > went to another blank panel. No sight of a slider on the original panel
    > the menu was slated for. :-(


    It's my reading that you shouldn't return the slider in an item loop
    directly. What Jive.pm does is it defines a custom command which would
    only return the slider (the element you put inside the item_loop). And
    he menu calling it would use that command as the "go" action for the
    menu item. See around line 1435.
    OK. I will try that.

    I am just poking at this as I really don't fully understand the logic here and my brain only has a limited capacity for new information. :-)
    Chris

  3. #13
    Senior Member Aesculus's Avatar
    Join Date
    Jan 2008
    Posts
    433
    Exciting. Made some progress. I can now display two sliders on the correct panel. :-)

    I was hoping to have each of these labeled so that is my next pursuit.

    Name:  temp.jpg
Views: 51
Size:  25.8 KB

    Here is the current code for posterity. I thought the 'text' would have been the label so need to do some more investigation.

    push @menu, {
    slider => 1,
    min => 30,
    max => 50,
    text => 'Left',
    #help => NO_HELP_STRING_YET,
    adjust => 1,
    initial => 40,
    actions => {
    do => {
    player => 0,
    cmd => [ 'avpSetChannels', $i ],
    params => {
    valtag => 'value',
    },
    },
    },
    };
    push @menu, {
    slider => 1,
    min => 30,
    max => 50,
    text => 'Right',
    #help => NO_HELP_STRING_YET,
    adjust => 1,
    initial => 50,
    actions => {
    do => {
    player => 0,
    cmd => [ 'avpSetChannels', $i ],
    params => {
    valtag => 'value',
    },
    },
    },
    };
    $i++;

    my $numitems = scalar(@menu);

    $request->addResult("count", $numitems);
    $request->addResult("offset", 0);
    my $cnt = 0;
    for my $eachItem (@menu[0..$#menu]) {
    $request->setResultLoopHash('item_loop', $cnt, $eachItem);
    $cnt++;
    }

    $request->setStatusDone();
    Chris

  4. #14
    Senior Member Aesculus's Avatar
    Join Date
    Jan 2008
    Posts
    433
    The text is supposed to be above the slider:

    https://wiki.slimdevices.com/index.p...Slider_actions

    text
    when present, this renders text above the slider in a textArea widget.

    I have also noticed that textArea's don't display in general either, at least not in Squeezer.

    When looking at the above on a SB Touch going to the menu instead of seeing two sliders I see two menu items with arrows (Left and Right) which do nothing because I have no real actions.

    So adding the Text on the real SB Touch does not show as a slider. If I remove the Text on the SB touch I just get two blank lines with arrows.

    Anyway I really don't care about the SB Touch UI as much as the apps, but it is interesting it does not seem to support the slider, nor perhaps textArea's?
    Chris

  5. #15
    Babelfish's Best Boy mherger's Avatar
    Join Date
    Apr 2005
    Location
    Switzerland
    Posts
    20,586

    Slider Control in Home Menus?

    > Exciting. Made some progress. I can now display two sliders on the
    > correct panel. :-)


    Great progress!

    FWIW: I'd use Squeezeplay for the testing. You could consider it the
    reference implementation. As you know documentation is poor. Therefore
    not all clients have all the features implemented (correctly). You might
    hit an option or feature which would work in Squeezeplay, but not your
    client of choice.

  6. #16
    Senior Member Aesculus's Avatar
    Join Date
    Jan 2008
    Posts
    433
    Quote Originally Posted by mherger View Post
    > Exciting. Made some progress. I can now display two sliders on the
    > correct panel. :-)


    Great progress!

    FWIW: I'd use Squeezeplay for the testing. You could consider it the
    reference implementation. As you know documentation is poor. Therefore
    not all clients have all the features implemented (correctly). You might
    hit an option or feature which would work in Squeezeplay, but not your
    client of choice.
    Well I downloaded the Windows version of Squeezeplay. Configured it for my plugin and tested my sample. It behaves like the SB Touch does (see Channel Level Adjustment image). :-(

    I did wander around the SP UI a bit and found a single slider in the Alarm Clock > Alarm Volume setting.

    No label there either and it being the only control on the panel. (see Alarm Volume image).

    I assume this is hard coded in the player vs a plugin? A bit out of my league here.

    Name:  temp.jpg
Views: 43
Size:  34.1 KBName:  temp2.jpg
Views: 43
Size:  33.7 KB
    Chris

  7. #17
    Babelfish's Best Boy mherger's Avatar
    Join Date
    Apr 2005
    Location
    Switzerland
    Posts
    20,586

    Slider Control in Home Menus?

    > Well I downloaded the Windows version of Squeezeplay. Configured it for
    > my plugin and tested my sample. It behaves like the SB Touch does (see
    > Channel Level Adjustment image). :-(


    No surprise there: Touch/Radio/Controller are running Squeezeplay.

    > I assume this is hard coded in the player vs a plugin? A bit out of my
    > league here.


    The alarm settings page is either defined in Slim/Control/Jive, or in
    one of the Alarm.pm files. But it's not in the firmware.

  8. #18
    Senior Member Aesculus's Avatar
    Join Date
    Jan 2008
    Posts
    433
    Quote Originally Posted by mherger View Post
    > Well I downloaded the Windows version of Squeezeplay. Configured it for
    > my plugin and tested my sample. It behaves like the SB Touch does (see
    > Channel Level Adjustment image). :-(


    No surprise there: Touch/Radio/Controller are running Squeezeplay.

    > I assume this is hard coded in the player vs a plugin? A bit out of my
    > league here.


    The alarm settings page is either defined in Slim/Control/Jive, or in
    one of the Alarm.pm files. But it's not in the firmware.
    OK. I might have been using an older copy of jive.pm as a sample. I found the file in my instance of LMS and tried the 'text' key which I labeled 'Text'. You can see it in the attached image.

    I will play around with this a bit. Right now I have put text elements in the menu above each slider and that is OK but there is a fair amount of whitespace between the "labels" and the sliders but I could live with it.

    Name:  temp.jpg
Views: 30
Size:  35.1 KB
    Chris

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •