r2868 - in trunk/data/qcsrc: common menu-div0test menu-div0test/item menu-div0test/nexuiz

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Tue Oct 30 11:30:53 EDT 2007


Author: div0
Date: 2007-10-30 11:30:53 -0400 (Tue, 30 Oct 2007)
New Revision: 2868

Added:
   trunk/data/qcsrc/menu-div0test/nexuiz/nexposee.c
   trunk/data/qcsrc/menu-div0test/nexuiz/radiobutton.c
   trunk/data/qcsrc/menu-div0test/nexuiz/slider_picmip.c
   trunk/data/qcsrc/menu-div0test/nexuiz/util.qc
   trunk/data/qcsrc/menu-div0test/nexuiz/util.qh
Modified:
   trunk/data/qcsrc/common/util.qc
   trunk/data/qcsrc/common/util.qh
   trunk/data/qcsrc/menu-div0test/classes.c
   trunk/data/qcsrc/menu-div0test/item.c
   trunk/data/qcsrc/menu-div0test/item/button.c
   trunk/data/qcsrc/menu-div0test/item/checkbox.c
   trunk/data/qcsrc/menu-div0test/item/container.c
   trunk/data/qcsrc/menu-div0test/item/dialog.c
   trunk/data/qcsrc/menu-div0test/item/modalcontroller.c
   trunk/data/qcsrc/menu-div0test/item/nexposee.c
   trunk/data/qcsrc/menu-div0test/item/radiobutton.c
   trunk/data/qcsrc/menu-div0test/item/slider.c
   trunk/data/qcsrc/menu-div0test/menu.qc
   trunk/data/qcsrc/menu-div0test/nexuiz/checkbox.c
   trunk/data/qcsrc/menu-div0test/nexuiz/commandbutton.c
   trunk/data/qcsrc/menu-div0test/nexuiz/dialog.c
   trunk/data/qcsrc/menu-div0test/nexuiz/dialog_settings_video.c
   trunk/data/qcsrc/menu-div0test/nexuiz/dialog_teamselect.c
   trunk/data/qcsrc/menu-div0test/nexuiz/mainwindow.c
   trunk/data/qcsrc/menu-div0test/nexuiz/slider.c
   trunk/data/qcsrc/menu-div0test/nexuiz/slider_resolution.c
   trunk/data/qcsrc/menu-div0test/nexuiz/tab.c
   trunk/data/qcsrc/menu-div0test/progs.src
   trunk/data/qcsrc/menu-div0test/skin.qh
Log:
improved dialog system; actually handle cvars; put some stuff in video dialog


Modified: trunk/data/qcsrc/common/util.qc
===================================================================
--- trunk/data/qcsrc/common/util.qc	2007-10-30 10:53:46 UTC (rev 2867)
+++ trunk/data/qcsrc/common/util.qc	2007-10-30 15:30:53 UTC (rev 2868)
@@ -131,4 +131,9 @@
 	}
 }
 
-
+float median(float a, float b, float c)
+{
+	if(a < c)
+		return bound(a, b, c);
+	return bound(c, b, a);
+}

Modified: trunk/data/qcsrc/common/util.qh
===================================================================
--- trunk/data/qcsrc/common/util.qh	2007-10-30 10:53:46 UTC (rev 2867)
+++ trunk/data/qcsrc/common/util.qh	2007-10-30 15:30:53 UTC (rev 2868)
@@ -24,3 +24,5 @@
 // iterative depth-first search, with fields that go "up", "down left" and "right" in a tree
 // for each element, funcPre is called first, then funcPre and funcPost for all its children, and funcPost last
 void depthfirst(entity start, .entity up, .entity downleft, .entity right, void(entity, entity) funcPre, void(entity, entity) funcPost, entity pass);
+
+float median(float a, float b, float c);

Modified: trunk/data/qcsrc/menu-div0test/classes.c
===================================================================
--- trunk/data/qcsrc/menu-div0test/classes.c	2007-10-30 10:53:46 UTC (rev 2867)
+++ trunk/data/qcsrc/menu-div0test/classes.c	2007-10-30 15:30:53 UTC (rev 2868)
@@ -26,3 +26,6 @@
 #include "nexuiz/slider.c"
 #include "nexuiz/slider_resolution.c"
 #include "nexuiz/checkbox.c"
+#include "nexuiz/radiobutton.c"
+#include "nexuiz/slider_picmip.c"
+#include "nexuiz/nexposee.c"

Modified: trunk/data/qcsrc/menu-div0test/item/button.c
===================================================================
--- trunk/data/qcsrc/menu-div0test/item/button.c	2007-10-30 10:53:46 UTC (rev 2867)
+++ trunk/data/qcsrc/menu-div0test/item/button.c	2007-10-30 15:30:53 UTC (rev 2868)
@@ -2,7 +2,7 @@
 CLASS(Button) EXTENDS(Label)
 	METHOD(Button, configureButton, void(entity, string, float, string))
 	METHOD(Button, draw, void(entity))
-	METHOD(Button, open, void(entity))
+	METHOD(Button, showNotify, void(entity))
 	METHOD(Button, resizeNotify, void(entity, vector, vector, vector, vector))
 	METHOD(Button, keyDown, float(entity, float, float, float))
 	METHOD(Button, mousePress, float(entity, vector))
@@ -70,7 +70,7 @@
 	}
 	return 1;
 }
-void openButton(entity me)
+void showNotifyButton(entity me)
 {
 	me.focusable = !me.disabled;
 }

Modified: trunk/data/qcsrc/menu-div0test/item/checkbox.c
===================================================================
--- trunk/data/qcsrc/menu-div0test/item/checkbox.c	2007-10-30 10:53:46 UTC (rev 2867)
+++ trunk/data/qcsrc/menu-div0test/item/checkbox.c	2007-10-30 15:30:53 UTC (rev 2868)
@@ -5,6 +5,7 @@
 	METHOD(CheckBox, resizeNotify, void(entity, vector, vector, vector, vector))
 	METHOD(CheckBox, draw, void(entity))
 	METHOD(CheckBox, toString, string(entity))
+	METHOD(CheckBox, setChecked, void(entity, float))
 	ATTRIB(CheckBox, checked, float, 0)
 	ATTRIB(CheckBox, onClick, void(entity, entity), CheckBox_Click)
 	ATTRIB(CheckBox, srcMulti, float, 0)
@@ -12,9 +13,13 @@
 #endif
 
 #ifdef IMPLEMENTATION
