Print messages using SkParagraph and new TextParagraph element
This commit is contained in:
parent
9ceb4e1b8a
commit
921e111255
9 changed files with 147 additions and 16 deletions
16
src/GUIStuff/Elements/TextParagraph.hpp
Normal file
16
src/GUIStuff/Elements/TextParagraph.hpp
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
#pragma once
|
||||
#include "Element.hpp"
|
||||
#include <modules/skparagraph/include/Paragraph.h>
|
||||
|
||||
namespace GUIStuff {
|
||||
|
||||
class TextParagraph : public Element {
|
||||
public:
|
||||
void update(UpdateInputData& io, std::unique_ptr<skia::textlayout::Paragraph> paragraph, float width, const std::function<void()>& elemUpdate);
|
||||
virtual void clay_draw(SkCanvas* canvas, UpdateInputData& io, Clay_RenderCommand* command) override;
|
||||
private:
|
||||
SCollision::AABB<float> bb = SCollision::AABB<float>({0.0f, 0.0f}, {0.0f, 0.0f});
|
||||
std::unique_ptr<skia::textlayout::Paragraph> data;
|
||||
};
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue