mirror of
https://github.com/edubart/otclient.git
synced 2025-10-19 05:53:26 +02:00
use boost stuff
This commit is contained in:
@@ -51,6 +51,6 @@ private:
|
||||
Callback m_buttonClickCallback;
|
||||
};
|
||||
|
||||
typedef std::shared_ptr<UIButton> UIButtonPtr;
|
||||
typedef boost::shared_ptr<UIButton> UIButtonPtr;
|
||||
|
||||
#endif // UIBUTTON_H
|
||||
|
@@ -48,7 +48,7 @@ public:
|
||||
|
||||
virtual UI::EElementType getElementType() const { return UI::Container; }
|
||||
|
||||
UIContainerPtr asUIContainer() { return std::static_pointer_cast<UIContainer>(shared_from_this()); }
|
||||
UIContainerPtr asUIContainer() { return boost::static_pointer_cast<UIContainer>(shared_from_this()); }
|
||||
|
||||
static UIContainerPtr& getRootContainer();
|
||||
|
||||
|
@@ -33,12 +33,12 @@
|
||||
class UIElementSkin;
|
||||
|
||||
class UIContainer;
|
||||
typedef std::shared_ptr<UIContainer> UIContainerPtr;
|
||||
typedef std::weak_ptr<UIContainer> UIContainerWeakPtr;
|
||||
typedef boost::shared_ptr<UIContainer> UIContainerPtr;
|
||||
typedef boost::weak_ptr<UIContainer> UIContainerWeakPtr;
|
||||
|
||||
class UIElement;
|
||||
typedef std::shared_ptr<UIElement> UIElementPtr;
|
||||
typedef std::weak_ptr<UIElement> UIElementWeakPtr;
|
||||
typedef boost::shared_ptr<UIElement> UIElementPtr;
|
||||
typedef boost::weak_ptr<UIElement> UIElementWeakPtr;
|
||||
|
||||
class UIElement : public UILayout
|
||||
{
|
||||
@@ -72,7 +72,7 @@ public:
|
||||
|
||||
UI::EElementType getElementType() const { return m_type; }
|
||||
|
||||
UIElementPtr asUIElement() { return std::static_pointer_cast<UIElement>(shared_from_this()); }
|
||||
UIElementPtr asUIElement() { return boost::static_pointer_cast<UIElement>(shared_from_this()); }
|
||||
virtual UIContainerPtr asUIContainer() { return UIContainerPtr(); }
|
||||
|
||||
friend class UIContainer;
|
||||
|
@@ -43,6 +43,6 @@ private:
|
||||
std::string m_text;
|
||||
};
|
||||
|
||||
typedef std::shared_ptr<UILabel> UILabelPtr;
|
||||
typedef boost::shared_ptr<UILabel> UILabelPtr;
|
||||
|
||||
#endif // UILABEL_H
|
||||
|
@@ -39,8 +39,8 @@ enum EAnchorType {
|
||||
};
|
||||
|
||||
class UILayout;
|
||||
typedef std::shared_ptr<UILayout> UILayoutPtr;
|
||||
typedef std::weak_ptr<UILayout> UILayoutWeakPtr;
|
||||
typedef boost::shared_ptr<UILayout> UILayoutPtr;
|
||||
typedef boost::weak_ptr<UILayout> UILayoutWeakPtr;
|
||||
|
||||
class AnchorLine
|
||||
{
|
||||
@@ -62,7 +62,7 @@ private:
|
||||
EAnchorType m_anchorType;
|
||||
};
|
||||
|
||||
class UILayout : public std::enable_shared_from_this<UILayout>
|
||||
class UILayout : public boost::enable_shared_from_this<UILayout>
|
||||
{
|
||||
public:
|
||||
UILayout() :
|
||||
|
@@ -194,17 +194,17 @@ void UILoader::loadElement(const UIElementPtr& element, const YAML::Node& node)
|
||||
|
||||
// load specific element type
|
||||
if(element->getElementType() == UI::Button) {
|
||||
UIButtonPtr button = std::static_pointer_cast<UIButton>(element);
|
||||
UIButtonPtr button = boost::static_pointer_cast<UIButton>(element);
|
||||
node["text"] >> tmp;
|
||||
button->setText(tmp);
|
||||
}
|
||||
else if(element->getElementType() == UI::Window) {
|
||||
UIWindowPtr window = std::static_pointer_cast<UIWindow>(element);
|
||||
UIWindowPtr window = boost::static_pointer_cast<UIWindow>(element);
|
||||
node["title"] >> tmp;
|
||||
window->setTitle(tmp);
|
||||
}
|
||||
else if(element->getElementType() == UI::Label) {
|
||||
UILabelPtr label = std::static_pointer_cast<UILabel>(element);
|
||||
UILabelPtr label = boost::static_pointer_cast<UILabel>(element);
|
||||
node["text"] >> tmp;
|
||||
label->setText(tmp);
|
||||
}
|
||||
|
@@ -35,6 +35,6 @@ public:
|
||||
UIPanel() : UIContainer(UI::Panel) { }
|
||||
};
|
||||
|
||||
typedef std::shared_ptr<UIPanel> UIPanelPtr;
|
||||
typedef boost::shared_ptr<UIPanel> UIPanelPtr;
|
||||
|
||||
#endif // UIPANEL_H
|
||||
|
@@ -57,6 +57,6 @@ private:
|
||||
std::string m_text;
|
||||
};
|
||||
|
||||
typedef std::shared_ptr<UITextEdit> UITextEditPtr;
|
||||
typedef boost::shared_ptr<UITextEdit> UITextEditPtr;
|
||||
|
||||
#endif // UITEXTEDIT_H
|
||||
|
@@ -41,6 +41,6 @@ private:
|
||||
std::string m_title;
|
||||
};
|
||||
|
||||
typedef std::shared_ptr<UIWindow> UIWindowPtr;
|
||||
typedef boost::shared_ptr<UIWindow> UIWindowPtr;
|
||||
|
||||
#endif // UIWINDOW_H
|
||||
|
Reference in New Issue
Block a user