+void setCheckedCheckBox(entity me, float val)
+{
+	me.checked = val;
+}
 void CheckBox_Click(entity me, entity other)
 {
-	me.checked = !me.checked;
+	me.setChecked(me, !me.checked);
 }
 string toStringCheckBox(entity me)
 {

Modified: trunk/data/qcsrc/menu-div0test/item/container.c
===================================================================
--- trunk/data/qcsrc/menu-div0test/item/container.c	2007-10-30 10:53:46 UTC (rev 2867)
+++ trunk/data/qcsrc/menu-div0test/item/container.c	2007-10-30 15:30:53 UTC (rev 2868)
@@ -15,12 +15,15 @@
 	METHOD(Container, moveItemAfter, void(entity, entity, entity))
 	METHOD(Container, removeItem, void(entity, entity))
 	METHOD(Container, setFocus, void(entity, entity))
+	METHOD(Container, setAlphaOf, void(entity, entity, float))
 	METHOD(Container, itemFromPoint, entity(entity, vector))
-	METHOD(Container, open, void(entity))
+	METHOD(Container, showNotify, void(entity))
+	METHOD(Container, hideNotify, void(entity))
 	ATTRIB(Container, focusable, float, 0)
 	ATTRIB(Container, firstChild, entity, NULL)
 	ATTRIB(Container, lastChild, entity, NULL)
 	ATTRIB(Container, focusedChild, entity, NULL)
+	ATTRIB(Container, shown, float, 0)
 ENDCLASS(Container)
 .entity nextSibling;
 .entity prevSibling;
@@ -31,13 +34,43 @@
 .vector Container_size;
 .float Container_alpha;
 
-void openContainer(entity me)
+void showNotifyContainer(entity me)
 {
 	entity e;
+	if(me.shown)
+		return;
+	me.shown = 1;
 	for(e = me.firstChild; e; e = e.nextSibling)
-		e.open(e);
+		if(e.Container_alpha > 0)
+			e.showNotify(e);
 }
 
+void hideNotifyContainer(entity me)
+{
+	entity e;
+	if(!me.shown)
+		return;
+	me.shown = 0;
+	for(e = me.firstChild; e; e = e.nextSibling)
+		if(e.Container_alpha > 0)
+			e.hideNotify(e);
+}
+
+void setAlphaOfContainer(entity me, entity other, float theAlpha)
+{
+	if(theAlpha <= 0)
+	{
+		if(other.Container_alpha > 0)
+			other.hideNotify(other);
+	}
+	else // value > 0
+	{
+		if(other.Container_alpha <= 0)
+			other.showNotify(other);
+	}
+	other.Container_alpha = theAlpha;
+}
+
 void resizeNotifyLieContainer(entity me, vector relOrigin, vector relSize, vector absOrigin, vector absSize, .vector originField, .vector sizeField)
 {
 	entity e;
@@ -169,10 +202,23 @@
 	if(other.focusable)
 		me.focusable += 1;
 
+	if(theSize_x > 1)
+	{
+		theOrigin_x -= 0.5 * (theSize_x - 1);
+		theSize_x = 1;
+	}
+	if(theSize_y > 1)
+	{
+		theOrigin_y -= 0.5 * (theSize_y - 1);
+		theSize_y = 1;
+	}
+	theOrigin_x = bound(0, theOrigin_x, 1 - theSize_x);
+	theOrigin_y = bound(0, theOrigin_y, 1 - theSize_y);
+
 	other.parent = me;
 	other.Container_origin = theOrigin;
 	other.Container_size = theSize;
-	other.Container_alpha = theAlpha;
+	me.setAlphaOf(me, other, theAlpha);
 
 	entity f, l;
 	f = me.firstChild;

Modified: trunk/data/qcsrc/menu-div0test/item/dialog.c
===================================================================
--- trunk/data/qcsrc/menu-div0test/item/dialog.c	2007-10-30 10:53:46 UTC (rev 2867)
+++ trunk/data/qcsrc/menu-div0test/item/dialog.c	2007-10-30 15:30:53 UTC (rev 2868)
@@ -23,6 +23,7 @@
 
 	METHOD(Dialog, TD, void(entity, float, float, entity))
 	METHOD(Dialog, TDempty, void(entity, float))
+	METHOD(Dialog, setFirstColumn, void(entity, float))
 	METHOD(Dialog, TR, void(entity))
 	METHOD(Dialog, gotoXY, void(entity, float, float))
 
@@ -34,6 +35,7 @@
 	ATTRIB(Dialog, itemSpacing, vector, '0 0 0')
 	ATTRIB(Dialog, currentRow, float, 0)
 	ATTRIB(Dialog, currentColumn, float, 0)
+	ATTRIB(Dialog, firstColumn, float, 0)
 
 	// to be customized
 	ATTRIB(Dialog, closable, float, 1)
@@ -87,7 +89,7 @@
 void TRDialog(entity me)
 {
 	me.currentRow += 1;
-	me.currentColumn = 0;
+	me.currentColumn = me.firstColumn;
 }
 
 void TDDialog(entity me, float rowspan, float colspan, entity e)
@@ -96,6 +98,11 @@
 	me.currentColumn += colspan;
 }
 
+void setFirstColumnDialog(entity me, float col)
+{
+	me.firstColumn = col;
+}
+
 void TDemptyDialog(entity me, float colspan)
 {
 	me.currentColumn += colspan;

Modified: trunk/data/qcsrc/menu-div0test/item/modalcontroller.c
===================================================================
--- trunk/data/qcsrc/menu-div0test/item/modalcontroller.c	2007-10-30 10:53:46 UTC (rev 2867)
+++ trunk/data/qcsrc/menu-div0test/item/modalcontroller.c	2007-10-30 15:30:53 UTC (rev 2868)
@@ -2,7 +2,6 @@
 CLASS(ModalController) EXTENDS(Container)
 	METHOD(ModalController, resizeNotify, void(entity, vector, vector, vector, vector))
 	METHOD(ModalController, draw, void(entity))
-	METHOD(ModalController, open, void(entity))
 	METHOD(ModalController, addItem, void(entity, entity, vector, vector, float))
 	METHOD(ModalController, showChild, void(entity, entity, vector, vector, float))
 	METHOD(ModalController, hideChild, void(entity, entity, float))
@@ -126,11 +125,6 @@
 		other.ModalController_factor = 1;
 }
 
-void openModalController(entity me)
-{
-	// just swallow the event; will handle opening another way
-}
-
 void drawModalController(entity me)
 {
 	entity e;
@@ -200,13 +194,13 @@
 		{
 			e.Container_origin = targetOrigin;
 			e.Container_size = targetSize;
-			e.Container_alpha = targetAlpha;
+			me.setAlphaOf(me, e, targetAlpha);
 		}
 		else
 		{
 			e.Container_origin = e.Container_origin * prevFactor + targetOrigin * targetFactor;
 			e.Container_size   = e.Container_size   * prevFactor + targetSize   * targetFactor;
-			e.Container_alpha  = e.Container_alpha  * prevFactor + targetAlpha  * targetFactor;
+			me.setAlphaOf(me, e, e.Container_alpha  * prevFactor + targetAlpha  * targetFactor);
 		}
 		// assume: o == to * f_prev + X * (1 - f_prev)
 		// make:   o' = to * f  + X * (1 - f)
@@ -238,12 +232,10 @@
 
 void addItemModalController(entity me, entity other, vector theOrigin, vector theSize, float theAlpha)
 {
-	other.ModalController_initialSize = theSize;
-	other.ModalController_initialOrigin = theOrigin;
-	other.ModalController_initialAlpha = theAlpha;
-	addItemContainer(me, other, theOrigin, theSize, theAlpha);
-	if(other != me.firstChild)
-		other.Container_alpha = 0;
+	addItemContainer(me, other, theOrigin, theSize, (other == me.firstChild) ? theAlpha : 0);
+	other.ModalController_initialSize = other.Container_size;
+	other.ModalController_initialOrigin = other.Container_origin;
+	other.ModalController_initialAlpha = theAlpha; // hope Container never modifies this
 }
 
 void showChildModalController(entity me, entity other, vector theOrigin, vector theSize, float skipAnimation)
@@ -254,7 +246,6 @@
 		other.ModalController_buttonOrigin = globalToBox(theOrigin, me.origin, me.size);
 		other.ModalController_buttonSize = globalToBoxSize(theSize, me.size);
 		me.switchState(me, other, 1, skipAnimation);
-		other.open(other);
 	} // zoom in from button (factor increases)
 }
 

Modified: trunk/data/qcsrc/menu-div0test/item/nexposee.c
===================================================================
--- trunk/data/qcsrc/menu-div0test/item/nexposee.c	2007-10-30 10:53:46 UTC (rev 2867)
+++ trunk/data/qcsrc/menu-div0test/item/nexposee.c	2007-10-30 15:30:53 UTC (rev 2868)
@@ -9,6 +9,7 @@
 	METHOD(Nexposee, mouseDrag, float(entity, vector))
 	METHOD(Nexposee, resizeNotify, void(entity, vector, vector, vector, vector))
 	METHOD(Nexposee, focusEnter, void(entity))
+	METHOD(Nexposee, close, void(entity))
 
 	ATTRIB(Nexposee, animationState, float, -1)
 	ATTRIB(Nexposee, animationFactor, float, 0)
@@ -42,6 +43,11 @@
 .float Nexposee_mediumAlpha;
 .vector Nexposee_scaleCenter;
 
+void closeNexposee(entity me)
+{
+	// user must override this
+}
+
 void ExposeeCloseButton_Click(entity button, entity other)
 {
 	other.selectedChild = other.focusedChild;
@@ -109,7 +115,8 @@
 void setNexposeeNexposee(entity me, entity other, vector scalecenter, float a0, float a1)
 {
 	other.Nexposee_scaleCenter = scalecenter;
-	other.Nexposee_smallAlpha = other.Container_alpha = a0;
+	other.Nexposee_smallAlpha = a0;
+	me.setAlphaOf(me, other, a0);
 	other.Nexposee_mediumAlpha = a1;
 }
 
@@ -178,7 +185,7 @@
 			e.Container_size = e.Nexposee_smallSize;
 			a = e.Nexposee_smallAlpha * (1 - me.animationFactor);
 		}
-		e.Container_alpha = e.Container_alpha * (1 - f) + a * f;
+		me.setAlphaOf(me, e, e.Container_alpha * (1 - f) + a * f);
 	}
 
 	drawContainer(me);
@@ -190,11 +197,13 @@
 	{
 		me.mouseFocusedChild = NULL;
 		mouseMoveNexposee(me, pos);
-		if(me.selectedChild)
+		if(me.mouseFocusedChild)
 		{
 			me.animationState = 1;
 			setFocusContainer(me, NULL);
 		}
+		else
+			me.close(me);
 		return 1;
 	}
 	else if(me.animationState == 2)
@@ -310,10 +319,10 @@
 
 void addItemNexposee(entity me, entity other, vector theOrigin, vector theSize, float theAlpha)
 {
-	other.Nexposee_initialSize = theSize;
-	other.Nexposee_initialOrigin = theOrigin;
-	other.Nexposee_initialAlpha = theAlpha;
 	addItemContainer(me, other, theOrigin, theSize, theAlpha);
+	other.Nexposee_initialSize = other.Container_size;
+	other.Nexposee_initialOrigin = other.Container_origin;
+	other.Nexposee_initialAlpha = other.Container_alpha;
 }
 
 void focusEnterNexposee(entity me)

Modified: trunk/data/qcsrc/menu-div0test/item/radiobutton.c
===================================================================
--- trunk/data/qcsrc/menu-div0test/item/radiobutton.c	2007-10-30 10:53:46 UTC (rev 2867)
+++ trunk/data/qcsrc/menu-div0test/item/radiobutton.c	2007-10-30 15:30:53 UTC (rev 2868)
@@ -22,7 +22,7 @@
 	if(me.checked)
 	{
 		if(me.allowDeselect)
-			me.checked = 0;
+			me.setChecked(me, 0);
 	}
 	else
 	{
@@ -30,8 +30,8 @@
 		for(e = me.parent.firstChild; e; e = e.nextSibling)
 			if(e != me)
 				if(e.group == me.group)
-					e.checked = 0;
-		me.checked = 1;
+					e.setChecked(e, 0);
+		me.setChecked(me, 1);
 	}
 }
 #endif

Modified: trunk/data/qcsrc/menu-div0test/item/slider.c
===================================================================
--- trunk/data/qcsrc/menu-div0test/item/slider.c	2007-10-30 10:53:46 UTC (rev 2867)
+++ trunk/data/qcsrc/menu-div0test/item/slider.c	2007-10-30 15:30:53 UTC (rev 2868)
@@ -10,6 +10,7 @@
 	METHOD(Slider, mouseRelease, float(entity, vector))
 	METHOD(Slider, valueToText, string(entity, float))
 	METHOD(Slider, toString, string(entity))
+	METHOD(Slider, setValue, void(entity, float))
 	ATTRIB(Slider, src, string, "")
 	ATTRIB(Slider, focusable, float, 1)
 	ATTRIB(Slider, value, float, 0)
@@ -27,6 +28,10 @@
 #endif
 
 #ifdef IMPLEMENTATION
+void setValueSlider(entity me, float val)
+{
+	me.value = val;
+}
 string toStringSlider(entity me)
 {
 	return strcat(ftos(me.value), " (", me.valueToText(me, me.value), ")");
@@ -57,32 +62,57 @@
 }
 float keyDownSlider(entity me, float key, float ascii, float shift)
 {
+	float inRange;
+	inRange = (me.value == median(me.valueMin, me.value, me.valueMax));
 	if(key == K_LEFTARROW)
 	{
-		me.value = bound(me.valueMin, me.value - me.valueKeyStep, me.valueMax);
+		if(inRange)
+			me.setValue(me, median(me.valueMin, me.value - me.valueKeyStep, me.valueMax));
+		else
+			me.setValue(me, me.valueMax);
 		return 1;
 	}
 	if(key == K_RIGHTARROW)
 	{
-		me.value = bound(me.valueMin, me.value + me.valueKeyStep, me.valueMax);
+		if(inRange)
+			me.setValue(me, median(me.valueMin, me.value + me.valueKeyStep, me.valueMax));
+		else
+			me.setValue(me, me.valueMin);
 		return 1;
 	}
 	if(key == K_PGUP)
 	{
-		me.value = bound(me.valueMin, me.value - me.valuePageStep, me.valueMax);
+		if(inRange)
+			me.setValue(me, median(me.valueMin, me.value - me.valuePageStep, me.valueMax));
+		else
+			me.setValue(me, me.valueMax);
 		return 1;
 	}
 	if(key == K_PGDN)
 	{
-		me.value = bound(me.valueMin, me.value + me.valuePageStep, me.valueMax);
+		if(inRange)
+			me.setValue(me, median(me.valueMin, me.value + me.valuePageStep, me.valueMax));
+		else
+			me.setValue(me, me.valueMin);
 		return 1;
 	}
+	if(key == K_HOME)
+	{
+		me.setValue(me, me.valueMin);
+		return 1;
+	}
+	if(key == K_END)
+	{
+		me.setValue(me, me.valueMax);
+		return 1;
+	}
 	// TODO more keys
 	return 0;
 }
 float mouseDragSlider(entity me, vector pos)
 {
 	float hit;
+	float v;
 	if(me.pressed)
 	{
 		hit = 1;
@@ -92,12 +122,13 @@
 		if(pos_y >= 1) hit = 0;
 		if(hit)
 		{
-			me.value = bound(0, (pos_x - me.pressOffset - 0.5 * me.controlWidth) / (1 - me.valueSpace - me.controlWidth), 1) * (me.valueMax - me.valueMin) + me.valueMin;
+			v = median(0, (pos_x - me.pressOffset - 0.5 * me.controlWidth) / (1 - me.valueSpace - me.controlWidth), 1) * (me.valueMax - me.valueMin) + me.valueMin;
 			if(me.valueStep)
-				me.value = floor(0.5 + me.value / me.valueStep) * me.valueStep;
+				v = floor(0.5 + v / me.valueStep) * me.valueStep;
+			me.setValue(me, v);
 		}
 		else
-			me.value = me.previousValue;
+			me.setValue(me, me.previousValue);
 	}
 	return 1;
 }
@@ -134,7 +165,7 @@
 {
 	float controlLeft;
 	draw_ButtonPicture('0 0 0', strcat(me.src, "_s"), eX * (1 - me.valueSpace) + eY, '1 1 1', 1);
-	if(me.value >= me.valueMin && me.value <= me.valueMax)
+	if(me.value == median(me.valueMin, me.value, me.valueMax))
 	{
 		controlLeft = (me.value - me.valueMin) / (me.valueMax - me.valueMin) * (1 - me.valueSpace - me.controlWidth);
 		if(me.pressed)

Modified: trunk/data/qcsrc/menu-div0test/item.c
===================================================================
--- trunk/data/qcsrc/menu-div0test/item.c	2007-10-30 10:53:46 UTC (rev 2867)
+++ trunk/data/qcsrc/menu-div0test/item.c	2007-10-30 15:30:53 UTC (rev 2868)
@@ -11,7 +11,8 @@
 	METHOD(Item, focusLeave, void(entity))
 	METHOD(Item, resizeNotify, void(entity, vector, vector, vector, vector))
 	METHOD(Item, relinquishFocus, void(entity))
-	METHOD(Item, open, void(entity))
+	METHOD(Item, showNotify, void(entity))
+	METHOD(Item, hideNotify, void(entity))
 	METHOD(Item, toString, string(entity))
 	ATTRIB(Item, focused, float, 0)
 	ATTRIB(Item, focusable, float, 0)
@@ -35,10 +36,14 @@
 {
 }
 
-void openItem(entity me)
+void showNotifyItem(entity me)
 {
 }
 
+void hideNotifyItem(entity me)
+{
+}
+
 float keyDownItem(entity me, float scan, float ascii, float shift)
 {
 	return 0; // unhandled

Modified: trunk/data/qcsrc/menu-div0test/menu.qc
===================================================================
--- trunk/data/qcsrc/menu-div0test/menu.qc	2007-10-30 10:53:46 UTC (rev 2867)
+++ trunk/data/qcsrc/menu-div0test/menu.qc	2007-10-30 15:30:53 UTC (rev 2868)
@@ -147,6 +147,11 @@
 void() m_display =
 {
 	Menu_Active = true;
+
+	if(mouseButtonsPressed)
+		main.mouseRelease(main, menuMousePos);
+	mouseButtonsPressed = 0;
+
 	setkeydest(KEY_MENU);
 	setmousetarget(MT_MENU);
 

Modified: trunk/data/qcsrc/menu-div0test/nexuiz/checkbox.c
===================================================================
--- trunk/data/qcsrc/menu-div0test/nexuiz/checkbox.c	2007-10-30 10:53:46 UTC (rev 2867)
+++ trunk/data/qcsrc/menu-div0test/nexuiz/checkbox.c	2007-10-30 15:30:53 UTC (rev 2868)
@@ -1,6 +1,7 @@
 #ifdef INTERFACE
 CLASS(NexuizCheckBox) EXTENDS(CheckBox)
 	METHOD(NexuizCheckBox, configureNexuizCheckBox, void(entity, float, string, string))
+	METHOD(NexuizCheckBox, setChecked, void(entity, float))
 	ATTRIB(NexuizCheckBox, fontSize, float, SKINFONTSIZE_NORMAL)
 	ATTRIB(NexuizCheckBox, image, string, SKINGFX_CHECKBOX)
 	ATTRIB(NexuizCheckBox, inverted, float, 0)
@@ -31,12 +32,20 @@
 	}
 	me.configureCheckBox(me, theText, me.fontSize, me.image);
 }
+void setCheckedNexuizCheckBox(entity me, float val)
+{
+	if(val != me.checked)
+	{
+		me.checked = val;
+		me.saveCvars(me);
+	}
+}
 void loadCvarsNexuizCheckBox(entity me)
 {
 	me.checked = me.inverted - !!cvar(me.cvarName);
 }
 void saveCvarsNexuizCheckBox(entity me)
 {
-	cvar_set(me.cvarName, ftos(me.inverted - me.value));
+	cvar_set(me.cvarName, ftos(fabs(me.inverted - me.checked)));
 }
 #endif

Modified: trunk/data/qcsrc/menu-div0test/nexuiz/commandbutton.c
===================================================================
--- trunk/data/qcsrc/menu-div0test/nexuiz/commandbutton.c	2007-10-30 10:53:46 UTC (rev 2867)
+++ trunk/data/qcsrc/menu-div0test/nexuiz/commandbutton.c	2007-10-30 15:30:53 UTC (rev 2868)
@@ -1,3 +1,9 @@
+#ifndef COMMANDBUTTON_CLOSE
+# define COMMANDBUTTON_CLOSE 1
+# define COMMANDBUTTON_APPLY 2
+//# define COMMANDBUTTON_REVERT 4
+#endif
+
 #ifdef INTERFACE
 CLASS(NexuizCommandButton) EXTENDS(NexuizButton)
 	METHOD(NexuizCommandButton, configureNexuizCommandButton, void(entity, string, vector, string, float))
@@ -2,3 +8,3 @@
 	ATTRIB(NexuizCommandButton, onClickCommand, string, "")
-	ATTRIB(NexuizCommandButton, closes, float, 0)
+	ATTRIB(NexuizCommandButton, flags, float, 0)
 ENDCLASS(NexuizCommandButton)
@@ -8,28 +14,30 @@
 #endif
 
 #ifdef IMPLEMENTATION
-entity makeNexuizCommandButton(string theText, vector theColor, string theCommand, float closesMenu)
+entity makeNexuizCommandButton(string theText, vector theColor, string theCommand, float theFlags)
 {
 	entity me;
 	me = spawnNexuizCommandButton();
-	me.configureNexuizCommandButton(me, theText, theColor, theCommand, closesMenu);
+	me.configureNexuizCommandButton(me, theText, theColor, theCommand, theFlags);
 	return me;
 }
 
 void NexuizCommandButton_Click(entity me, entity other)
 {
+	//if(me.flags & COMMANDBUTTON_APPLY)
+	//	saveAllCvars(me.parent);
 	cmd("\n", me.onClickCommand, "\n");
-	if(me.closes)
-	{
+	//if(me.flags & COMMANDBUTTON_REVERT)
+	//	loadAllCvars(me.parent);
+	if(me.flags & COMMANDBUTTON_CLOSE)
 		m_goto("");
-	}
 }
 
-void configureNexuizCommandButtonNexuizCommandButton(entity me, string theText, vector theColor, string theCommand, float closesMenu)
+void configureNexuizCommandButtonNexuizCommandButton(entity me, string theText, vector theColor, string theCommand, float theFlags)
 {
 	me.configureNexuizButton(me, theText, theColor);
 	me.onClickCommand = theCommand;
-	me.closes = closesMenu;
+	me.flags = theFlags;
 	me.onClick = NexuizCommandButton_Click;
 	me.onClickEntity = me;
 }

Modified: trunk/data/qcsrc/menu-div0test/nexuiz/dialog.c
===================================================================
--- trunk/data/qcsrc/menu-div0test/nexuiz/dialog.c	2007-10-30 10:53:46 UTC (rev 2867)
+++ trunk/data/qcsrc/menu-div0test/nexuiz/dialog.c	2007-10-30 15:30:53 UTC (rev 2868)
@@ -10,7 +10,6 @@
 	ATTRIB(NexuizDialog, rows, float, 3)
 	ATTRIB(NexuizDialog, columns, float, 2)
 	*/
-
 	ATTRIB(NexuizDialog, marginTop, float, SKINMARGIN_TOP) // pixels
 	ATTRIB(NexuizDialog, marginBottom, float, SKINMARGIN_TOP) // pixels
 	ATTRIB(NexuizDialog, marginLeft, float, SKINMARGIN_LEFT) // pixels

Modified: trunk/data/qcsrc/menu-div0test/nexuiz/dialog_settings_video.c
===================================================================
--- trunk/data/qcsrc/menu-div0test/nexuiz/dialog_settings_video.c	2007-10-30 10:53:46 UTC (rev 2867)
+++ trunk/data/qcsrc/menu-div0test/nexuiz/dialog_settings_video.c	2007-10-30 15:30:53 UTC (rev 2868)
@@ -4,7 +4,7 @@
 	ATTRIB(NexuizVideoSettingsTab, title, string, "Settings")
 	ATTRIB(NexuizVideoSettingsTab, intendedWidth, float, 0.9)
 	ATTRIB(NexuizVideoSettingsTab, rows, float, 15)
-	ATTRIB(NexuizVideoSettingsTab, columns, float, 7)
+	ATTRIB(NexuizVideoSettingsTab, columns, float, 6.5)
 ENDCLASS(NexuizVideoSettingsTab)
 entity makeNexuizVideoSettingsTab();
 #endif
@@ -23,11 +23,57 @@
 		me.TD(me, 1, 1, makeNexuizTextLabel(0, "Resolution:"));
 		me.TD(me, 1, 2, makeNexuizResolutionSlider());
 	me.TR(me);
-		me.TD(me, 1, 3, makeNexuizCheckBox(0, "vid_fullscreen", "Full screen"));
+		me.TD(me, 1, 1, makeNexuizTextLabel(0, "Color depth:"));
+		me.TD(me, 1, 2, makeNexuizSlider(16, 32, 16, "vid_bitsperpixel"));
 	me.TR(me);
-		me.TD(me, 1, 3, makeNexuizCheckBox(0, "vid_vsync", "Vertical synchronization"));
+		me.TD(me, 1, 1, makeNexuizCheckBox(0, "vid_fullscreen", "Full screen"));
+		me.TD(me, 1, 2, makeNexuizCheckBox(0, "vid_vsync", "Vertical synchronization"));
+	me.TR(me);
+	me.TR(me);
+		me.TD(me, 1, 1, makeNexuizTextLabel(0, "Anisotropy:"));
+		me.TD(me, 1, 0.4, makeNexuizRadioButton(1, "gl_texture_anisotropy", "1", "Off"));
+		me.TD(me, 1, 0.4, makeNexuizRadioButton(1, "gl_texture_anisotropy", "2", "2x"));
+		me.TD(me, 1, 0.4, makeNexuizRadioButton(1, "gl_texture_anisotropy", "4", "4x"));
+		me.TD(me, 1, 0.4, makeNexuizRadioButton(1, "gl_texture_anisotropy", "8", "8x"));
+		me.TD(me, 1, 0.4, makeNexuizRadioButton(1, "gl_texture_anisotropy", "16", "16x"));
+	me.TR(me);
+		me.TD(me, 1, 1, makeNexuizTextLabel(0, "Texture quality:"));
+		me.TD(me, 1, 2, makeNexuizPicmipSlider());
+	me.TR(me);
+		me.TDempty(me, 0.2);
+		me.TD(me, 1, 2.8, makeNexuizCheckBox(1, "r_picmipworld", "Reduce model texture quality only"));
+	me.TR(me);
+	me.TR(me);
+		me.TD(me, 1, 3, makeNexuizCheckBox(0, "r_glsl", "Use OpenGL 2.0 shaders (GLSL)"));
+	me.TR(me);
+		me.TD(me, 1, 3, makeNexuizCheckBox(0, "gl_vbo", "Use Vertex Buffer Objects (VBO)"));
+	me.TR(me);
+	me.TR(me);
+		me.TD(me, 1, 3, makeNexuizCheckBox(0, "showfps", "Show frames per second"));
 
+	me.gotoXY(me, -1, 0);
+	me.setFirstColumn(me, 3.5);
+	me.TR(me);
+		me.TD(me, 1, 1, makeNexuizTextLabel(0, "Brightness:"));
+		me.TD(me, 1, 2, makeNexuizSlider(0.0, 0.5, 0.02, "v_brightness"));
+	me.TR(me);
+		me.TD(me, 1, 1, makeNexuizTextLabel(0, "Contrast:"));
+		me.TD(me, 1, 2, makeNexuizSlider(1.0, 3.0, 0.05, "v_contrast"));
+	me.TR(me);
+		me.TD(me, 1, 1, makeNexuizCheckBox(0, "v_hwgamma", "HW Gamma:"));
+		me.TD(me, 1, 2, makeNexuizSlider(0.5, 2.0, 0.05, "v_gamma"));
+	me.TR(me);
+	me.TR(me);
+		me.TD(me, 1, 1, makeNexuizTextLabel(0, "Ambient lighting:"));
+		me.TD(me, 1, 2, makeNexuizSlider(0, 20.0, 1.0, "r_ambient"));
+	me.TR(me);
+		me.TD(me, 1, 1, makeNexuizTextLabel(0, "Scene brightness:"));
+		me.TD(me, 1, 2, makeNexuizSlider(0.5, 2.0, 0.05, "r_hdr_scenebrightness"));
+	me.TR(me);
+		me.TD(me, 1, 1, makeNexuizTextLabel(0, "Contrast boost:"));
+		me.TD(me, 1, 2, makeNexuizSlider(1.0, 5.0, 0.1, "r_glsl_contrastboost"));
+
 	me.gotoXY(me, me.rows - 1, 0);
-		me.TD(me, 1, me.columns, makeNexuizCommandButton("Apply now", '0 0 0', "vid_restart", 0));
+		me.TD(me, 1, me.columns, makeNexuizCommandButton("Apply immediately", '0 0 0', "vid_restart", COMMANDBUTTON_APPLY));
 }
 #endif

Modified: trunk/data/qcsrc/menu-div0test/nexuiz/dialog_teamselect.c
===================================================================
--- trunk/data/qcsrc/menu-div0test/nexuiz/dialog_teamselect.c	2007-10-30 10:53:46 UTC (rev 2867)
+++ trunk/data/qcsrc/menu-div0test/nexuiz/dialog_teamselect.c	2007-10-30 15:30:53 UTC (rev 2868)
@@ -1,7 +1,7 @@
 #ifdef INTERFACE
 CLASS(NexuizTeamSelectDialog) EXTENDS(NexuizDialog)
 	METHOD(NexuizTeamSelectDialog, fill, void(entity)) // to be overridden by user to fill the dialog with controls
-	METHOD(NexuizTeamSelectDialog, open, void(entity))
+	METHOD(NexuizTeamSelectDialog, showNotify, void(entity))
 	ATTRIB(NexuizTeamSelectDialog, title, string, "Team Selection") // ;)
 	ATTRIB(NexuizTeamSelectDialog, color, vector, '1 1 1')
 	ATTRIB(NexuizTeamSelectDialog, intendedWidth, float, 0.4)
@@ -23,7 +23,7 @@
 	return b;
 }
 
