Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void drawRectangleOnScreen(int xPos, int yPos, int rectSizeX, int rectSizeY, int tXPos, int tYPos, GuiScreen gui)
- {
- int screenWidth = 196;
- int screenHeight = 169;
- int u = tXPos / screenWidth;
- int v = tYPos / screenHeight;
- gui.drawTexturedModalRect(xPos, yPos, u, v, rectSizeY, rectSizeX);
- }
- // How is this method used:
- public class TrialScreen extends GuiScreen{
- @Override
- public void drawScreen(int x, int y , float tick)
- {
- int[] screenPos = MainLib.createScreenBase(new int[]{width, height}, "PasswordGui", this);
- MainLib.drawRectangleOnScreen(screenPos[0] + 110, screenPos[1] + 11, 0, 177, 68, 20, this);
- super.drawScreen(x, y, tick);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement