-
Notifications
You must be signed in to change notification settings - Fork 1
Cave Toolbar API
These methods are part of the cave
JavaScript API, and allow you to interact with the toolbar along the bottom of the screen.
Value | Button |
---|---|
0 |
Exit |
1 |
Back |
2 |
Activity |
3 |
Community |
4 |
Notification |
5 |
My Menu |
7 |
Guide |
99 |
Back key |
-
Arguments:
-
{Boolean}
visibility
-
-
Usage:
Toggle toolbar visibility.
-
Arguments:
-
{Number}
buttonType -
{Function}
callback
-
-
Usage:
Attach a callback function that gets called whenever a specific toolbar button is pressed.
-
Example:
// add a custom callback to the "My Menu" button (type 5) cave.toolbar_setCallback(5, function() { // do something... })
-
Arguments:
-
{Function}
myMenuCallback -
{Function}
activityCallback -
{Function}
communityCallback -
{Function}
notificationCallback
-
-
Usage:
Similar to
toolbar_setCallback
, only that it allows you to add callbacks to each toolbar button in one go.
-
Arguments:
-
{Number}
count
-
-
Usage:
Set the current notification count
-
Arguments:
-
{Number}
buttonType
-
-
Usage:
Highlight a button - usually done in a button's own callback function to show that it has been activated.
-
Arguments:
-
{Boolean}
enable
-
-
Usage:
Toggle default back button behaviour from a boolean.
-
Arguments:
-
{Number}
buttonType
-
-
Usage:
(untested) Appears to set the "corner button" type.
-
Usage:
(untested) Presumably get the corner button's current type.
-
Arguments:
-
{Number}
mode
-
-
Usage:
(untested)
-
Arguments:
-
{String}
message
-
-
Usage:
(untested)
-
Arguments:
-
{Boolean}
enable
-
-
Usage:
(untested)
-
Usage:
(untested)