infinipaint/src/GUIStuff/Elements/FontPicker.hpp

23 lines
513 B
C++
Raw Normal View History

2025-11-08 20:50:23 +03:00
#pragma once
#include "Element.hpp"
namespace GUIStuff {
class FontPicker : public Element {
public:
struct Data {
std::string* fontName = nullptr;
std::function<void()> onFontChange;
};
FontPicker(GUIManager& gui);
void layout(const Clay_ElementId& id, const Data& data);
2025-11-08 20:50:23 +03:00
private:
Data d;
2025-11-08 20:50:23 +03:00
std::vector<std::string> sortedFontList;
std::vector<std::string> sortedFontListLowercase;
bool dropdownOpen = false;
};
}