10 other.selectedChild = other.focusedChild;
11 other.setFocus(other,
NULL);
12 other.animationState = 3;
24 for (e = me.firstChild; e; e = e.nextSibling)
26 e.Nexposee_smallOrigin = (e.Nexposee_initialOrigin - e.Nexposee_scaleCenter) * scale + e.Nexposee_scaleCenter;
27 e.Nexposee_smallSize = e.Nexposee_initialSize * scale;
28 if (e.Nexposee_align.x > 0) e.Nexposee_smallOrigin_x = 1 - e.Nexposee_align.x *
scale;
29 if (e.Nexposee_align.x < 0) e.Nexposee_smallOrigin_x = -e.Nexposee_smallSize.x + e.Nexposee_align.x *
scale;
30 if (e.Nexposee_align.y > 0) e.Nexposee_smallOrigin_y = 1 - e.Nexposee_align.y *
scale;
31 if (e.Nexposee_align.y < 0) e.Nexposee_smallOrigin_y = -e.Nexposee_smallSize.y + e.Nexposee_align.y *
scale;
43 vector emins, emaxs, e2mins, e2maxs;
45 for (scale = 0.7; ; scale *= 0.99)
49 for (e = me.firstChild; e; e = e.nextSibling)
51 emins = e.Nexposee_smallOrigin;
52 emaxs = emins + e.Nexposee_smallSize;
53 for (e2 = e.nextSibling; e2; e2 = e2.nextSibling)
55 e2mins = e2.Nexposee_smallOrigin;
56 e2maxs = e2mins + e2.Nexposee_smallSize;
63 if ((e2mins.x - emaxs.x) * (emins.x - e2maxs.x) > 0)
64 if ((e2mins.y - emaxs.y) * (emins.y - e2maxs.y) > 0)
80 other.Nexposee_scaleCenter = scalecenter;
81 other.Nexposee_smallAlpha = a0;
82 me.setAlphaOf(me, other, a0);
83 other.Nexposee_mediumAlpha = a1;
94 if (me.animationState == -1) me.animationState = 0;
97 switch (me.animationState)
100 me.animationFactor = 0;
103 me.animationFactor += f;
104 if (me.animationFactor >= 1)
106 me.animationFactor = 1;
107 me.animationState = 2;
112 me.animationFactor = 1;
115 me.animationFactor -= f;
116 me.mouseFocusedChild = me.itemFromPoint(me, me.mousePosition);
117 if (me.animationFactor <= 0)
119 me.animationFactor = 0;
120 me.animationState = 0;
121 me.selectedChild = me.mouseFocusedChild;
127 for (e = me.firstChild; e; e = e.nextSibling)
129 if (e == me.selectedChild)
131 e.Container_origin = e.Nexposee_smallOrigin * (1 - me.animationFactor) + e.Nexposee_initialOrigin * me.animationFactor;
132 e.Container_size = e.Nexposee_smallSize * (1 - me.animationFactor) + e.Nexposee_initialSize * me.animationFactor;
133 e.Nexposee_animationFactor = me.animationFactor;
134 a0 = e.Nexposee_mediumAlpha;
135 if (me.animationState == 3)
136 if (e != me.mouseFocusedChild) a0 = e.Nexposee_smallAlpha;
137 a = a0 * (1 - me.animationFactor) + me.animationFactor;
142 e.Container_origin = e.Nexposee_smallOrigin;
143 e.Container_size = e.Nexposee_smallSize;
144 e.Nexposee_animationFactor = 0;
145 a = e.Nexposee_smallAlpha * (1 - me.animationFactor);
147 me.setAlphaOf(me, e, e.Container_alpha * (1 - f) + a * f);
150 e.Container_fontscale_x = fs.x * e.Nexposee_initialFontScale.x;
151 e.Container_fontscale_y = fs.y * e.Nexposee_initialFontScale.y;
159 if (this.animationState == 0)
161 this.mouseFocusedChild =
NULL;
163 if (this.mouseFocusedChild)
166 this.animationState = 1;
175 else if (this.animationState == 2)
180 this.animationState = 3;
190 if (me.animationState == 2)
return SUPER(
Nexposee).mouseRelease(me, pos);
196 if (me.animationState == 2)
return SUPER(
Nexposee).mouseDrag(me, pos);
203 me.mousePosition = pos;
204 e = me.mouseFocusedChild;
205 me.mouseFocusedChild = me.itemFromPoint(me, pos);
206 if (me.animationState == 2)
return SUPER(
Nexposee).mouseMove(me, pos);
207 if (me.animationState == 0)
209 if (me.mouseFocusedChild)
210 if (me.mouseFocusedChild != e || me.mouseFocusedChild != me.selectedChild) me.selectedChild = me.mouseFocusedChild;
218 if (me.animationState == 2)
return SUPER(
Nexposee).keyUp(me, scan, ascii, shift);
224 float nexposeeKey = 0;
225 if (me.animationState == 2)
226 if (
SUPER(
Nexposee).keyDown(me, scan, ascii, shift))
return 1;
229 if (me.animationState == 0)
233 if (me.selectedChild) me.selectedChild = me.selectedChild.prevSibling;
234 if (!me.selectedChild) me.selectedChild = me.lastChild;
238 if (me.selectedChild) me.selectedChild = me.selectedChild.nextSibling;
239 if (!me.selectedChild) me.selectedChild = me.firstChild;
243 switch (me.animationState)
257 switch (me.animationState)
263 me.animationState = 1;
268 me.animationState = 3;
271 if (me.focusedChild) me.selectedChild = me.focusedChild;
272 if (!me.selectedChild) me.animationState = 0;
281 SUPER(
Nexposee).addItem(me, other, theOrigin, theSize, theAlpha);
282 other.Nexposee_initialFontScale = other.Container_fontscale;
283 other.Nexposee_initialSize = other.Container_size;
284 other.Nexposee_initialOrigin = other.Container_origin;
285 other.Nexposee_initialAlpha = other.Container_alpha;
286 if (other.Nexposee_initialFontScale ==
'0 0 0') other.Nexposee_initialFontScale =
'1 1 0';
291 if (me.animationState == 2)
SUPER(
Nexposee).setFocus(me, me.selectedChild);
296 other.Nexposee_align = theAlign;
void Nexposee_setNexposee(entity me, entity other, vector scalecenter, float a0, float a1)
void Nexposee_addItem(entity me, entity other, vector theOrigin, vector theSize, float theAlpha)
float Nexposee_mouseDrag(entity me, vector pos)
void Nexposee_calc(entity me)
float Nexposee_keyDown(entity me, float scan, float ascii, float shift)
#define METHOD(cname, name, prototype)
vector Nexposee_initialOrigin
vector Nexposee_initialSize
void Nexposee_focusEnter(entity me)
void Nexposee_draw(entity me)
void Nexposee_Calc_Scale(entity me, float scale)
void Nexposee_pullNexposee(entity me, entity other, vector theAlign)
vector Nexposee_initialFontScale
float Nexposee_keyUp(entity me, float scan, float ascii, float shift)
vector(float skel, float bonenum) _skel_get_boneabs_hidden
void ExposeeCloseButton_Click(entity button, entity other)
float Nexposee_mouseMove(entity me, vector pos)
void Nexposee_close(entity me)
float Nexposee_mouseRelease(entity me, vector pos)
void Nexposee_resizeNotify(entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize)