Minor optimization

This commit is contained in:
Anuken
2020-09-13 14:30:31 -04:00
parent 48391219fd
commit f3921e3dcc
32 changed files with 111 additions and 116 deletions

View File

@@ -80,11 +80,11 @@ public class Bar extends Element{
Drawable top = Tex.barTop;
float topWidth = width * value;
if(topWidth > Core.atlas.find("bar-top").getWidth()){
if(topWidth > Core.atlas.find("bar-top").width){
top.draw(x, y, topWidth, height);
}else{
if(ScissorStack.push(scissor.set(x, y, topWidth, height))){
top.draw(x, y, Core.atlas.find("bar-top").getWidth(), height);
top.draw(x, y, Core.atlas.find("bar-top").width, height);
ScissorStack.pop();
}
}