Fix editor text caret measurement
This commit is contained in:
@@ -85,6 +85,11 @@ void HierarchyPanel::SetBuiltInIcons(const BuiltInIcons* icons) {
|
||||
RebuildItems();
|
||||
}
|
||||
|
||||
void HierarchyPanel::SetTextMeasurer(
|
||||
const ::XCEngine::UI::Editor::UIEditorTextMeasurer* textMeasurer) {
|
||||
m_textMeasurer = textMeasurer;
|
||||
}
|
||||
|
||||
void HierarchyPanel::ResetInteractionState() {
|
||||
m_filterHostState = {};
|
||||
m_filterHostFrame = {};
|
||||
@@ -660,7 +665,11 @@ void HierarchyPanel::Append(UIDrawList& drawList) const {
|
||||
AppendUIEditorFilterableTreeHostSearchField(
|
||||
drawList,
|
||||
m_filterHostFrame,
|
||||
m_filterHostState);
|
||||
m_filterHostState,
|
||||
"Search",
|
||||
{},
|
||||
{},
|
||||
m_textMeasurer);
|
||||
if (m_treeFrame.layout.bounds.width <= 0.0f ||
|
||||
m_treeFrame.layout.bounds.height <= 0.0f) {
|
||||
return;
|
||||
@@ -687,7 +696,8 @@ void HierarchyPanel::Append(UIDrawList& drawList) const {
|
||||
m_renameState,
|
||||
ResolveUIEditorTreeViewInlineRenamePalette(),
|
||||
BuildUIEditorTreeViewInlineRenameMetrics(
|
||||
BuildRenameBounds(m_renameState.itemId, m_treeFrame.layout)));
|
||||
BuildRenameBounds(m_renameState.itemId, m_treeFrame.layout)),
|
||||
m_textMeasurer);
|
||||
}
|
||||
|
||||
AppendUIEditorTreeViewDropPreview(
|
||||
|
||||
Reference in New Issue
Block a user