r4049 - in trunk/data/qcsrc/menu: . nexuiz
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Thu Aug 7 15:16:08 EDT 2008
Author: div0
Date: 2008-08-07 15:16:07 -0400 (Thu, 07 Aug 2008)
New Revision: 4049
Added:
trunk/data/qcsrc/menu/nexuiz/bigbutton.c
trunk/data/qcsrc/menu/nexuiz/bigcommandbutton.c
Modified:
trunk/data/qcsrc/menu/classes.c
trunk/data/qcsrc/menu/nexuiz/dialog_singleplayer.c
trunk/data/qcsrc/menu/nexuiz/dialog_teamselect.c
trunk/data/qcsrc/menu/nexuiz/gametypebutton.c
trunk/data/qcsrc/menu/skin-customizables.inc
Log:
add extra types for big buttons (many dialogs now are broken!)
Modified: trunk/data/qcsrc/menu/classes.c
===================================================================
--- trunk/data/qcsrc/menu/classes.c 2008-08-07 19:01:55 UTC (rev 4048)
+++ trunk/data/qcsrc/menu/classes.c 2008-08-07 19:16:07 UTC (rev 4049)
@@ -20,7 +20,9 @@
#include "nexuiz/tab.c"
#include "nexuiz/mainwindow.c"
#include "nexuiz/button.c"
+#include "nexuiz/bigbutton.c"
#include "nexuiz/commandbutton.c"
+#include "nexuiz/bigcommandbutton.c"
#include "nexuiz/dialog_teamselect.c"
#include "nexuiz/dialog_settings.c"
#include "nexuiz/dialog_settings_video.c"
Added: trunk/data/qcsrc/menu/nexuiz/bigbutton.c
===================================================================
--- trunk/data/qcsrc/menu/nexuiz/bigbutton.c (rev 0)
+++ trunk/data/qcsrc/menu/nexuiz/bigbutton.c 2008-08-07 19:16:07 UTC (rev 4049)
@@ -0,0 +1,23 @@
+#ifdef INTERFACE
+CLASS(NexuizBigButton) EXTENDS(NexuizButton)
+ METHOD(NexuizBigButton, configureNexuizBigButton, void(entity, string, vector))
+ ATTRIB(NexuizBigButton, image, string, SKINGFX_BUTTON_BIG)
+ ATTRIB(NexuizBigButton, grayImage, string, SKINGFX_BUTTON_BIG_GRAY)
+ENDCLASS(NexuizButton)
+entity makeNexuizButton(string theText, vector theColor);
+#endif
+
+#ifdef IMPLEMENTATION
+entity makeNexuizBigButton(string theText, vector theColor)
+{
+ entity me;
+ me = spawnNexuizBigButton();
+ me.configureNexuizBigButton(me, theText, theColor);
+ return me;
+}
+
+void configureNexuizBigButtonNexuizBigButton(entity me, string theText, vector theColor)
+{
+ me.configureNexuizButton(me, theText, theColor);
+}
+#endif
Added: trunk/data/qcsrc/menu/nexuiz/bigcommandbutton.c
===================================================================
--- trunk/data/qcsrc/menu/nexuiz/bigcommandbutton.c (rev 0)
+++ trunk/data/qcsrc/menu/nexuiz/bigcommandbutton.c 2008-08-07 19:16:07 UTC (rev 4049)
@@ -0,0 +1,23 @@
+#ifdef INTERFACE
+CLASS(NexuizBigCommandButton) EXTENDS(NexuizCommandButton)
+ METHOD(NexuizBigCommandButton, configureNexuizBigCommandButton, void(entity, string, vector, string, float))
+ ATTRIB(NexuizBigCommandButton, image, string, SKINGFX_BUTTON_BIG)
+ ATTRIB(NexuizBigCommandButton, grayImage, string, SKINGFX_BUTTON_BIG_GRAY)
+ENDCLASS(NexuizCommandButton)
+entity makeNexuizBigCommandButton(string theText, vector theColor, string theCommand, float closesMenu);
+#endif
+
+#ifdef IMPLEMENTATION
+entity makeNexuizBigCommandButton(string theText, vector theColor, string theCommand, float theFlags)
+{
+ entity me;
+ me = spawnNexuizBigCommandButton();
+ me.configureNexuizBigCommandButton(me, theText, theColor, theCommand, theFlags);
+ return me;
+}
+
+void configureNexuizBigCommandButtonNexuizBigCommandButton(entity me, string theText, vector theColor, string theCommand, float theFlags)
+{
+ me.configureNexuizCommandButton(me, theText, theColor, theCommand, theFlags);
+}
+#endif
Modified: trunk/data/qcsrc/menu/nexuiz/dialog_singleplayer.c
===================================================================
--- trunk/data/qcsrc/menu/nexuiz/dialog_singleplayer.c 2008-08-07 19:01:55 UTC (rev 4048)
+++ trunk/data/qcsrc/menu/nexuiz/dialog_singleplayer.c 2008-08-07 19:16:07 UTC (rev 4049)
@@ -55,7 +55,7 @@
me.TR(me);
me.TDempty(me, (me.columns - 2) / 2);
- me.TD(me, 2, 2, e = makeNexuizButton("Instant action!", '0 0 0'));
+ me.TD(me, 2, 2, e = makeNexuizBigButton("Instant action!", '0 0 0'));
e.onClick = InstantAction_LoadMap;
e.onClickEntity = NULL;
me.TR(me);
Modified: trunk/data/qcsrc/menu/nexuiz/dialog_teamselect.c
===================================================================
--- trunk/data/qcsrc/menu/nexuiz/dialog_teamselect.c 2008-08-07 19:01:55 UTC (rev 4048)
+++ trunk/data/qcsrc/menu/nexuiz/dialog_teamselect.c 2008-08-07 19:16:07 UTC (rev 4049)
@@ -19,7 +19,7 @@
entity makeTeamButton(string theName, vector theColor, string commandtheName)
{
entity b;
- b = makeNexuizCommandButton(theName, theColor, commandtheName, 1);
+ b = makeNexuizBigCommandButton(theName, theColor, commandtheName, 1);
return b;
}
@@ -46,7 +46,7 @@
me.TD(me, 2, 1, me.team4 = makeTeamButton("pink", '1 0.5 1', "cmd selectteam pink; cmd join"));
me.TR(me);
me.TR(me);
- me.TD(me, 1, 4, makeTeamButton("spectate", '0 0 0', "cmd spectate"));
+ me.TD(me, 1, 4, makeNexuizCommandButton("spectate", '0 0 0', "cmd spectate", 1));
}
#endif
Modified: trunk/data/qcsrc/menu/nexuiz/gametypebutton.c
===================================================================
--- trunk/data/qcsrc/menu/nexuiz/gametypebutton.c 2008-08-07 19:01:55 UTC (rev 4048)
+++ trunk/data/qcsrc/menu/nexuiz/gametypebutton.c 2008-08-07 19:16:07 UTC (rev 4049)
@@ -3,7 +3,7 @@
METHOD(NexuizGametypeButton, configureNexuizGametypeButton, void(entity, float, string, string))
METHOD(NexuizGametypeButton, setChecked, void(entity, float))
ATTRIB(NexuizGametypeButton, fontSize, float, SKINFONTSIZE_NORMAL)
- ATTRIB(NexuizGametypeButton, image, string, SKINGFX_BUTTON)
+ ATTRIB(NexuizGametypeButton, image, string, SKINGFX_BUTTON_BIG)
ATTRIB(NexuizGametypeButton, color, vector, SKINCOLOR_BUTTON_N)
ATTRIB(NexuizGametypeButton, colorC, vector, SKINCOLOR_BUTTON_C)
ATTRIB(NexuizGametypeButton, colorF, vector, SKINCOLOR_BUTTON_F)
Modified: trunk/data/qcsrc/menu/skin-customizables.inc
===================================================================
--- trunk/data/qcsrc/menu/skin-customizables.inc 2008-08-07 19:01:55 UTC (rev 4048)
+++ trunk/data/qcsrc/menu/skin-customizables.inc 2008-08-07 19:16:07 UTC (rev 4049)
@@ -73,6 +73,8 @@
// item: button
SKINSTRING(GFX_BUTTON, "button");
SKINSTRING(GFX_BUTTON_GRAY, "buttongray");
+ SKINSTRING(GFX_BUTTON_BIG, "bigbutton");
+ SKINSTRING(GFX_BUTTON_BIG_GRAY, "bigbuttongray");
SKINVECTOR(COLOR_BUTTON_N, '1 1 1');
SKINVECTOR(COLOR_BUTTON_C, '1 1 1');
SKINVECTOR(COLOR_BUTTON_F, '1 1 1');
More information about the nexuiz-commits
mailing list