]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
put the colors in rainbow order on the menu
authorRudolf Polzer <divverent@alientrap.org>
Tue, 3 Jan 2012 14:20:42 +0000 (15:20 +0100)
committerRudolf Polzer <divverent@alientrap.org>
Tue, 3 Jan 2012 14:20:42 +0000 (15:20 +0100)
gfx/colormap_palette.pl
qcsrc/menu/xonotic/colorbutton.c

index cdd38ed95d953933e37300faba2fdca2a37fd8a8..07ad2de1142c640f30c387b969c2f97d86523c5e 100644 (file)
@@ -23,15 +23,15 @@ my @colors = (
        '00ff80', # cyangreen
        '00ff00', # green
        'ff0000', # red
-       '00aaff', # cyanblue2
+       '00aaff', # cyanblue1
        '00ffff', # cyan
        '80ff00', # yellowgreen
-       '8000ff', # redmagenta
+       '8000ff', # bluemagenta
        'ff00ff', # magenta
-       'ff0080', # bluemagenta
+       'ff0080', # redmagenta
        '0000ff', # blue
        'ffff00', # yellow
-       '0055ff', # cyanblue1
+       '0055ff', # cyanblue2
        'ffaa00', # orange2
        '000000' # unused
 );
index 2ca8c86c4078d056c86ba0d8512709b7d45b5df8..4e81a4acc24d2aa7d5ecce525e54d15090e307ce 100644 (file)
@@ -28,6 +28,27 @@ entity makeXonoticColorButton(float theGroup, float theColor, float theValue)
 }
 void XonoticColorButton_configureXonoticColorButton(entity me, float theGroup, float theColor, float theValue)
 {
+       switch(theValue)
+       {
+               // rearrange 1..14 for rainbow order
+               case  1: theValue = 10; break;
+               case  2: theValue =  4; break;
+               case  3: theValue =  1; break;
+               case  4: theValue = 14; break;
+               case  5: theValue = 12; break;
+               case  6: theValue =  7; break;
+               case  7: theValue =  3; break;
+               case  8: theValue =  2; break;
+               case  9: theValue =  6; break;
+               case 10: theValue =  5; break;
+               case 11: theValue = 13; break;
+               case 12: theValue = 11; break;
+               case 13: theValue =  8; break;
+               case 14: theValue =  9; break;
+               default:
+                       // no change
+                       break;
+       }
        me.cvarName = "_cl_color";
        me.cvarValueFloat = theValue;
        me.cvarPart = theColor;