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