summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
Diffstat (limited to 'editor')
-rw-r--r--editor/editor.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/editor/editor.cpp b/editor/editor.cpp
index 42b1c75..4aa2c0c 100644
--- a/editor/editor.cpp
+++ b/editor/editor.cpp
@@ -1303,6 +1303,10 @@ void RecordImGuiUITree() {
box->flags |= PKE_UI_BOX_FLAG_CENTER_BOTH;
box->max_size = glm::vec2(.6, .6);
selected_ui_box = box;
+ if (type == PKE_UI_BOX_TYPE_TEXT) {
+ FontRenderSettings frs{};
+ box->type_data->text.font_render_handle = FontType_AddStringRender(FontTypeIndex(0), std::move(cstring_to_pk_cstr("")), &frs, box);
+ }
is_creating_new_box = false;
is_child = false;
type = PKE_UI_BOX_TYPE(-1);