-void openNexuizTeamSelectDialog(entity me)
+void showNotifyNexuizTeamSelectDialog(entity me)
 {
 	float teams, nTeams;
 	teams = cvar("_teams_available");

Modified: trunk/data/qcsrc/menu-div0test/nexuiz/mainwindow.c
===================================================================
--- trunk/data/qcsrc/menu-div0test/nexuiz/mainwindow.c	2007-10-30 10:53:46 UTC (rev 2867)
+++ trunk/data/qcsrc/menu-div0test/nexuiz/mainwindow.c	2007-10-30 15:30:53 UTC (rev 2868)
@@ -18,7 +18,7 @@
 {
 	entity dlg, n, i, b, c, mc, t1, t2, t3, cb;
 
-	n = spawnNexposee();
+	n = spawnNexuizNexposee();
 	me.addItem(me, n, '0 0 0', '1 1 0', 1);
 
 	dlg = spawnInputContainer();

Added: trunk/data/qcsrc/menu-div0test/nexuiz/nexposee.c
===================================================================
--- trunk/data/qcsrc/menu-div0test/nexuiz/nexposee.c	                        (rev 0)
+++ trunk/data/qcsrc/menu-div0test/nexuiz/nexposee.c	2007-10-30 15:30:53 UTC (rev 2868)
@@ -0,0 +1,26 @@
+#ifdef INTERFACE
+CLASS(NexuizNexposee) EXTENDS(Nexposee)
+	METHOD(NexuizNexposee, configureNexuizNexposee, void(entity))
+	METHOD(NexuizNexposee, close, void(entity))
+ENDCLASS(NexuizNexposee)
+entity makeNexuizNexposee();
+#endif
+
+#ifdef IMPLEMENTATION
+entity makeNexuizNexposee()
+{
+	entity me;
+	me = spawnNexuizNexposee();
+	me.configureNexuizNexposee(me);
+	return me;
+}
+
+void configureNexuizNexposeeNexuizNexposee(entity me)
+{
+}
+
+void closeNexuizNexposee(entity me)
+{
+	m_goto(""); // hide
+}
+#endif

Added: trunk/data/qcsrc/menu-div0test/nexuiz/radiobutton.c
===================================================================
--- trunk/data/qcsrc/menu-div0test/nexuiz/radiobutton.c	                        (rev 0)
+++ trunk/data/qcsrc/menu-div0test/nexuiz/radiobutton.c	2007-10-30 15:30:53 UTC (rev 2868)
@@ -0,0 +1,51 @@
+#ifdef INTERFACE
+CLASS(NexuizRadioButton) EXTENDS(RadioButton)
+	METHOD(NexuizRadioButton, configureNexuizRadioButton, void(entity, float, string, string, string))
+	METHOD(NexuizRadioButton, setChecked, void(entity, float))
+	ATTRIB(NexuizRadioButton, fontSize, float, SKINFONTSIZE_NORMAL)
+	ATTRIB(NexuizRadioButton, image, string, SKINGFX_RADIOBUTTON)
+
+	ATTRIB(NexuizRadioButton, cvarName, string, string_null)
+	ATTRIB(NexuizRadioButton, cvarValue, string, string_null)
+	METHOD(NexuizRadioButton, loadCvars, void(entity))
+	METHOD(NexuizRadioButton, saveCvars, void(entity))
+ENDCLASS(NexuizRadioButton)
+entity makeNexuizRadioButton(float, string, string, string);
+#endif
+
+#ifdef IMPLEMENTATION
+entity makeNexuizRadioButton(float theGroup, string theCvar, string theValue, string theText)
+{
+	entity me;
+	me = spawnNexuizRadioButton();
+	me.configureNexuizRadioButton(me, theGroup, theCvar, theValue, theText);
+	return me;
+}
+void configureNexuizRadioButtonNexuizRadioButton(entity me, float theGroup, string theCvar, string theValue, string theText)
+{
+	if(theCvar != "")
+	{
+		me.cvarName = theCvar;
+		me.cvarValue = theValue;
+		me.loadCvars(me);
+	}
+	me.configureRadioButton(me, theText, me.fontSize, me.image, theGroup, 0);
+}
+void setCheckedNexuizRadioButton(entity me, float val)
+{
+	if(val != me.checked)
+	{
+		me.checked = val;
+		me.saveCvars(me);
+	}
+}
+void loadCvarsNexuizRadioButton(entity me)
+{
+	me.checked = (cvar_string(me.cvarName) == me.cvarValue);
+}
+void saveCvarsNexuizRadioButton(entity me)
+{
+	if(me.checked)
+		cvar_set(me.cvarName, me.cvarValue);
+}
+#endif

Modified: trunk/data/qcsrc/menu-div0test/nexuiz/slider.c
===================================================================
--- trunk/data/qcsrc/menu-div0test/nexuiz/slider.c	2007-10-30 10:53:46 UTC (rev 2867)
+++ trunk/data/qcsrc/menu-div0test/nexuiz/slider.c	2007-10-30 15:30:53 UTC (rev 2868)
@@ -1,6 +1,7 @@
 #ifdef INTERFACE
 CLASS(NexuizSlider) EXTENDS(Slider)
 	METHOD(NexuizSlider, configureNexuizSlider, void(entity, float, float, float, string))
+	METHOD(NexuizSlider, setValue, void(entity, float))
 	ATTRIB(NexuizSlider, fontSize, float, SKINFONTSIZE_NORMAL)
 	ATTRIB(NexuizSlider, valueSpace, float, SKINWIDTH_SLIDERTEXT)
 	ATTRIB(NexuizSlider, image, string, SKINGFX_SLIDER)
@@ -24,18 +25,26 @@
 {
 	float v, vk, vp;
 	v = theValueMin;
+	vk = theValueStep;
+	vp = theValueStep * 10;
+	while(fabs(vp) < fabs(theValueMax - theValueMin) / 40)
+		vp *= 10;
+	me.configureSliderVisuals(me, me.fontSize, me.valueSpace, me.image);
+	me.configureSliderValues(me, theValueMin, v, theValueMax, theValueStep, vk, vp);
 	if(theCvar != "")
 	{
 		me.cvarName = theCvar;
 		me.loadCvars(me);
 	}
-	vk = theValueStep;
-	vp = theValueStep * 10;
-	while(vp < (theValueMax - theValueMin) / 40)
-		vp *= 10;
-	me.configureSliderVisuals(me, me.fontSize, me.valueSpace, me.image);
-	me.configureSliderValues(me, theValueMin, v, theValueMax, theValueStep, vk, vp);
 }
+void setValueNexuizSlider(entity me, float val)
+{
+	if(val != me.value)
+	{
+		me.value = val;
+		me.saveCvars(me);
+	}
+}
 void loadCvarsNexuizSlider(entity me)
 {
 	me.value = cvar(me.cvarName);

Added: trunk/data/qcsrc/menu-div0test/nexuiz/slider_picmip.c
===================================================================
--- trunk/data/qcsrc/menu-div0test/nexuiz/slider_picmip.c	                        (rev 0)
+++ trunk/data/qcsrc/menu-div0test/nexuiz/slider_picmip.c	2007-10-30 15:30:53 UTC (rev 2868)
@@ -0,0 +1,33 @@
+#ifdef INTERFACE
+CLASS(NexuizPicmipSlider) EXTENDS(NexuizSlider)
+	METHOD(NexuizPicmipSlider, valueToText, string(entity, float))
+	METHOD(NexuizPicmipSlider, configureNexuizPicmipSlider, void(entity))
+ENDCLASS(NexuizPicmipSlider)
+entity makeNexuizPicmipSlider();
+#endif
+
+#ifdef IMPLEMENTATION
+entity makeNexuizPicmipSlider()
+{
+	entity me;
+	me = spawnNexuizPicmipSlider();
+	me.configureNexuizPicmipSlider(me);
+	return me;
+}
+string valueToTextNexuizPicmipSlider(entity me, float theValue)
+{
+	switch(floor(theValue + 0.5))
+	{
+		case 0:  return "best";
+		case 1:  return "good";
+		case 2:  return "medium";
+		case 3:  return "low";
+		case 4:  return "none";
+		default: return "custom";
+	}
+}
+void configureNexuizPicmipSliderNexuizPicmipSlider(entity me)
+{
+	me.configureNexuizSlider(me, 4, 0, -1, "gl_picmip");
+}
+#endif

Modified: trunk/data/qcsrc/menu-div0test/nexuiz/slider_resolution.c
===================================================================
--- trunk/data/qcsrc/menu-div0test/nexuiz/slider_resolution.c	2007-10-30 10:53:46 UTC (rev 2867)
+++ trunk/data/qcsrc/menu-div0test/nexuiz/slider_resolution.c	2007-10-30 15:30:53 UTC (rev 2868)
@@ -2,6 +2,8 @@
 CLASS(NexuizResolutionSlider) EXTENDS(NexuizSlider)
 	METHOD(NexuizResolutionSlider, valueToText, string(entity, float))
 	METHOD(NexuizResolutionSlider, configureNexuizResolutionSlider, void(entity))
+	METHOD(NexuizResolutionSlider, loadCvars, void(entity))
+	METHOD(NexuizResolutionSlider, saveCvars, void(entity))
 	ATTRIB(NexuizResolutionSlider, resolutions, string, 
 		" 640  480 "
 		" 800  600 "
@@ -34,6 +36,8 @@
 {
 	string r;
 	float w, h;
+	if(theValue < me.valueMin || theValue > me.valueMax)
+		return "custom";
 	r = substring(me.resolutions, (theValue - 1) * 10, 10);
 	w = stof(substring(r, 0, 5));
 	h = stof(substring(r, 5, 10));
@@ -43,4 +47,35 @@
 {
 	me.configureNexuizSlider(me, 1, strlen(me.resolutions) / 10, 1, "vid_width");
 }
+void loadCvarsNexuizResolutionSlider(entity me)
+{
+	string r;
+	float i;
+	float w, h;
+	me.value = 0;
+	w = cvar("vid_width");
+	h = cvar("vid_height");
+	for(i = me.valueMin; i <= me.valueMax; ++i)
+	{
+		r = substring(me.resolutions, (i - 1) * 10, 10);
+		if(w == stof(substring(r, 0, 5)))
+			if(h == stof(substring(r, 5, 10)))
+			{
+				me.value = i;
+				break;
+			}
+	}
+}
+void saveCvarsNexuizResolutionSlider(entity me)
+{
+	string r;
+	float w, h;
+	if(me.value < me.valueMin || me.value > me.valueMax)
+		return;
+	r = substring(me.resolutions, (me.value - 1) * 10, 10);
+	w = stof(substring(r, 0, 5));
+	h = stof(substring(r, 5, 10));
+	cvar_set("vid_width", ftos(w));
+	cvar_set("vid_height", ftos(h));
+}
 #endif

Modified: trunk/data/qcsrc/menu-div0test/nexuiz/tab.c
===================================================================
--- trunk/data/qcsrc/menu-div0test/nexuiz/tab.c	2007-10-30 10:53:46 UTC (rev 2867)
+++ trunk/data/qcsrc/menu-div0test/nexuiz/tab.c	2007-10-30 15:30:53 UTC (rev 2868)
@@ -6,6 +6,7 @@
 	ATTRIB(NexuizTab, rows, float, 3)
 	ATTRIB(NexuizTab, columns, float, 2)
 	*/
+	METHOD(NexuizTab, showNotify, void(entity))
 
 	ATTRIB(NexuizTab, marginTop, float, 0) // pixels
 	ATTRIB(NexuizTab, marginBottom, float, 0) // pixels
@@ -21,4 +22,8 @@
 #endif
 
 #ifdef IMPLEMENTATION
+void showNotifyNexuizTab(entity me)
+{
+	loadAllCvars(me);
+}
 #endif

Added: trunk/data/qcsrc/menu-div0test/nexuiz/util.qc
===================================================================
--- trunk/data/qcsrc/menu-div0test/nexuiz/util.qc	                        (rev 0)
+++ trunk/data/qcsrc/menu-div0test/nexuiz/util.qc	2007-10-30 15:30:53 UTC (rev 2868)
@@ -0,0 +1,27 @@
+void forAllDescendants(entity root, void(entity, entity) funcPre, void(entity, entity) funcPost, entity pass)
+{
+	depthfirst(root, parent, firstChild, nextSibling, funcPre, funcPost, pass);
+}
+
+.string cvarName;
+void SUB_Null_ee(entity e1, entity e2)
+{
+}
+void saveCvarsOf(entity ignore, entity e)
+{
+	if(e.cvarName)
+		e.saveCvars(e);
+}
+void loadCvarsOf(entity ignore, entity e)
+{
+	if(e.cvarName)
+		e.loadCvars(e);
+}
+void saveAllCvars(entity root)
+{
+	forAllDescendants(root, saveCvarsOf, SUB_Null_ee, NULL);
+}
+void loadAllCvars(entity root)
+{
+	forAllDescendants(root, loadCvarsOf, SUB_Null_ee, NULL);
+}

Added: trunk/data/qcsrc/menu-div0test/nexuiz/util.qh
===================================================================
--- trunk/data/qcsrc/menu-div0test/nexuiz/util.qh	                        (rev 0)
+++ trunk/data/qcsrc/menu-div0test/nexuiz/util.qh	2007-10-30 15:30:53 UTC (rev 2868)
@@ -0,0 +1,3 @@
+void forAllDescendants(entity root, void(entity, entity) funcPre, void(entity, entity) funcPost, entity pass);
+void saveAllCvars(entity root);
+void loadAllCvars(entity root);

Modified: trunk/data/qcsrc/menu-div0test/progs.src
===================================================================
--- trunk/data/qcsrc/menu-div0test/progs.src	2007-10-30 10:53:46 UTC (rev 2867)
+++ trunk/data/qcsrc/menu-div0test/progs.src	2007-10-30 15:30:53 UTC (rev 2868)
@@ -10,6 +10,7 @@
 menu.qh
 draw.qh
 skin.qh
+nexuiz/util.qh
 
 oo/classdefs.h
 	classes.c
@@ -19,6 +20,7 @@
 gamecommand.qc
 menu.qc
 draw.qc
+nexuiz/util.qc
 
 oo/constructors.h
 	classes.c

Modified: trunk/data/qcsrc/menu-div0test/skin.qh
===================================================================
--- trunk/data/qcsrc/menu-div0test/skin.qh	2007-10-30 10:53:46 UTC (rev 2867)
+++ trunk/data/qcsrc/menu-div0test/skin.qh	2007-10-30 15:30:53 UTC (rev 2868)
@@ -6,6 +6,7 @@
 const string SKINGFX_BUTTON_GRAY = "qcsrc/menu-div0test/basebuttongray";
 const string SKINGFX_SLIDER = "qcsrc/menu-div0test/baseslider";
 const string SKINGFX_CHECKBOX = "qcsrc/menu-div0test/basecheckbox";
+const string SKINGFX_RADIOBUTTON = "qcsrc/menu-div0test/baseradiobutton";
 
 const float SKINMARGIN_TOP = 8;
 const float SKINMARGIN_LEFT = 8;




More information about the nexuiz-commits mailing list