Skip to content

Commit af12984

Browse files
committed
Override IExtension::color()
1 parent f494cc1 commit af12984

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

src/blocks/penblocks.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@ std::string PenBlocks::description() const
3434
return "Pen blocks";
3535
}
3636

37+
Rgb PenBlocks::color() const
38+
{
39+
return rgb(15, 189, 140);
40+
}
41+
3742
void PenBlocks::registerBlocks(IEngine *engine)
3843
{
3944
// Blocks

src/blocks/penblocks.h

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ class PenBlocks : public libscratchcpp::IExtension
2626

2727
std::string name() const override;
2828
std::string description() const override;
29+
libscratchcpp::Rgb color() const override;
2930

3031
void registerBlocks(libscratchcpp::IEngine *engine) override;
3132

test/mocks/extensionmock.h

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ class ExtensionMock : public IExtension
1313
public:
1414
MOCK_METHOD(std::string, name, (), (const, override));
1515
MOCK_METHOD(std::string, description, (), (const, override));
16+
MOCK_METHOD(Rgb, color, (), (const, override));
1617

1718
MOCK_METHOD(void, registerBlocks, (IEngine * engine), (override));
1819
MOCK_METHOD(void, onInit, (IEngine * engine), (override));

0 commit comments

Comments
 (0)