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

Method drawSelectionBox

Minecraft-Utils/1.8/src/FileSelector.java:211–253  ·  view source on GitHub ↗
(int x, int y, int mouseX, int mouseY)

Source from the content-addressed store, hash-verified

209 }
210
211 protected void drawSelectionBox(int x, int y, int mouseX, int mouseY) {
212 int rows = (int) Math.ceil((double) files.size() / (double) columnCount);
213 int columns = columnCount;
214 ckx tessellator = ckx.a();
215 civ worldRenderer = tessellator.c();
216
217 for (int i = 0; i < rows; ++i) {
218 int ny = y + i * getSlotHeight();
219 int padding = getSlotHeight() - 4;
220 //if (ny > bottom || ny + padding < top) {
221 //this.a(i, var, ny);
222 //}
223 for (int j = 0; j < columnCount; j++) {
224 int nx = x + j * selectionBoxWidth;
225 int nx1 = nx + selectionBoxWidth;
226
227 int id = j + i * columns;
228 if (isSelected(id)) { // isSelected
229 GLUtil.color(1.0F, 1.0F, 1.0F, 1.0F);
230
231 cjm.x();
232
233 worldRenderer.b();
234 worldRenderer.c(8421504);
235 worldRenderer.a(nx, ny + padding + 2, 0.0D, 0.0D, 1.0D);
236 worldRenderer.a(nx1, ny + padding + 2, 0.0D, 1.0D, 1.0D);
237 worldRenderer.a(nx1, ny - 2, 0.0D, 1.0D, 0.0D);
238 worldRenderer.a(nx, ny - 2, 0.0D, 0.0D, 0.0D);
239
240 worldRenderer.c(0);
241 worldRenderer.a(nx + 1, ny + padding + 1, 0.0D, 0.0D, 1.0D);
242 worldRenderer.a(nx1 - 1, ny + padding + 1, 0.0D, 1.0D, 1.0D);
243 worldRenderer.a(nx1 - 1, ny - 1, 0.0D, 1.0D, 0.0D);
244 worldRenderer.a(nx + 1, ny - 1, 0.0D, 0.0D, 0.0D);
245
246 tessellator.b();
247 cjm.w();
248 }
249 drawSlot(id, nx, ny, padding, mouseX, mouseY);
250 }
251 }
252
253 }
254
255 protected void drawSlot(int id, int x, int y, int padding, int mouseX, int mouseY) {
256 File file = getFile(id);

Callers 1

drawMethod · 0.95

Calls 8

getSlotHeightMethod · 0.95
isSelectedMethod · 0.95
colorMethod · 0.95
drawSlotMethod · 0.95
sizeMethod · 0.80
aMethod · 0.45
cMethod · 0.45
bMethod · 0.45

Tested by

no test coverage detected