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)
39 lines
994 B
MonkeyC
39 lines
994 B
MonkeyC
using Toybox.WatchUi;
|
|
using Toybox.Communications;
|
|
using Toybox.Application;
|
|
using SubMusic.Menu;
|
|
|
|
module SubMusic {
|
|
module Menu {
|
|
class Settings extends MenuBase {
|
|
|
|
function initialize() {
|
|
MenuBase.initialize(WatchUi.loadResource(Rez.Strings.Settings_label), false);
|
|
}
|
|
|
|
function load() {
|
|
if ($.debug) {
|
|
System.println("Menu.Settings::load()");
|
|
}
|
|
return MenuBase.load([
|
|
new Menu.AppSettings(),
|
|
new Menu.Storage(),
|
|
{
|
|
LABEL => WatchUi.loadResource(Rez.Strings.AppName) + " " + WatchUi.loadResource(Rez.Strings.Version_label),
|
|
SUBLABEL => (new SubMusicVersion(null)).toString(),
|
|
METHOD => "version", // not used, null does not work
|
|
},
|
|
{
|
|
LABEL => WatchUi.loadResource(Rez.Strings.Donate_label),
|
|
SUBLABEL => null,
|
|
METHOD => method(:onDonate),
|
|
},
|
|
]);
|
|
}
|
|
|
|
static function onDonate() {
|
|
WatchUi.pushView(new DonateView(), new DonateDelegate(), WatchUi.SLIDE_IMMEDIATE);
|
|
}
|
|
}
|
|
}
|
|
} |