mirror of
https://github.com/edubart/otclient.git
synced 2025-12-23 00:27:12 +01:00
display window on screen center
This commit is contained in:
@@ -34,7 +34,6 @@ void UIManager::init()
|
||||
// creates root widget
|
||||
m_rootWidget = UIWidget::create<UIWidget>();
|
||||
m_rootWidget->setId("root");
|
||||
m_rootWidget->resize(g_window.getSize());
|
||||
m_mouseReceiver = m_rootWidget;
|
||||
m_keyboardReceiver = m_rootWidget;
|
||||
}
|
||||
@@ -134,8 +133,9 @@ OTMLNodePtr UIManager::getStyle(const std::string& styleName)
|
||||
|
||||
// styles starting with UI are automatically defined
|
||||
if(boost::starts_with(styleName, "UI")) {
|
||||
OTMLNodePtr node = OTMLNode::create();
|
||||
OTMLNodePtr node = OTMLNode::create(styleName);
|
||||
node->writeAt("__class", styleName);
|
||||
m_styles[styleName] = node;
|
||||
return node;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user