-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathText.h
More file actions
25 lines (23 loc) · 701 Bytes
/
Text.h
File metadata and controls
25 lines (23 loc) · 701 Bytes
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
#ifndef TEXT_H
#define TEXT_H
#include "Node.h"
#include <string>
#include <functional>
#include "MainWindow.h"
namespace UI
{
class Text : public Node
{
private:
std::function<std::string()> value{[]()
{ return ""; }};
Bounds minimumBoundsForText{};
public:
// void onMouseMove(float x, float y) override;
void render(SDL_Renderer *renderer, TextManager *textManager, Context ctx) override;
Text(std::function<std::string()> value);
void measure(TextManager *textManager, float availableWidth, float availableHeight) override;
void setBounds(Bounds _bounds) override;
};
}
#endif