Added more default fonts, and fixed issue with font selector at different GUI scales
This commit is contained in:
parent
e451e8b181
commit
5e8016b504
19 changed files with 438 additions and 21 deletions
|
|
@ -140,13 +140,13 @@ bool GUIStuff::FontPicker::update(UpdateInputData& io, std::string* fontName, GU
|
|||
entryColor = io.theme->backColor1;
|
||||
CLAY({
|
||||
.layout = {
|
||||
.sizing = {.width = CLAY_SIZING_GROW(0), .height = CLAY_SIZING_GROW(0)},
|
||||
.sizing = {.width = CLAY_SIZING_GROW(0), .height = CLAY_SIZING_FIXED(25)},
|
||||
.padding = {.left = 2, .right = 2},
|
||||
.childAlignment = {.x = CLAY_ALIGN_X_LEFT, .y = CLAY_ALIGN_Y_CENTER}
|
||||
},
|
||||
.backgroundColor = convert_vec4<Clay_Color>(entryColor)
|
||||
}) {
|
||||
gui->text_paragraph("font name", std::move(p), std::numeric_limits<float>::max());
|
||||
gui->text_paragraph("font name", std::move(p), 10000.0f); // Setting width to numeric_limits::max will lead to multiplying it by any number greater than 1 to = infinity, which will cause issues
|
||||
|
||||
if(io.mouse.leftClick && Clay_Hovered()) {
|
||||
*fontName = sortedFontList[i];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue