I have an widget that has a menu in it that opens when a user presses the menu button on a watch with a menu button to the Menu/Up button on non-touch watches. A user says that they have a Forerunner 235 but they say that they cannot get into the menu. I am pretty sure that it works on the Fenix3. The way that I have implemented the menu entry is with the following code:
function onMenu()
{
mainmenu = new Rez.Menus.MainMenu();
//mainmenu.setTitle("Main");
//Ui.pushView( new CGMMenu(), new CGMMenuDelegate(), Ui.SLIDE_IMMEDIATE );
Ui.pushView( mainmenu, new CGMMenuDelegate(), Ui.SLIDE_IMMEDIATE );
//return true;
sys.println ("Menu pressed");
return true;
}
function onKeyReleased(releaseevt)
{
// For watches with buttons you need to launch the menu from a key press or release, not onMenu.
var keyid = releaseevt.getKey();
sys.println (keyid.toString());
if (keyid.toLong() == 13 || keyid.toLong() == 18) {
// key 13 is menu in fenix3
Ui.pushView( new Rez.Menus.MainMenu(), new CGMMenuDelegate(), Ui.SLIDE_IMMEDIATE );
}
//return true;
sys.println ("key pressed");
return true;
}
class CGMMenuDelegate extends Ui.MenuInputDelegate {
//********************************************************************************************
// This is the main menu in the app.
//
//********************************************************************************************
function onMenuItem(item) {
sys.println ("CGMMenuDelegate entered");
if (item == :item_1) {
// Need to adjust this so that the settings menu does different things
activemenu = new Rez.Menus.SettingsMenu();
activemenu.setTitle("Settings");
Ui.pushView(activemenu, new SettingsMenuDelegate(), Ui.SLIDE_UP);
} else if (item == :item_2) {
// Do something else here in the Graphs menu
Ui.switchToView(new CGMGraphView(), new BackOutDelegate(), Ui.SLIDE_UP);
//cgmChartmodel.onGraph();
sys.println(" entering graph screen");
return globalText;
}
}
}
According to the simulator and the devices.xml file the up button in 13, so I would expect it to work on the Forerunner 235.
Am I missing something?
Many Thanks,
R.