mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-19 12:35:52 -04:00
Make tab list in classic mode have same gradient as original classic.
This commit is contained in:
parent
0ef0eb3c32
commit
6dbe8098ea
@ -7,7 +7,8 @@ namespace ClassicalSharp.Gui {
|
||||
public sealed class ClassicPlayerListWidget : NormalPlayerListWidget {
|
||||
|
||||
ChatTextWidget overview;
|
||||
static FastColour lightTableCol = new FastColour( 20, 20, 20, 180 );
|
||||
protected static FastColour topCol = new FastColour( 0, 0, 0, 180 );
|
||||
protected static FastColour bottomCol = new FastColour( 50, 50, 50, 205 );
|
||||
public ClassicPlayerListWidget( Game game, Font font ) : base( game, font ) {
|
||||
}
|
||||
|
||||
@ -31,7 +32,7 @@ namespace ClassicalSharp.Gui {
|
||||
api.Texturing = false;
|
||||
int offset = overview.Height + 10;
|
||||
int height = Math.Max( 300, Height );
|
||||
api.Draw2DQuad( X, Y - offset, Width, height, lightTableCol );
|
||||
api.Draw2DQuad( X, Y - offset, Width, height, topCol, bottomCol );
|
||||
|
||||
api.Texturing = true;
|
||||
overview.MoveTo( game.Width / 2 - overview.Width / 2,
|
||||
|
@ -20,7 +20,7 @@ namespace ClassicalSharp.Generator {
|
||||
p[i] = (byte)i;
|
||||
|
||||
for( int i = 0; i < 256; i++ ) {
|
||||
int j = (rnd.Next( 256 - i ) + i); // [i, 256)
|
||||
int j = rnd.Next( i, 256 );
|
||||
byte temp = p[i]; p[i] = p[j]; p[j] = temp;
|
||||
}
|
||||
for( int i = 0; i < 256; i++ )
|
||||
|
@ -94,6 +94,8 @@ namespace ClassicalSharp.Generator {
|
||||
|
||||
public int Next() { return Raw( 32 ); }
|
||||
|
||||
public int Next( int min, int max ) { return min + Next( max - min ); }
|
||||
|
||||
public int Next( int n ) {
|
||||
if( (n & -n) == n ) // i.e., n is a power of 2
|
||||
return (int)((n * (long)Raw( 31 )) >> 31);
|
||||
|
@ -195,7 +195,7 @@ namespace ClassicalSharp.Generator {
|
||||
for( int i = 0; i < numSources; i++ ) {
|
||||
CurrentProgress = (float)i / numSources;
|
||||
int x = rnd.Next( width ), z = rnd.Next( length );
|
||||
int y = waterLevel - (rnd.Next( 2 ) + 1);
|
||||
int y = waterLevel - rnd.Next( 1, 3 );
|
||||
FloodFill( (y * length + z) * width + x, (byte)Block.Water );
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user