mirror of https://github.com/axmolengine/axmol.git
Merge pull request #9570 from liamcindy/UIListView
override function for listview
This commit is contained in:
commit
90a7f99873
|
@ -270,7 +270,7 @@ public:
|
|||
/**
|
||||
* force refresh widget layout
|
||||
*/
|
||||
void forceDoLayout();
|
||||
virtual void forceDoLayout();
|
||||
|
||||
/**
|
||||
* request to refresh widget layout
|
||||
|
|
|
@ -453,6 +453,17 @@ void ListView::refreshView()
|
|||
updateInnerContainerSize();
|
||||
}
|
||||
|
||||
void ListView::forceDoLayout()
|
||||
{
|
||||
if (_refreshViewDirty)
|
||||
{
|
||||
refreshView();
|
||||
_refreshViewDirty = false;
|
||||
}
|
||||
|
||||
this->_innerContainer->forceDoLayout();
|
||||
}
|
||||
|
||||
void ListView::doLayout()
|
||||
{
|
||||
Layout::doLayout();
|
||||
|
|
|
@ -162,6 +162,8 @@ public:
|
|||
|
||||
float getItemsMargin()const;
|
||||
|
||||
virtual void forceDoLayout()override;
|
||||
|
||||
virtual void doLayout() override;
|
||||
|
||||
virtual void addChild(Node* child)override;
|
||||
|
|
Loading…
Reference in New Issue