MCPcopy Create free account
hub / github.com/Card-Forge/forge / BackIcon

Class BackIcon

forge-gui-mobile/src/forge/screens/FScreen.java:316–350  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

314 }
315
316 protected static class BackIcon implements FImage {
317 private static final float THICKNESS = Utils.scale(3);
318 private static FSkinColor getColor() {
319 if (Forge.isMobileAdventureMode)
320 return FSkinColor.get(Colors.ADV_CLR_TEXT);
321 return FSkinColor.get(Colors.CLR_TEXT);
322 }
323
324 private final float width, height;
325 public BackIcon(float width0, float height0) {
326 width = width0;
327 height = height0;
328 }
329
330 @Override
331 public float getWidth() {
332 return width;
333 }
334
335 @Override
336 public float getHeight() {
337 return height;
338 }
339
340 @Override
341 public void draw(Graphics g, float x, float y, float w, float h) {
342 float xMid = x + w * 0.4f;
343 float yMid = y + h / 2;
344 float offsetX = h / 8;
345 float offsetY = w / 4;
346
347 g.drawLine(THICKNESS, getColor(), xMid + offsetX, yMid - offsetY, xMid - offsetX, yMid + 1);
348 g.drawLine(THICKNESS, getColor(), xMid - offsetX, yMid - 1, xMid + offsetX, yMid + offsetY);
349 }
350 }
351
352 protected static class MenuIcon implements FImage {
353 private static FSkinColor getColor() {

Callers

nothing calls this directly

Calls 1

scaleMethod · 0.95

Tested by

no test coverage detected