- Add point InSpace check to PD::Li::Math - Add Universal AlignmentCenter flag for Horizontal and and Vertical Alignment - Add Fallbackfont to Layout (if you dont want to set font per object) - Add Button Object WIP - Rename OnHover to OnFocus and add OnUnfocus - Move font and FontScale to ElementBase (for fallback logic etc) - Add UpdateInput func to ElementBase - Corectly Set fontScale in Text Rendering - Update ecample
25 lines
474 B
C++
25 lines
474 B
C++
#pragma once
|
|
|
|
#include <pd/core/core.hpp>
|
|
#include <pd/ultra/elems/element.hpp>
|
|
|
|
namespace PD {
|
|
namespace Ultra {
|
|
class PD_API Text : public ElementBase {
|
|
public:
|
|
Text() {}
|
|
~Text() {}
|
|
|
|
void Draw(PD::Li::Drawlist& l) override;
|
|
void Update() override;
|
|
|
|
void SetColor(const PD::Color& color) { pColor = color; }
|
|
void SetText(const std::string& text) { pText = text; }
|
|
|
|
private:
|
|
PD::Color pColor;
|
|
std::string pText;
|
|
};
|
|
} // namespace Ultra
|
|
|
|
} // namespace PD
|