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

Method draw

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

Source from the content-addressed store, hash-verified

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

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