diff --git a/extensions/CocoStudio/GUI/Layouts/Layout.cpp b/extensions/CocoStudio/GUI/Layouts/Layout.cpp index 42da6163d7..3492de9486 100644 --- a/extensions/CocoStudio/GUI/Layouts/Layout.cpp +++ b/extensions/CocoStudio/GUI/Layouts/Layout.cpp @@ -47,7 +47,7 @@ _gEndColor(Color3B::WHITE), _alongVector(Point(0.0f, -1.0f)), _cOpacity(255), _backGroundImageTextureSize(Size::ZERO), -_layoutType(LAYOUT_DEFAULT) +_layoutType(LAYOUT_ABSOLUTE) { _widgetType = WidgetTypeContainer; } @@ -420,7 +420,7 @@ void Layout::doLayout() { switch (_layoutType) { - case LAYOUT_DEFAULT: + case LAYOUT_ABSOLUTE: break; case LAYOUT_LINEAR_VERTICAL: { diff --git a/extensions/CocoStudio/GUI/Layouts/Layout.h b/extensions/CocoStudio/GUI/Layouts/Layout.h index 36d62bc709..bf8719a06d 100644 --- a/extensions/CocoStudio/GUI/Layouts/Layout.h +++ b/extensions/CocoStudio/GUI/Layouts/Layout.h @@ -38,7 +38,7 @@ typedef enum typedef enum { - LAYOUT_DEFAULT, + LAYOUT_ABSOLUTE, LAYOUT_LINEAR_VERTICAL, LAYOUT_LINEAR_HORIZONTAL, LAYOUT_RELATIVE @@ -175,7 +175,7 @@ public: * * @param LayoutType */ - void setLayoutType(LayoutType type); + virtual void setLayoutType(LayoutType type); /** * Gets LayoutType. @@ -184,7 +184,7 @@ public: * * @return LayoutType */ - LayoutType getLayoutType() const; + virtual LayoutType getLayoutType() const; virtual void doLayout(); diff --git a/extensions/CocoStudio/GUI/UIWidgets/ScrollWidget/UIDragPanel.h b/extensions/CocoStudio/GUI/UIWidgets/ScrollWidget/UIDragPanel.h index 53279655be..dc05b53d21 100644 --- a/extensions/CocoStudio/GUI/UIWidgets/ScrollWidget/UIDragPanel.h +++ b/extensions/CocoStudio/GUI/UIWidgets/ScrollWidget/UIDragPanel.h @@ -198,7 +198,7 @@ public: * * @param LayoutType */ - void setLayoutType(LayoutType type); + virtual void setLayoutType(LayoutType type); /** * Gets LayoutType. @@ -207,7 +207,7 @@ public: * * @return LayoutType */ - LayoutType getLayoutType() const; + virtual LayoutType getLayoutType() const; virtual void doLayout(); diff --git a/extensions/CocoStudio/GUI/UIWidgets/ScrollWidget/UIScrollView.h b/extensions/CocoStudio/GUI/UIWidgets/ScrollWidget/UIScrollView.h index a6ad52f45e..ecf56cadd7 100644 --- a/extensions/CocoStudio/GUI/UIWidgets/ScrollWidget/UIScrollView.h +++ b/extensions/CocoStudio/GUI/UIWidgets/ScrollWidget/UIScrollView.h @@ -172,7 +172,7 @@ public: * * @param LayoutType */ - void setLayoutType(LayoutType type); + virtual void setLayoutType(LayoutType type); /** * Gets LayoutType. @@ -181,7 +181,7 @@ public: * * @return LayoutType */ - LayoutType getLayoutType() const; + virtual LayoutType getLayoutType() const; virtual void doLayout();