aboutsummaryrefslogtreecommitdiff
path: root/src/ui/ui_manager.cpp
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2019-06-27 17:02:58 +0800
committercrupest <crupest@outlook.com>2019-06-27 17:02:58 +0800
commitb53527fbe50a953ad0e3225cc812eb76b8a1f82d (patch)
treeeb81cd14d0a165c47f841ad94835f8987109de7e /src/ui/ui_manager.cpp
parent8c5b05bcfce96495b4ffc4209ab8feda12597729 (diff)
downloadcru-b53527fbe50a953ad0e3225cc812eb76b8a1f82d.tar.gz
cru-b53527fbe50a953ad0e3225cc812eb76b8a1f82d.tar.bz2
cru-b53527fbe50a953ad0e3225cc812eb76b8a1f82d.zip
...
Diffstat (limited to 'src/ui/ui_manager.cpp')
-rw-r--r--src/ui/ui_manager.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/ui/ui_manager.cpp b/src/ui/ui_manager.cpp
index cc741ec5..376b1b45 100644
--- a/src/ui/ui_manager.cpp
+++ b/src/ui/ui_manager.cpp
@@ -6,21 +6,22 @@
#include "cru/platform/native/ui_applicaition.hpp"
namespace cru::ui {
+using namespace cru::platform::graph;
PredefineResources::PredefineResources() {
- const auto graph_factory = platform::graph::IGraphFactory::GetInstance();
+ const auto graph_factory = GraphFactory::GetInstance();
- button_normal_border_brush.reset(static_cast<platform::graph::IBrush*>(
- graph_factory->CreateSolidColorBrush(colors::black)));
- text_block_selection_brush.reset(static_cast<platform::graph::IBrush*>(
+ button_normal_border_brush.reset(
+ static_cast<Brush*>(graph_factory->CreateSolidColorBrush(colors::black)));
+ text_block_selection_brush.reset(static_cast<Brush*>(
graph_factory->CreateSolidColorBrush(colors::skyblue)));
- text_block_text_brush.reset(static_cast<platform::graph::IBrush*>(
- graph_factory->CreateSolidColorBrush(colors::black)));
- text_block_font.reset(graph_factory->CreateFontDescriptor(L"等线", 24.0f));
+ text_block_text_brush.reset(
+ static_cast<Brush*>(graph_factory->CreateSolidColorBrush(colors::black)));
+ text_block_font.reset(graph_factory->CreateFont(L"等线", 24.0f));
}
UiManager* UiManager::GetInstance() {
static UiManager* instance = new UiManager();
- platform::native::IUiApplication::GetInstance()->AddOnQuitHandler([] {
+ platform::native::UiApplication::GetInstance()->AddOnQuitHandler([] {
delete instance;
instance = nullptr;
});