diff --git a/CMakeLists.txt b/CMakeLists.txt index 05f8bbaa..7d67f33c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -120,6 +120,7 @@ SET(SOURCES src/framework/ui/uiwindow.cpp src/framework/ui/uianchorlayout.cpp src/framework/ui/uianchor.cpp + src/framework/ui/uilist.cpp ) IF(WIN32) diff --git a/modules/core_ui/panels.otui b/modules/core_ui/panels.otui index 29f51bc9..fc900498 100644 --- a/modules/core_ui/panels.otui +++ b/modules/core_ui/panels.otui @@ -10,3 +10,6 @@ RoundedPanel < Panel border-image: source: /core_ui/images/panel_rounded.png border: 4 + +RectPanel < UIWidget + image: /core_ui/images/emptyrect.png \ No newline at end of file diff --git a/src/framework/ui/uideclarations.h b/src/framework/ui/uideclarations.h index 1e0410c5..f74bcb50 100644 --- a/src/framework/ui/uideclarations.h +++ b/src/framework/ui/uideclarations.h @@ -30,7 +30,8 @@ enum UIWidgetType { UITypeLabel, UITypeButton, UITypeLineEdit, - UITypeWindow + UITypeWindow, + UITypeList }; enum FocusReason { diff --git a/src/framework/ui/uilabel.cpp b/src/framework/ui/uilabel.cpp index a2e08950..cf2744ab 100644 --- a/src/framework/ui/uilabel.cpp +++ b/src/framework/ui/uilabel.cpp @@ -30,7 +30,7 @@ void UILabel::loadStyleFromOTML(const OTMLNodePtr& styleNode) void UILabel::render() { - getFont()->renderText(m_text, getGeometry(), m_align, m_fontColor); + m_font->renderText(m_text, m_rect, m_align, m_fontColor); } void UILabel::resizeToText()