void Container_hideNotify(entity me)
{
entity e;
- if not(me.shown)
+ if (!me.shown)
return;
me.shown = 0;
for(e = me.firstChild; e; e = e.nextSibling)
e.draw(e);
me.leaveSubitem(me);
}
+
+ SUPER(Container).draw(me);
}
void Container_focusLeave(entity me)
other.Container_size = theSize;
me.setAlphaOf(me, other, theAlpha);
- entity f, l;
- f = me.firstChild;
+ entity l;
l = me.lastChild;
if(l)
other.parent = NULL;
- entity n, p, f, l;
- f = me.firstChild;
- l = me.lastChild;
+ entity n, p;
n = other.nextSibling;
p = other.prevSibling;
void Container_setFocus(entity me, entity other)
{
if(other)
- if not(me.focused)
+ if (!me.focused)
error("Trying to set focus in a non-focused control!");
if(me.focusedChild == other)
return;
void Container_moveItemAfter(entity me, entity other, entity dest)
{
// first: remove other from the chain
- entity n, p, f, l;
+ entity n, p;
if(other.parent != me)
error("Can't move in wrong container!");
- f = me.firstChild;
- l = me.lastChild;
n = other.nextSibling;
p = other.prevSibling;
n.prevSibling = p;
else
me.lastChild = p;
-
+
// now other got removed. Insert it behind dest now.
other.prevSibling = dest;
if(dest)