moving MesDpadButtonInfo to core

This commit is contained in:
Peli de Halleux 2017-05-25 17:40:22 -07:00
parent d1c00ae3ab
commit fc71a5aecd
6 changed files with 87 additions and 87 deletions

View File

@ -149,6 +149,22 @@
"MelodyOptions.Forever|block": "forever",
"MelodyOptions.OnceInBackground|block": "once in background",
"MelodyOptions.Once|block": "once",
"MesDpadButtonInfo.ADown|block": "A down",
"MesDpadButtonInfo.AUp|block": "A up",
"MesDpadButtonInfo.BDown|block": "B down",
"MesDpadButtonInfo.BUp|block": "B up",
"MesDpadButtonInfo.CDown|block": "C down",
"MesDpadButtonInfo.CUp|block": "C up",
"MesDpadButtonInfo.DDown|block": "D down",
"MesDpadButtonInfo.DUp|block": "D up",
"MesDpadButtonInfo._1Down|block": "1 down",
"MesDpadButtonInfo._1Up|block": "1 up",
"MesDpadButtonInfo._2Down|block": "2 down",
"MesDpadButtonInfo._2Up|block": "2 up",
"MesDpadButtonInfo._3Down|block": "3 down",
"MesDpadButtonInfo._3Up|block": "3 up",
"MesDpadButtonInfo._4Down|block": "4 down",
"MesDpadButtonInfo._4Up|block": "4 up",
"MusicEvent.BackgroundMelodyEnded|block": "background melody ended",
"MusicEvent.BackgroundMelodyNotePlayed|block": "background melody note played",
"MusicEvent.BackgroundMelodyPaused|block": "background melody paused",

36
libs/core/enums.d.ts vendored
View File

@ -121,6 +121,42 @@ declare namespace basic {
//% block="8g"
EightG = 10, // MICROBIT_ACCELEROMETER_EVT_8G
}
declare enum MesDpadButtonInfo {
//% block="A down"
ADown = 1, // MES_DPAD_BUTTON_A_DOWN
//% block="A up"
AUp = 2, // MES_DPAD_BUTTON_A_UP
//% block="B down"
BDown = 3, // MES_DPAD_BUTTON_B_DOWN
//% block="B up"
BUp = 4, // MES_DPAD_BUTTON_B_UP
//% block="C down"
CDown = 5, // MES_DPAD_BUTTON_C_DOWN
//% block="C up"
CUp = 6, // MES_DPAD_BUTTON_C_UP
//% block="D down"
DDown = 7, // MES_DPAD_BUTTON_D_DOWN
//% block="D up"
DUp = 8, // MES_DPAD_BUTTON_D_UP
//% block="1 down"
_1Down = 9, // MES_DPAD_BUTTON_1_DOWN
//% block="1 up"
_1Up = 10, // MES_DPAD_BUTTON_1_UP
//% block="2 down"
_2Down = 11, // MES_DPAD_BUTTON_2_DOWN
//% block="2 up"
_2Up = 12, // MES_DPAD_BUTTON_2_UP
//% block="3 down"
_3Down = 13, // MES_DPAD_BUTTON_3_DOWN
//% block="3 up"
_3Up = 14, // MES_DPAD_BUTTON_3_UP
//% block="4 down"
_4Down = 15, // MES_DPAD_BUTTON_4_DOWN
//% block="4 up"
_4Up = 16, // MES_DPAD_BUTTON_4_UP
}
declare namespace input {
}

View File

