-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy patheventblocks.h
More file actions
38 lines (29 loc) · 1.37 KB
/
eventblocks.h
File metadata and controls
38 lines (29 loc) · 1.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// SPDX-License-Identifier: Apache-2.0
#pragma once
#include <scratchcpp/iextension.h>
namespace libscratchcpp
{
class IAudioInput;
class EventBlocks : public IExtension
{
public:
std::string name() const override;
std::string description() const override;
Rgb color() const override;
void registerBlocks(IEngine *engine) override;
static inline IAudioInput *audioInput = nullptr;
private:
static CompilerValue *compileWhenTouchingObject(Compiler *compiler);
static CompilerValue *compileWhenTouchingObjectPredicate(Compiler *compiler);
static CompilerValue *compileWhenFlagClicked(Compiler *compiler);
static CompilerValue *compileWhenThisSpriteClicked(Compiler *compiler);
static CompilerValue *compileWhenStageClicked(Compiler *compiler);
static CompilerValue *compileWhenBroadcastReceived(Compiler *compiler);
static CompilerValue *compileWhenBackdropSwitchesTo(Compiler *compiler);
static CompilerValue *compileWhenGreaterThan(Compiler *compiler);
static CompilerValue *compileWhenGreaterThanPredicate(Compiler *compiler);
static CompilerValue *compileBroadcast(Compiler *compiler);
static CompilerValue *compileBroadcastAndWait(Compiler *compiler);
static CompilerValue *compileWhenKeyPressed(Compiler *compiler);
};
} // namespace libscratchcpp