mirror of
https://github.com/memen45/SubMusic.git
synced 2026-12-01 02:02:28 +01:00
fixed some rare crashes on receiving invalid response added setting to enable debug logging removed default debug output (speed improvement)
47 lines
1.2 KiB
MonkeyC
47 lines
1.2 KiB
MonkeyC
using Toybox.WatchUi;
|
|
using SubMusic.Menu;
|
|
|
|
module SubMusic {
|
|
module Menu {
|
|
class Playback extends MenuBase {
|
|
|
|
function initialize() {
|
|
MenuBase.initialize(WatchUi.loadResource(Rez.Strings.confPlayback_Title), false);
|
|
}
|
|
|
|
function load() {
|
|
if ($.debug) {
|
|
System.println("Menu.Playback::load()");
|
|
}
|
|
return MenuBase.load([
|
|
new Menu.NowPlaying(),
|
|
{
|
|
LABEL => WatchUi.loadResource(Rez.Strings.confPlayback_PlayAll_label),
|
|
SUBLABEL => null,
|
|
METHOD => method(:onPlayAll),
|
|
},
|
|
new Menu.PlaylistsLocal(WatchUi.loadResource(Rez.Strings.playbackMenuTitle)),
|
|
new Menu.PodcastsLocal(WatchUi.loadResource(Rez.Strings.Podcasts_label)),
|
|
new Menu.More(),
|
|
new Menu.Settings(),
|
|
{
|
|
LABEL => WatchUi.loadResource(Rez.Strings.Donate_label),
|
|
SUBLABEL => null,
|
|
METHOD => method(:onDonate),
|
|
},
|
|
]);
|
|
}
|
|
|
|
// plays all songs
|
|
static function onPlayAll() {
|
|
var iplayable = new SubMusic.IPlayable();
|
|
iplayable.loadSongIds(SongStore.getIds());
|
|
Media.startPlayback(null);
|
|
}
|
|
|
|
static function onDonate() {
|
|
WatchUi.pushView(new DonateView(), new DonateDelegate(), WatchUi.SLIDE_IMMEDIATE);
|
|
}
|
|
}
|
|
}
|
|
} |