@ -112,6 +112,41 @@ enum class Gesture {
EightG = MICROBIT_ACCELEROMETER_EVT_8G
};
enum class MesDpadButtonInfo {
//% block="A down"
ADown = MES_DPAD_BUTTON_A_DOWN,
//% block="A up"
AUp = MES_DPAD_BUTTON_A_UP,
//% block="B down"
BDown = MES_DPAD_BUTTON_B_DOWN,
//% block="B up"
BUp = MES_DPAD_BUTTON_B_UP,
//% block="C down"
CDown = MES_DPAD_BUTTON_C_DOWN,
//% block="C up"
CUp = MES_DPAD_BUTTON_C_UP,
//% block="D down"
DDown = MES_DPAD_BUTTON_D_DOWN,
//% block="D up"
DUp = MES_DPAD_BUTTON_D_UP,
//% block="1 down"
_1Down = MES_DPAD_BUTTON_1_DOWN,
//% block="1 up"
_1Up = MES_DPAD_BUTTON_1_UP,
//% block="2 down"
_2Down = MES_DPAD_BUTTON_2_DOWN,
//% block="2 up"
_2Up = MES_DPAD_BUTTON_2_UP,
//% block="3 down"
_3Down = MES_DPAD_BUTTON_3_DOWN,
//% block="3 up"
_3Up = MES_DPAD_BUTTON_3_UP,
//% block="4 down"
_4Down = MES_DPAD_BUTTON_4_DOWN,
//% block="4 up"
_4Up = MES_DPAD_BUTTON_4_UP,
};
//% color=#B4009E weight=99 icon="\uf192"
namespace input {
/**

View File

@ -25,22 +25,6 @@
"MesDeviceInfo.OrientationLandscape|block": "orientation landscape",
"MesDeviceInfo.OrientationPortrait|block": "orientation portrait",
"MesDeviceInfo.Shaken|block": "shaken",
"MesDpadButtonInfo.ADown|block": "A down",
"MesDpadButtonInfo.AUp|block": "A up",
"MesDpadButtonInfo.BDown|block": "B down",
"MesDpadButtonInfo.BUp|block": "B up",
"MesDpadButtonInfo.CDown|block": "C down",
"MesDpadButtonInfo.CUp|block": "C up",
"MesDpadButtonInfo.DDown|block": "D down",
"MesDpadButtonInfo.DUp|block": "D up",
"MesDpadButtonInfo._1Down|block": "1 down",
"MesDpadButtonInfo._1Up|block": "1 up",
"MesDpadButtonInfo._2Down|block": "2 down",
"MesDpadButtonInfo._2Up|block": "2 up",
"MesDpadButtonInfo._3Down|block": "3 down",
"MesDpadButtonInfo._3Up|block": "3 up",
"MesDpadButtonInfo._4Down|block": "4 down",
"MesDpadButtonInfo._4Up|block": "4 up",
"MesRemoteControlEvent.forward|block": "forward",
"MesRemoteControlEvent.nextTrack|block": "next track",
"MesRemoteControlEvent.pause|block": "pause",

View File

@ -85,41 +85,6 @@ enum class MesRemoteControlEvent {
volumeDown = MES_REMOTE_CONTROL_EVT_VOLUMEDOWN,
};
enum class MesDpadButtonInfo {
//% block="A down"
ADown = MES_DPAD_BUTTON_A_DOWN,
//% block="A up"
AUp = MES_DPAD_BUTTON_A_UP,
//% block="B down"
BDown = MES_DPAD_BUTTON_B_DOWN,
//% block="B up"
BUp = MES_DPAD_BUTTON_B_UP,
//% block="C down"
CDown = MES_DPAD_BUTTON_C_DOWN,
//% block="C up"
CUp = MES_DPAD_BUTTON_C_UP,
//% block="D down"
DDown = MES_DPAD_BUTTON_D_DOWN,
//% block="D up"
DUp = MES_DPAD_BUTTON_D_UP,
//% block="1 down"
_1Down = MES_DPAD_BUTTON_1_DOWN,
//% block="1 up"
_1Up = MES_DPAD_BUTTON_1_UP,
//% block="2 down"
_2Down = MES_DPAD_BUTTON_2_DOWN,
//% block="2 up"
_2Up = MES_DPAD_BUTTON_2_UP,
//% block="3 down"
_3Down = MES_DPAD_BUTTON_3_DOWN,
//% block="3 up"
_3Up = MES_DPAD_BUTTON_3_UP,
//% block="4 down"
_4Down = MES_DPAD_BUTTON_4_DOWN,
//% block="4 up"
_4Up = MES_DPAD_BUTTON_4_UP,
};
/**
* Control a phone with the BBC micro:bit via Bluetooth.
*/

View File

@ -85,42 +85,6 @@
//% block="volume down"
volumeDown = 9, // MES_REMOTE_CONTROL_EVT_VOLUMEDOWN
}
declare enum MesDpadButtonInfo {
//% block="A down"
ADown = 1, // MES_DPAD_BUTTON_A_DOWN
//% block="A up"
AUp = 2, // MES_DPAD_BUTTON_A_UP
//% block="B down"
BDown = 3, // MES_DPAD_BUTTON_B_DOWN
//% block="B up"
BUp = 4, // MES_DPAD_BUTTON_B_UP
//% block="C down"
CDown = 5, // MES_DPAD_BUTTON_C_DOWN
//% block="C up"
CUp = 6, // MES_DPAD_BUTTON_C_UP
//% block="D down"
DDown = 7, // MES_DPAD_BUTTON_D_DOWN
//% block="D up"
DUp = 8, // MES_DPAD_BUTTON_D_UP
//% block="1 down"
_1Down = 9, // MES_DPAD_BUTTON_1_DOWN
//% block="1 up"
_1Up = 10, // MES_DPAD_BUTTON_1_UP
//% block="2 down"
_2Down = 11, // MES_DPAD_BUTTON_2_DOWN
//% block="2 up"
_2Up = 12, // MES_DPAD_BUTTON_2_UP
//% block="3 down"
_3Down = 13, // MES_DPAD_BUTTON_3_DOWN
//% block="3 up"
_3Up = 14, // MES_DPAD_BUTTON_3_UP
//% block="4 down"
_4Down = 15, // MES_DPAD_BUTTON_4_DOWN
//% block="4 up"
_4Up = 16, // MES_DPAD_BUTTON_4_UP
}
declare namespace devices {
}