Add music
This commit is contained in:
25
libs/core/control.cpp
Normal file
25
libs/core/control.cpp
Normal file
@@ -0,0 +1,25 @@
|
||||
#include "pxt.h"
|
||||
|
||||
namespace control {
|
||||
|
||||
/**
|
||||
* Announce that an event happened to registered handlers.
|
||||
* @param src ID of the Component that generated the event
|
||||
* @param value Component specific code indicating the cause of the event.
|
||||
* @param mode optional definition of how the event should be processed after construction.
|
||||
*/
|
||||
//% weight=21 blockGap=12 blockId="control_raise_event"
|
||||
//% block="raise event|from %src|with value value" blockExternalInputs=1
|
||||
void raiseEvent(int src, int value) {
|
||||
pxt::raiseEvent(src, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Allocates the next user notification event
|
||||
*/
|
||||
//% help=control/allocate-notify-event
|
||||
int allocateNotifyEvent() {
|
||||
return pxt::allocateNotifyEvent();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user