MCPcopy Create free account
hub / github.com/5zig/The-5zig-Mod / draw

Method draw

Minecraft-Utils/1.10/src/FileSelector.java:105–197  ·  view source on GitHub ↗
(int mouseX, int mouseY, float partialTicks)

Source from the content-addressed store, hash-verified

103 }
104
105 @Override
106 public void draw(int mouseX, int mouseY, float partialTicks) {
107 this.mouseX = mouseX;
108 this.mouseY = mouseY;
109
110 int scrollX0 = getScrollBarX();
111 int scrollX1 = scrollX0 + 6;
112 bindAmountScrolled();
113 GLUtil.disableLighting();
114 GLUtil.disableFog();
115 bon tessellator = bon.a();
116 bnt worldRenderer = tessellator.c();
117 MinecraftFactory.getVars().bindTexture(bdm.b);
118 GLUtil.color(1.0F, 1.0F, 1.0F, 1.0F);
119 float var7 = 32.0F;
120 // background
121 worldRenderer.a(7, bwm.i);
122 worldRenderer.b((double) left, (double) bottom, 0.0D).a((double) ((float) left / var7), (double) ((float) (bottom + (int) amountScrolled) / var7)).b(32, 32, 32, 255).d();
123 worldRenderer.b((double) right, (double) bottom, 0.0D).a((double) ((float) right / var7), (double) ((float) (bottom + (int) amountScrolled) / var7)).b(32, 32, 32, 255).d();
124 worldRenderer.b((double) right, (double) top, 0.0D).a((double) ((float) right / var7), (double) ((float) (top + (int) amountScrolled) / var7)).b(32, 32, 32, 255).d();
125 worldRenderer.b((double) left, (double) top, 0.0D).a((double) ((float) left / var7), (double) ((float) (top + (int) amountScrolled) / var7)).b(32, 32, 32, 255).d();
126 tessellator.b();
127
128 int selectionX0 = left;
129 int selectionY0 = top + 4 - (int) amountScrolled;
130 drawSelectionBox(selectionX0, selectionY0, mouseX, mouseY);
131 GLUtil.disableDepth();
132 byte var10 = 4;
133 this.overlayBackground(0, top, 255, 255);
134 this.overlayBackground(bottom, height, 255, 255);
135 bob.m();
136 GLUtil.tryBlendFuncSeparate(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, GL11.GL_FALSE, GL11.GL_TRUE);
137 bob.d();
138 bob.j(7425);
139 bob.z();
140 // Schatten
141 worldRenderer.a(7, bwm.i);
142 worldRenderer.b((double) left, (double) (top + var10), 0.0D).a(0.0D, 1.0D).b(0, 0, 0, 0).d();
143 worldRenderer.b((double) right, (double) (top + var10), 0.0D).a(1.0D, 1.0D).b(0, 0, 0, 0).d();
144 worldRenderer.b((double) right, (double) top, 0.0D).a(1.0D, 0.0D).b(0, 0, 0, 255).d();
145 worldRenderer.b((double) left, (double) top, 0.0D).a(0.0D, 0.0D).b(0, 0, 0, 255).d();
146 tessellator.b();
147 worldRenderer.a(7, bwm.i);
148 worldRenderer.b((double) left, (double) bottom, 0.0D).a(0.0D, 1.0D).b(0, 0, 0, 255).d();
149 worldRenderer.b((double) right, (double) bottom, 0.0D).a(1.0D, 1.0D).b(0, 0, 0, 255).d();
150 worldRenderer.b((double) right, (double) (bottom - var10), 0.0D).a(1.0D, 0.0D).b(0, 0, 0, 0).d();
151 worldRenderer.b((double) left, (double) (bottom - var10), 0.0D).a(0.0D, 0.0D).b(0, 0, 0, 0).d();
152 tessellator.b();
153 int var11 = m();
154 if (var11 > 0) {
155 int var12 = (bottom - top) * (bottom - top) / getContentHeight();
156 var12 = op.a(var12, 32, bottom - top - 8);
157 int var13 = (int) amountScrolled * (bottom - top - var12) / var11 + top;
158 if (var13 < top) {
159 var13 = top;
160 }
161
162 worldRenderer.a(7, bwm.i);

Callers

nothing calls this directly

Calls 15

getScrollBarXMethod · 0.95
bindAmountScrolledMethod · 0.95
disableLightingMethod · 0.95
disableFogMethod · 0.95
getVarsMethod · 0.95
colorMethod · 0.95
drawSelectionBoxMethod · 0.95
disableDepthMethod · 0.95
overlayBackgroundMethod · 0.95
mMethod · 0.95
tryBlendFuncSeparateMethod · 0.95
getContentHeightMethod · 0.95

Tested by

no test coverage detected