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

Method drawAllStrings

src/main/java/ui/controls/PopUp.java:177–193  ·  view source on GitHub ↗
(Graphics g, int x, int y)

Source from the content-addressed store, hash-verified

175 }
176
177 private void drawAllStrings(Graphics g, int x, int y) {
178 Vector lines=((PopUpElement)popUps.elementAt(0)).getMessage();
179 if (lines.size()<1) return;
180
181 int fh=getFontHeight();
182
183 int pos=0;
184
185 for (Enumeration stringLine=lines.elements(); stringLine.hasMoreElements(); ) {
186 String str=(String)stringLine.nextElement();
187 if (pos>=startLine) {
188 FontCache.drawString(g,str, x, y, Graphics.TOP|Graphics.LEFT);
189 y += fh;
190 }
191 pos++;
192 }
193 }
194
195 private int getFontHeight() {
196 return font.getHeight();

Callers 1

paintCustomMethod · 0.95

Calls 5

getFontHeightMethod · 0.95
drawStringMethod · 0.95
elementsMethod · 0.80
getMessageMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected