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

Method drawItem

src/main/java/ui/SplashScreen.java:163–192  ·  view source on GitHub ↗
(Graphics g, int ofs, boolean selected)

Source from the content-addressed store, hash-verified

161 }
162
163 public void drawItem(Graphics g, int ofs, boolean selected) {
164 setAbsOrg(g, 0, 0);
165 g.setColor(ColorTheme.getColor(ColorTheme.BLK_BGND));
166 g.fillRect(0, 0, width, height);
167
168 if (splashimg != null) {
169 g.drawImage(splashimg, width >> 1, height >> 1, Graphics.VCENTER | Graphics.HCENTER);
170 }
171
172 if (pos == -1) {
173 if (status != null) {
174 status.drawItem(g, 0, false);
175 }
176
177 g.setColor(ColorTheme.getColor(ColorTheme.BLK_INK));
178 g.setFont(clockFont);
179 int h = clockFont.getHeight() + 1;
180
181 String time = Time.localTime();
182 int tw = clockFont.stringWidth(time);
183
184 FontCache.drawString(g, time, width / 2, height, Graphics.BOTTOM | Graphics.HCENTER);
185 } else {
186 int filled = pos * width / 100;
187 if (pb == null) {
188 pb = new Progress(0, height, width);
189 }
190 pb.draw(g, filled, capt);
191 }
192 }
193
194 public String getTipString() {
195 return null;

Callers

nothing calls this directly

Calls 12

getColorMethod · 0.95
localTimeMethod · 0.95
drawStringMethod · 0.95
setAbsOrgMethod · 0.80
drawItemMethod · 0.65
getHeightMethod · 0.65
stringWidthMethod · 0.65
setColorMethod · 0.45
fillRectMethod · 0.45
drawImageMethod · 0.45
setFontMethod · 0.45
drawMethod · 0.45

Tested by

no test coverage detected