forked from 0x2620/oxjs
more docs
This commit is contained in:
parent
bdb8d98787
commit
cc75e25415
42 changed files with 664 additions and 93 deletions
|
|
@ -6,9 +6,9 @@ Ox.MainMenu <f:Ox.Bar> MainMenu Object
|
|||
(options) -> <f> MainMenu Object
|
||||
(options, self) -> <f> MainMenu Object
|
||||
options <o> Options object
|
||||
extras <a> []
|
||||
menus <a> []
|
||||
size <s> medium
|
||||
extras <a|[]> extra menus
|
||||
menus <a|[]> submenus
|
||||
size <s|medium> can be small, medium, large
|
||||
self <o> shared private variable
|
||||
@*/
|
||||
|
||||
|
|
@ -117,6 +117,9 @@ Ox.MainMenu = function(options, self) {
|
|||
|
||||
};
|
||||
|
||||
/*@
|
||||
checkItem <f> checkItem
|
||||
@*/
|
||||
that.checkItem = function(id) {
|
||||
var ids = id.split('_'),
|
||||
itemId = ids.pop(),
|
||||
|
|
@ -124,12 +127,18 @@ Ox.MainMenu = function(options, self) {
|
|||
that.getMenu(menuId).checkItem(itemId);
|
||||
};
|
||||
|
||||
/*@
|
||||
disableItem <f> disableItem
|
||||
@*/
|
||||
that.disableItem = function(id) {
|
||||
that.getItem(id).options({
|
||||
disabled: true
|
||||
});
|
||||
};
|
||||
|
||||
/*@
|
||||
enableItem <f> enableItem
|
||||
@*/
|
||||
that.enableItem = function(id) {
|
||||
Ox.print('ENABLE ITEM', id)
|
||||
that.getItem(id).options({
|
||||
|
|
@ -137,6 +146,9 @@ Ox.MainMenu = function(options, self) {
|
|||
});
|
||||
};
|
||||
|
||||
/*@
|
||||
getItem <f> getItem
|
||||
@*/
|
||||
that.getItem = function(id) {
|
||||
var ids = id.split('_'),
|
||||
item;
|
||||
|
|
@ -152,6 +164,9 @@ Ox.MainMenu = function(options, self) {
|
|||
return item;
|
||||
};
|
||||
|
||||
/*@
|
||||
getMenu <f> getMenu
|
||||
@*/
|
||||
that.getMenu = function(id) {
|
||||
var ids = id.split('_'),
|
||||
menu;
|
||||
|
|
@ -173,18 +188,27 @@ Ox.MainMenu = function(options, self) {
|
|||
|
||||
};
|
||||
|
||||
/*@
|
||||
selectNextMenu <f> selectNextMenu
|
||||
@*/
|
||||
that.selectNextMenu = function() {
|
||||
if (self.selected < self.options.menus.length - 1) {
|
||||
clickTitle(self.selected + 1);
|
||||
}
|
||||
};
|
||||
|
||||
/*@
|
||||
selectPreviousMenu <f> selectPreviousMenu
|
||||
@*/
|
||||
that.selectPreviousMenu = function() {
|
||||
if (self.selected) {
|
||||
clickTitle(self.selected - 1);
|
||||
}
|
||||
};
|
||||
|
||||
/*@
|
||||
uncheckItem <f> uncheckItem
|
||||
@*/
|
||||
that.uncheckItem = function(id) {
|
||||
that.getItem(id).options({
|
||||
checked: false
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue