r2870 - trunk/data/qcsrc/menu-div0test/item

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


Author: div0
Date: 2007-10-30 11:50:59 -0400 (Tue, 30 Oct 2007)
New Revision: 2870

Modified:
   trunk/data/qcsrc/menu-div0test/item/modalcontroller.c
Log:
fix minor visual glitch


Modified: trunk/data/qcsrc/menu-div0test/item/modalcontroller.c
===================================================================
--- trunk/data/qcsrc/menu-div0test/item/modalcontroller.c	2007-10-30 15:36:02 UTC (rev 2869)
+++ trunk/data/qcsrc/menu-div0test/item/modalcontroller.c	2007-10-30 15:50:59 UTC (rev 2870)
@@ -98,7 +98,7 @@
 {
 	float previousState;
 	previousState = other.ModalController_state;
-	if(state == previousState)
+	if(state == previousState && !skipAnimation)
 		return;
 	other.ModalController_state = state;
 	switch(state)
@@ -240,7 +240,7 @@
 
 void showChildModalController(entity me, entity other, vector theOrigin, vector theSize, float skipAnimation)
 {
-	if(other.ModalController_state == 0)
+	if(other.ModalController_state == 0 || skipAnimation)
 	{
 		me.setFocus(me, NULL);
 		other.ModalController_buttonOrigin = globalToBox(theOrigin, me.origin, me.size);
@@ -258,7 +258,7 @@
 
 void hideChildModalController(entity me, entity other, float skipAnimation)
 {
-	if(other.ModalController_state)
+	if(other.ModalController_state || skipAnimation)
 	{
 		me.setFocus(me, NULL);
 		me.switchState(me, other, 0, skipAnimation);




More information about the nexuiz-commits mailing list