-
Notifications
You must be signed in to change notification settings - Fork 5
/
menus.php
20 lines (18 loc) · 1005 Bytes
/
menus.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<?php
// Application Special Keywords
$SpecialKeywords = new stdClass();
$SpecialKeywords->Name = "Special Keywords";
$SpecialKeywords->Actions = array('QUIT'=>'Quit',
'TEXTEDIT'=>['OpenTextEditor']); // SpecialKeywords KEYS ARE ALL CAPS
// Values are their function name
// or array [function name, data]
// Application Main Menu
$MainMenu = new stdClass();
$MainMenu->Name = "Main Menu";
$MainMenu->MenuOptions = array('Quit', 'Open a Text Editor', 'Ping Google', 'Submenu 42', 'Nothing');
$MainMenu->MenuActions = array('Quit', 'OpenTextEditor', ['Ping', '8.8.8.8'], ['ChangeMenu', 'Submenu42'] );
// Submenu 42
$Submenu42 = new stdClass();
$Submenu42->Name = "Submenu 42";
$Submenu42->MenuOptions = array('Back to Main Menu', 'Nothing', 'Nada', 'Nope', 'Ziltch');
$Submenu42->MenuActions = array(['ChangeMenu', 'MainMenu'], );