mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-01-24 18:13:15 -05:00
Fix client status widget returning too big a 'used height'.
This commit is contained in:
parent
60111bcbf2
commit
7427c56e19
1 changed files with 3 additions and 7 deletions
|
@ -90,15 +90,11 @@ namespace ClassicalSharp.Gui {
|
|||
}
|
||||
|
||||
public int GetUsedHeight() {
|
||||
int sum = 0, max = Textures.Length;
|
||||
int sum = 0;
|
||||
for( int i = 0; i < Textures.Length; i++ ) {
|
||||
if( Textures[i].IsValid ) {
|
||||
max = i; break;
|
||||
}
|
||||
}
|
||||
|
||||
for( int i = max; i < Textures.Length; i++ )
|
||||
if( !Textures[i].IsValid ) continue;
|
||||
sum += Textures[i].Height;
|
||||
}
|
||||
return sum;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue