Skip to content

Commit

Permalink
Highlight for the scroll bar
Browse files Browse the repository at this point in the history
  • Loading branch information
bonii-xx committed Sep 11, 2014
1 parent 711fe0d commit 13f1b63
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Binary file modified resources/assets/tinker/textures/gui/smelteryside.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 7 additions & 1 deletion src/main/java/tconstruct/smeltery/gui/SmelteryGui.java
Expand Up @@ -243,8 +243,14 @@ protected void drawGuiContainerBackgroundLayer (float f, int mouseX, int mouseY)
// right end
drawTexturedModalRect(cornerX - 46 + 72, cornerY, 72, 0, 25, ySize - 8);

int sx = cornerX + 32;
int sy = (int) (cornerY + 8 + 127 * currentScroll);
// highlighted scroll bar
if(isScrolling || ( mouseX >= sx && mouseX <= sx + 12 && mouseY >= sy && mouseY <= sy + 15))
drawTexturedModalRect(sx, sy, 122, 0, 12, 15);
// scroll bar
drawTexturedModalRect(cornerX + 32, (int) (cornerY + 8 + 127 * currentScroll), 98, 0, 12, 15);
else
drawTexturedModalRect(sx, sy, 98, 0, 12, 15);
}
else
{
Expand Down

0 comments on commit 13f1b63

Please sign in to comment.