public void render(GameContainer arg0, StateBasedGame arg1, Graphics g) throws SlickException { Images.terrain.draw(backgroundX, backgroundY); Font.drawDkNorthumbriaString("DEMIGODS: Adventures", 200, 75, 50, null, Font.FontType.RENDERED); Font.drawMonospacedFontString("PLAY", 455, 250, 60, hovering[0] ? Color.white : Color.black); Font.drawMonospacedFontString( "SETTINGS", 380, 310, 60, hovering[1] ? Color.white : Color.black); Font.drawMonospacedFontString("QUIT", 455, 370, 60, hovering[2] ? Color.white : Color.black); }
public FontCharacter getSelectedCharacter() { int index = charTable.getSelectedRow(); FontCharacter fc = null; if (index != -1) { fc = (FontCharacter) font.getCharacter(index); } return fc; }
private void doRowData() { tableModel.removeAllRows(); for (int i = 0, j = font.getStartIndex(); i < font.getCharCount(); i++, j++) { FontCharacter fc = font.getCharacter(i); String hexVal = (Integer.toHexString(j)).toUpperCase(); if (hexVal.length() == 1) hexVal = "0" + hexVal; String asciiC = ""; if (j >= 32 && j < 127) { asciiC = "" + (char) j; } Object[] tableData = {"" + j, "0x" + hexVal, asciiC, "" + fc.getWidth(), fc.getComment()}; tableModel.addRow(tableData); } charTable.setRowSelectionInterval(0, 0); }
public void setCharAt(int idx, FontCharacter fc) { font.setChar(fc, idx); }
public FontCharacter getCharAt(int index) { FontCharacter cd = (FontCharacter) font.getCharacter(index); return cd; }