-
-
Notifications
You must be signed in to change notification settings - Fork 5
Root Project Module Template Skeleton
Nenkai edited this page Jul 14, 2024
·
2 revisions
Refer to SequenceUtil.ad
for implementation details.
module MyRoot
{
function open(context)
{
// Sets the current page
SequenceUtil::startPage(context, ROOT);
// Pushes the page
SequenceUtil::pushPage(context, ROOT);
// Return a result here if needed
}
function close(cotnext)
{
// if the page was pushed, you might wanna pop it
SequenceUtil::popPage(context, ROOT);
}
// Initialize widget data/state for the root here.
method onInitialize(context)
{
}
// Clean up widgets here.
method onFinalize(context)
{
}
// Optional, handling keys
method onKeyPress(context, event)
{
return EVENTRESULT_CONTINUE;
}
// Optional
method onCancel(context)
{
main::sound.play("cancel");
self.close(context);
return EVENTRESULT_FILTER;
}
}