enigma-bbs/mods/menu.json

94 lines
1.7 KiB
JSON

{
/*
Menu Configuration
Some concept/ideas:
"mci" : {
"BN1" : {
...
"draw" : "@script:blah.js/drawButton"
}
}
*/
"matrix" : {
"art" : "matrix",
// :TODO: Not currently supporting more than form 0. Should probably do that!
"form" : {
"0" : {
"VM1" : {
"mci" : {
"VM1" : {
"submit" : true,
"focus" : true,
// :TODO: need a good way to localize these ... Standard Orig->Lookup seems good.
"items" : [ "Login", "Apply", "Log Off" ]
}
},
"submit" : {
"*" : [
{
"value" : { "1" : 0 },
"menu" : "loginForm",
"args" : { "reason" : "show_form" }
},
{
"value" : { "1" : 1 },
"menu" : "apply"
},
{
"value" : { "1" : 2 },
"menu" : "logoff"
}
]
}
}
}
}
},
"loginForm" : {
"art" : "login", // TODO: rename to login_form
"module" : "login",
"form" : {
"0" : {
"BN3BN4ET1ET2" :{
"mci" :{
"ET1" : {
"focus" : true
},
"BN3" : {
"submit" : true,
"text" : "Login"
},
"BN4" : {
"submit" : true,
"text" : "Cancel"
}
},
"submit" : {
"3" : [ // Login
{
"value" : { "3" : null },
"menu" : "attemptLogin",
"args" : { "reason" : "attempt_login", "username" : "{1}", "password" : "{2}" }
}
],
"4" : [ // cancel
{
"value" : { "4" : null },
"menu" : "matrix"
}
]
}
}
}
}
},
"attemptLogin" : {
"art" : "login",
"module" : "login"
},
"logoff" : {
"art" : "logoff",
"module" : "logoff"
}
}