zetaPRIME e22c8995a6 TextBox widget, justification and inheritance in TextConfig,
fix closing osk from InputHandler, make font text input const,
font-related miscellany
2017-03-16 13:25:16 -04:00

32 lines
1.6 KiB
C++

#pragma once
#include "starlight/_global.h"
#include <memory>
#include "starlight/gfx/BitmapFont.h"
#include "starlight/gfx/Font.h"
namespace starlight {
namespace gfx {
class FontBMF : public Font {
private:
//
public:
std::shared_ptr<BitmapFont> font;
FontBMF() { }
~FontBMF() { }
Vector2 Measure(const std::string& text, float scale = 1, float maxWidth = 400) override;
void Print(Vector2 position, const std::string& text, float scale = 1, Color color = Color::white, Vector2 justification = Vector2::zero, OptRef<Color> borderColor = nullptr) override;
void Print(VRect rect, const std::string& text, float scale = 1, Color color = Color::white, Vector2 justification = Vector2::zero, OptRef<Color> borderColor = nullptr) override;
//void PrintDisplayList(DisplayList* dl, Vector2 position, std::string& text, float scale = 1, Color color = Color::white, Vector2 justification = Vector2::zero, OptRef<Color> borderColor = nullptr) override;
//void PrintDisplayList(DisplayList* dl, VRect rect, std::string& text, float scale = 1, Color color = Color::white, Vector2 justification = Vector2::zero, OptRef<Color> borderColor = nullptr) override;
Vector2 GetCursorPosition(VRect rect, const std::string& text, unsigned int end, float scale) override;
unsigned int GetCursorFromPoint(VRect rect, const std::string& text, Vector2 pt, float scale) override;
};
}
}