Don't render hotbar twice when inventory menu is open, oops.

This commit is contained in:
UnknownShadow200 2016-06-08 15:24:33 +10:00
parent 585bde4454
commit 1b8861b8a9
3 changed files with 2 additions and 7 deletions

View File

@ -27,9 +27,9 @@ namespace ClassicalSharp.Gui {
bool showMinimal = game.ActiveScreen.BlocksWorld;
if( chat.HandlesAllInput && !game.PureClassic )
chat.RenderBackground();
if( !showMinimal )
RenderHotbar( delta );
api.Texturing = true;
if( !showMinimal ) hotbar.Render( delta );
chat.Render( delta );
//graphicsApi.BeginVbBatch( VertexFormat.Pos3fTex2fCol4b );
@ -50,8 +50,6 @@ namespace ClassicalSharp.Gui {
DrawCrosshairs();
}
public void RenderHotbar( double delta ) { hotbar.Render( delta ); }
const int chExtent = 16, chWeight = 2;
static TextureRec chRec = new TextureRec( 0, 0, 16/256f, 16/256f );
void DrawCrosshairs() {

View File

@ -77,7 +77,6 @@ namespace ClassicalSharp.Gui {
if( blockInfoTexture.IsValid )
blockInfoTexture.Render( api );
game.hudScreen.RenderHotbar( delta );
api.Texturing = false;
}

View File

@ -38,7 +38,6 @@ namespace ClassicalSharp.Gui {
}
public override void Render( double delta ) {
api.Texturing = true;
RenderHotbar();
Model.ModelCache cache = game.ModelCache;
drawer.BeginBatch( game, cache.vertices, cache.vb );
@ -52,7 +51,6 @@ namespace ClassicalSharp.Gui {
drawer.DrawBatch( block, scale, x, y );
}
drawer.EndBatch();
api.Texturing = false;
}
void RenderHotbar() {