MCPcopy Index your code
hub / github.com/BombusMod/BombusMod / draw

Method draw

src/main/java/ui/controls/Progress.java:75–97  ·  view source on GitHub ↗
(Graphics g, int filled, String text)

Source from the content-addressed store, hash-verified

73 }
74
75 public void draw(Graphics g, int filled, String text) {
76 g.setColor(ColorTheme.getColor(ColorTheme.PGS_REMAINED));
77 g.fillRect(x, y, width, height);
78//#ifdef GRADIENT
79 if (topColor!=bottomColor) {
80 gr.paintWidth(g, x+filled);
81 } else {
82//#endif
83
84 g.setColor(topColor);
85 g.fillRect(x, y+1, filled, height - 1);
86
87//#ifdef GRADIENT
88 }
89//#endif
90
91 g.setColor(ColorTheme.getColor(ColorTheme.PGS_INK));
92 g.setFont(font);
93 FontCache.drawString(g,text, x+(width/2), y + (height - font.getHeight())/2, Graphics.TOP|Graphics.HCENTER);
94 g.drawRect(x, y, width-1, height-1);
95 //g.drawLine(x,y,width,y);
96 g.drawLine(x+filled,y+1,x+filled,y+height-1);
97 }
98
99 public int getHeight() {
100 return height;

Callers 3

paintMethod · 0.45
drawItemMethod · 0.45
paintMethod · 0.45

Calls 9

getColorMethod · 0.95
drawStringMethod · 0.95
paintWidthMethod · 0.80
getHeightMethod · 0.65
setColorMethod · 0.45
fillRectMethod · 0.45
setFontMethod · 0.45
drawRectMethod · 0.45
drawLineMethod · 0.45

Tested by

no test coverage detected