r3255 - trunk/data/qcsrc/menu/nexuiz
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Wed Jan 23 18:57:50 EST 2008
Author: div0
Date: 2008-01-23 18:57:50 -0500 (Wed, 23 Jan 2008)
New Revision: 3255
Modified:
trunk/data/qcsrc/menu/nexuiz/dialog_singleplayer_winner.c
trunk/data/qcsrc/menu/nexuiz/image.c
trunk/data/qcsrc/menu/nexuiz/util.qc
Log:
fix winner dialog; make NexuizImage be able to take over original image aspect
Modified: trunk/data/qcsrc/menu/nexuiz/dialog_singleplayer_winner.c
===================================================================
--- trunk/data/qcsrc/menu/nexuiz/dialog_singleplayer_winner.c 2008-01-23 23:30:22 UTC (rev 3254)
+++ trunk/data/qcsrc/menu/nexuiz/dialog_singleplayer_winner.c 2008-01-23 23:57:50 UTC (rev 3255)
@@ -15,7 +15,7 @@
entity e;
me.TR(me);
- me.TD(me, me.rows - 2, me.columns, e = makeNexuizImage("/gfx/winner", 1.0));
+ me.TD(me, me.rows - 2, me.columns, e = makeNexuizImage("/gfx/winner", -1));
me.gotoRC(me, me.rows - 1, 0);
me.TD(me, 1, me.columns, e = makeNexuizButton("OK", '0 0 0'));
Modified: trunk/data/qcsrc/menu/nexuiz/image.c
===================================================================
--- trunk/data/qcsrc/menu/nexuiz/image.c 2008-01-23 23:30:22 UTC (rev 3254)
+++ trunk/data/qcsrc/menu/nexuiz/image.c 2008-01-23 23:57:50 UTC (rev 3255)
@@ -16,6 +16,13 @@
void configureNexuizImageNexuizImage(entity me, string theImage, float theAspect)
{
me.configureImage(me, theImage);
- me.forcedAspect = theAspect;
+ if(theAspect < 0) // use image aspect
+ {
+ vector sz;
+ sz = draw_PictureSize(theImage);
+ me.forcedAspect = sz_x / sz_y;
+ }
+ else
+ me.forcedAspect = theAspect;
}
#endif
Modified: trunk/data/qcsrc/menu/nexuiz/util.qc
===================================================================
--- trunk/data/qcsrc/menu/nexuiz/util.qc 2008-01-23 23:30:22 UTC (rev 3254)
+++ trunk/data/qcsrc/menu/nexuiz/util.qc 2008-01-23 23:57:50 UTC (rev 3255)
@@ -215,7 +215,7 @@
if(!campaign_won_previous)
{
m_display();
- DialogOpenButton_Click_withCoords(NULL, main.winnerDialog, '0 0 0', '1 1 0');
+ DialogOpenButton_Click_withCoords(NULL, main.winnerDialog, '0 0 0', eX * conwidth + eY * conheight);
}
campaign_won_previous = 1;
}
More information about the nexuiz-commits
mailing list