Fixed some typos in irrList and adapted GUIEditor to ConstIterators.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@1017 dfc29bdd-3216-0410-991c-e03cc46cb475master
parent
98f8e5317c
commit
2780743d5b
|
@ -83,8 +83,8 @@ public:
|
|||
|
||||
ConstIterator& operator ++() { Current = Current->Next; return *this; }
|
||||
ConstIterator& operator --() { Current = Current->Prev; return *this; }
|
||||
ConstIterator operator ++(s32) { Iterator tmp = *this; Current = Current->Next; return tmp; }
|
||||
ConstIterator operator --(s32) { Iterator tmp = *this; Current = Current->Prev; return tmp; }
|
||||
ConstIterator operator ++(s32) { ConstIterator tmp = *this; Current = Current->Next; return tmp; }
|
||||
ConstIterator operator --(s32) { ConstIterator tmp = *this; Current = Current->Prev; return tmp; }
|
||||
|
||||
ConstIterator& operator +=(s32 num)
|
||||
{
|
||||
|
@ -118,6 +118,7 @@ public:
|
|||
|
||||
SKListNode* Current;
|
||||
|
||||
friend class Iterator;
|
||||
friend class list<T>;
|
||||
};
|
||||
|
||||
|
|
|
@ -127,7 +127,6 @@ CGUIAttributeEditor* CGUIEditWindow::getOptionEditor() const
|
|||
|
||||
void CGUIEditWindow::setSelectedElement(IGUIElement *sel)
|
||||
{
|
||||
|
||||
// save changes
|
||||
AttribEditor->updateAttribs();
|
||||
|
||||
|
|
|
@ -117,7 +117,7 @@ IGUIElement* CGUIEditWorkspace::getEditableElementFromPoint(IGUIElement *start,
|
|||
|
||||
// we have to search from back to front.
|
||||
|
||||
core::list<IGUIElement*>::Iterator it = start->getChildren().getLast();
|
||||
core::list<IGUIElement*>::ConstIterator it = start->getChildren().getLast();
|
||||
s32 count=0;
|
||||
while(it != start->getChildren().end())
|
||||
{
|
||||
|
@ -174,14 +174,13 @@ IGUIElement* CGUIEditWorkspace::getSelectedElement()
|
|||
void CGUIEditWorkspace::selectNextSibling()
|
||||
{
|
||||
IGUIElement* p=0;
|
||||
core::list<IGUIElement*>::Iterator it;
|
||||
|
||||
if (!SelectedElement)
|
||||
p = Parent;
|
||||
else
|
||||
p = SelectedElement->getParent();
|
||||
|
||||
it = p->getChildren().begin();
|
||||
core::list<IGUIElement*>::ConstIterator it = p->getChildren().begin();
|
||||
// find selected element
|
||||
if (SelectedElement)
|
||||
while (*it != SelectedElement)
|
||||
|
@ -198,14 +197,13 @@ void CGUIEditWorkspace::selectNextSibling()
|
|||
void CGUIEditWorkspace::selectPreviousSibling()
|
||||
{
|
||||
IGUIElement* p=0;
|
||||
core::list<IGUIElement*>::Iterator it;
|
||||
|
||||
if (!SelectedElement)
|
||||
p = Parent;
|
||||
else
|
||||
p = SelectedElement->getParent();
|
||||
|
||||
it = p->getChildren().getLast();
|
||||
core::list<IGUIElement*>::ConstIterator it = p->getChildren().getLast();
|
||||
// find selected element
|
||||
if (SelectedElement)
|
||||
while (*it != SelectedElement)
|
||||
|
@ -595,7 +593,7 @@ bool CGUIEditWorkspace::OnEvent(const SEvent &e)
|
|||
el = Parent;
|
||||
grab();
|
||||
// remove all children
|
||||
while(el->getChildren().begin() != Children.end())
|
||||
while(Children.end() != el->getChildren().begin())
|
||||
el->removeChild(*(el->getChildren().begin()));
|
||||
// attach to parent again
|
||||
el->addChild(this);
|
||||
|
|
|
@ -231,14 +231,14 @@ void CGUIPanel::resizeInnerPane()
|
|||
// get desired size (total size of all children)
|
||||
core::rect<s32> totalRect(0,0,0,0);
|
||||
|
||||
core::list<IGUIElement*>::Iterator it = InnerPane->getChildren().begin();
|
||||
|
||||
while ( it != InnerPane->getChildren().end() )
|
||||
core::list<IGUIElement*>::ConstIterator it;
|
||||
|
||||
for ( it = InnerPane->getChildren().begin();
|
||||
it != InnerPane->getChildren().end(); ++it )
|
||||
{
|
||||
core::rect<s32> rct = (*it)->getRelativePosition();
|
||||
totalRect.addInternalPoint(rct.UpperLeftCorner);
|
||||
totalRect.addInternalPoint(rct.LowerRightCorner);
|
||||
it++;
|
||||
}
|
||||
|
||||
// move children if pane needs to grow
|
||||
|
@ -253,11 +253,10 @@ void CGUIPanel::resizeInnerPane()
|
|||
{
|
||||
totalRect += adjustedMovement;
|
||||
|
||||
it = InnerPane->getChildren().begin();
|
||||
while ( it != InnerPane->getChildren().end() )
|
||||
for (it = InnerPane->getChildren().begin();
|
||||
it != InnerPane->getChildren().end(); ++it )
|
||||
{
|
||||
(*it)->move(adjustedMovement);
|
||||
it++;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue