public static void roundPanel(Graphics g, int x, int y, int w, int h, Roundness roundness) { g.fillArc(x, y, roundness.width*2, roundness.height*2, 90, 90); g.fillRect(x+roundness.width, y, w-roundness.width*2, roundness.height); g.fillArc(x+w-roundness.width*2, y, roundness.width*2, roundness.height*2, 0, 90); g.fillRect(x, y+roundness.height, w, h-roundness.height*2); g.fillArc(x, y+h-roundness.height*2, roundness.width*2, roundness.height*2, 180, 90); g.fillRect(x+roundness.width, y+h-roundness.height, w-roundness.width*2, roundness.height); g.fillArc(x+w-roundness.width*2, y+h-roundness.height*2, roundness.width*2, roundness.height*2, 270, 90); }
@Override public void draw(Graphics g) { g.setOpacity(opacity); g.setColor(Color.BLACK); g.fillArc(RECT_X - RECT_H / 2, RECT_Y, RECT_H, RECT_H, 90, 180); g.fillRect(RECT_X, RECT_Y, RECT_W, RECT_H); g.fillArc(RECT_X + RECT_W - RECT_H / 2, RECT_Y, RECT_H, RECT_H, 270, 180); g.setColor(Color.WHITE); g.setFont(g.getFont().deriveFont(20f)); String sentence = dictionary.getText(LanguageModule.getInstance().getLanguage(), DefaultDictionary.MESSAGE_FULLSCREEN); g.drawStringShadow(sentence, RECT_X, RECT_Y, RECT_W, RECT_H, Color.BLACK); g.setOpacity(255); }
@Override public void draw(Graphics g) { g.setOpacity(opacity); g.setColor(Color.BLACK); g.fillArc(rectX-rectH/2, rectY, rectH, rectH, 90, 180); g.fillRect(rectX, rectY, rectW, rectH); g.fillArc(rectX+rectW-rectH/2, rectY, rectH, rectH, 270, 180); g.setColor(Color.WHITE); g.setFont(g.getFont().deriveFont(20f)); String sentence = dictionary.getText(LanguageModule.getInstance().getLanguage(), DefaultDictionary.MESSAGE_FULLSCREEN); g.drawStringShadow(sentence, rectX, rectY, rectW, rectH, Color.BLACK); g.setOpacity(255); }
@Override public void draw(Graphics g){ Theme theme = ThemeManager.getInstance().getTheme(); if(!mouseOver){ if (!active) { g.setColor(theme.getBaseColor()); } else { g.setColor(theme.getSelectionColor()); } } else { if (lastEvent == GUIEvent.MOUSE_LEFT_BUTTON_DOWN) { g.setColor(theme.getActiveColor()); } else { g.setColor(theme.getSelectionColor()); } } g.fillArc(x, y, style.roundness.width*2, style.roundness.height*2, 90, 90); g.fillRect(x+style.roundness.width, y, w-style.roundness.width*2, style.roundness.height); g.fillArc(x+w-style.roundness.width*2, y, style.roundness.width*2, style.roundness.height*2, 0, 90); g.fillRect(x, y+style.roundness.height, w, h-style.roundness.height); //Draw Icon drawLabel(g); }