Go to the source code of this file.
|
void | Container_addItem (entity me, entity other, vector theOrigin, vector theSize, float theAlpha) |
|
void | Container_addItemCentered (entity me, entity other, vector theSize, float theAlpha) |
|
void | Container_addItemRightCentered (entity me, entity other, vector theSize, float theAlpha) |
|
void | Container_draw (entity me) |
|
void | Container_enterLieSubitem (entity me, vector o, vector s, vector f, float a) |
|
void | Container_enterSubitem (entity me, entity sub) |
|
void | Container_focusLeave (entity me) |
|
void | Container_hideNotify (entity me) |
|
entity | Container_itemFromPoint (entity me, vector pos) |
|
float | Container_keyDown (entity me, float scan, float ascii, float shift) |
|
float | Container_keyUp (entity me, float scan, float ascii, float shift) |
|
void | Container_leaveSubitem (entity me) |
|
float | Container_mouseDrag (entity me, vector pos) |
|
float | Container_mouseMove (entity me, vector pos) |
|
float | Container_mouseRelease (entity me, vector pos) |
|
void | Container_moveItemAfter (entity me, entity other, entity dest) |
|
entity | Container_preferredFocusedGrandChild (entity me) |
|
void | Container_removeItem (entity me, entity other) |
|
void | Container_resizeNotify (entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize) |
|
void | Container_resizeNotifyLie (entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize,.vector originField,.vector sizeField,.vector fontScaleField) |
|
void | Container_saveFocus (entity me) |
|
void | Container_setAlphaOf (entity me, entity other, float theAlpha) |
|
void | Container_setFocus (entity me, entity other) |
|
void | Container_showNotify (entity me) |
|
◆ Container_addItem()
Definition at line 232 of file container.qc.
References bound(), entity(), error(), NULL, and other.
234 if (
other.parent)
error(
"Can't add already added item!");
236 if (
other.focusable) me.focusable += 1;
240 theOrigin.x -= 0.5 * (theSize.x - 1);
245 theOrigin.y -= 0.5 * (theSize.y - 1);
248 theOrigin.x =
bound(0, theOrigin.x, 1 - theSize.x);
249 theOrigin.y =
bound(0, theOrigin.y, 1 - theSize.y);
252 other.Container_origin = theOrigin;
253 other.Container_size = theSize;
257 other.Container_alpha = theAlpha;
262 if (l) l.nextSibling =
other;
263 else me.firstChild =
other;
265 other.prevSibling = l;
267 me.lastChild =
other;
◆ Container_addItemCentered()
Definition at line 222 of file container.qc.
224 me.addItem(me,
other,
'0.5 0.5 0' - 0.5 * theSize, theSize, theAlpha);
◆ Container_addItemRightCentered()
Definition at line 227 of file container.qc.
229 me.addItem(me,
other,
'1 0.5 0' - 0.5 * theSize, theSize, theAlpha);
◆ Container_draw()
Definition at line 114 of file container.qc.
References entity(), and SUPER.
119 for (e = me.firstChild; e; e = e.nextSibling)
121 if (e.focusable) me.focusable += 1;
122 if (e.Container_alpha < 0.003)
124 me.enterSubitem(me, e);
◆ Container_enterLieSubitem()
◆ Container_enterSubitem()
Definition at line 3 of file container.qc.
5 me.enterLieSubitem(me, sub.Container_origin, sub.Container_size, sub.Container_fontscale, sub.Container_alpha);
◆ Container_focusLeave()
◆ Container_hideNotify()
Definition at line 38 of file container.qc.
References entity().
41 if (!me.shown)
return;
43 for (e = me.firstChild; e; e = e.nextSibling)
44 if (e.Container_alpha > 0) e.hideNotify(e);
◆ Container_itemFromPoint()
Definition at line 97 of file container.qc.
References entity(), NULL, and vector().
101 for (e = me.lastChild; e; e = e.prevSibling)
103 o = e.Container_origin;
104 s = e.Container_size;
105 if (pos.x < o.x)
continue;
106 if (pos.y < o.y)
continue;
107 if (pos.x >= o.x + s.x)
continue;
108 if (pos.y >= o.y + s.y)
continue;
vector(float skel, float bonenum) _skel_get_boneabs_hidden
◆ Container_keyDown()
Definition at line 152 of file container.qc.
References entity().
159 me.enterSubitem(me, f);
160 r = f.keyDown(f, scan, ascii, shift);
◆ Container_keyUp()
Definition at line 137 of file container.qc.
References entity().
144 me.enterSubitem(me, f);
145 r = f.keyUp(f, scan, ascii, shift);
◆ Container_leaveSubitem()
◆ Container_mouseDrag()
◆ Container_mouseMove()
◆ Container_mouseRelease()
◆ Container_moveItemAfter()
Definition at line 330 of file container.qc.
References dest, entity(), error(), and other.
335 if (
other.parent != me)
error(
"Can't move in wrong container!");
337 n =
other.nextSibling;
338 p =
other.prevSibling;
340 if (p) p.nextSibling = n;
341 else me.firstChild = n;
343 if (n) n.prevSibling = p;
344 else me.lastChild = p;
349 else other.nextSibling = me.firstChild;
352 else me.firstChild =
other;
355 else me.lastChild =
other;
◆ Container_preferredFocusedGrandChild()
Definition at line 358 of file container.qc.
References best, entity(), and NULL.
365 for (e = me.firstChild; e; e = e.nextSibling)
367 if (e.instanceOfContainer)
369 e2 = e.preferredFocusedGrandChild(e);
371 if (!best || best.preferredFocusPriority < e2.preferredFocusPriority) best = e2;
374 if (!best || best.preferredFocusPriority < e.preferredFocusPriority) best = e;
◆ Container_removeItem()
Definition at line 270 of file container.qc.
References entity(), error(), and NULL.
272 if (
other.parent != me)
error(
"Can't remove from wrong container!");
274 if (
other.focusable) me.focusable -= 1;
279 n =
other.nextSibling;
280 p =
other.prevSibling;
282 if (p) p.nextSibling = n;
283 else me.firstChild = n;
285 if (n) n.prevSibling = p;
286 else me.lastChild = p;
◆ Container_resizeNotify()
◆ Container_resizeNotifyLie()
Definition at line 60 of file container.qc.
References boxToGlobal(), boxToGlobalSize(), entity(), SUPER, and vector().
65 for (e = me.firstChild; e; e = e.nextSibling)
69 me.enterLieSubitem(me, o, s, e.(fontScaleField), e.Container_alpha);
76 for (e = me.firstChild; e; e = e.nextSibling)
83 me.enterLieSubitem(me, o, s, e.(fontScaleField), e.Container_alpha);
89 SUPER(
Container).resizeNotify(me, relOrigin, relSize, absOrigin, absSize);
vector(float skel, float bonenum) _skel_get_boneabs_hidden
◆ Container_saveFocus()
Definition at line 323 of file container.qc.
325 me.savedFocus = me.focusedChild;
327 if (me.focusedChild.instanceOfContainer) me.focusedChild.saveFocus(me.focusedChild);
◆ Container_setAlphaOf()
◆ Container_setFocus()
Definition at line 289 of file container.qc.
References error(), NULL, and other.
Referenced by m_activate_window(), and XonoticScrollPanel::XonoticScrollPanel ::setFocus().
291 if (me.focusedChild ==
other)
return;
295 me.focusedChild.focused = 0;
296 me.focusedChild.focusLeave(me.focusedChild);
297 me.focusedChild =
NULL;
302 if (!me.focused)
error(
"Trying to set focus in a non-focused control!");
306 me.focusedChild = me.savedFocus;
307 me.savedFocus =
NULL;
308 me.focusedChild.focused = 1;
309 me.focusedChild.focusEnter(me.focusedChild);
311 if (me.focusedChild.instanceOfContainer)
312 me.focusedChild.setFocus(me.focusedChild, me.focusedChild.savedFocus);
316 me.focusedChild =
other;
317 me.focusedChild.focused = 1;
318 me.focusedChild.focusEnter(me.focusedChild);
◆ Container_showNotify()
Definition at line 29 of file container.qc.
References entity().
34 for (e = me.firstChild; e; e = e.nextSibling)
35 if (e.Container_alpha > 0) e.showNotify(e);