use of eidolons.swing.components.panels.page.info.element.TextCompDC in project Eidolons by IDemiurge.
the class HeroPanel method addComps.
private void addComps() {
add(header, "id header, pos " + X_OFFSET + " " + Y_OFFSET);
if (deityMode) {
if (deityComp == null) {
deityComp = new JLabel(hero.getDeity().getType().getIcon());
}
add(deityComp, "id dc, pos header.x+12 header.y2");
add(infoPanel, "id ip, pos header.x dc.y2");
infoPanel.setEntity(hero.getDeity());
infoPanel.refresh();
return;
}
TextCompDC xpText = new TextCompDC(null, "Level " + hero.getLevel()) {
protected Font getDefaultFont() {
return FontMaster.getFont(FONT.AVQ, 18, Font.BOLD);
}
};
add(xpText, "@id xpText, pos center_x header.y2-6");
add(new GraphicComponent(ImageManager.getValueIcon(PARAMS.XP), "Experience"), "@id xpIcon, pos 52 xpText.y2-30");
xpBar.refresh();
add(xpBar, "id xpBar, pos xpIcon.x2-2 xpText.y2-17");
add(new GraphicComponent(ImageManager.getValueIcon(PARAMS.INTEGRITY), "integrity"), "@id integrityIcon, pos 52 xpBar.y2-3");
integrityBar.refresh();
add(integrityBar, "id integrityBar, pos integrityIcon.x2-2 xpBar.y2");
TextCompDC integrityText = new TextCompDC(null, "", 16) {
protected String getText() {
return IntegrityRule.getDescription(hero);
}
};
add(integrityText, "@id integrityText, pos center_x integrityBar.y2");
// xp label
add(buffPanel, "id buffs, pos header.x integrityText.y2");
add(infoPanel, "id ip, pos header.x buffs.y2");
infoPanel.setEntity(selectedObj != null ? selectedObj : hero);
infoPanel.refresh();
add(values, "id center, pos header.x ip.y2");
}
use of eidolons.swing.components.panels.page.info.element.TextCompDC in project Eidolons by IDemiurge.
the class TavernView method addSelectionPages.
@SuppressWarnings("serial")
protected void addSelectionPages() {
// TODO background, text panel,
pages = createSelectionComponent();
pages.setData(data);
pages.refresh();
String PAGE_POS = "id pages, pos " + getPagePosX() + " " + getPagePosY();
TextCompDC patrons = new TextCompDC(VISUALS.PROP_BOX, tavern.getName() + "'s patrons", 18);
add(patrons, "id patrons, pos " + getPagePosX() + " info.y2");
CustomButton buyProvisions = new DialogueButton(VISUALS.BUTTON, "Buy Provisions", "How much supplies do you need?", "All you have", "All that " + MacroManager.getActiveParty().getSharedGold() + " can buy", "None, actually") {
protected void processChoice(Boolean waitForInput) {
if (waitForInput != null) {
tavern.buyProvisions(waitForInput);
}
}
};
add(buyProvisions, "id buyProvisions, pos 0 0");
CustomButton rentRooms = new DialogueButton(VISUALS.BUTTON, "Rent Rooms", getRentRoomsInfoText(), "Just Tonight", "As needed", "Never mind") {
protected void processChoice(Boolean waitForInput) {
if (waitForInput != null) {
tavern.rentRooms(waitForInput);
}
}
};
add(rentRooms, "id rentRooms, pos 0 buyProvisions.y2");
// perhaps a plain list instead?
add(pages, PAGE_POS);
// add Buy Provisions, Drinks and Rent Rooms
}
use of eidolons.swing.components.panels.page.info.element.TextCompDC in project Eidolons by IDemiurge.
the class PrincipleMiddlePanel method init.
public void init() {
add(new GraphicComponent(STD_IMAGES.GUARDIAN), "@pos 0 max_bottom");
add(new GraphicComponent(ImageTransformer.flipHorizontally(ImageManager.getBufferedImage(STD_IMAGES.GUARDIAN.getImage()))), "@pos max_right max_bottom");
integrityBar = new SpecialValueBar(false, PARAMS.INTEGRITY);
integrityBar.setObj(hero);
rpgDescription = new TextCompDC(null, "", 18, FONT.AVQ);
bonusTextComp = new WrappedTextComp(null, false);
bonusTextComp.setPanelSize(new Dimension(250, 170));
add(integrityBar, "@id bar, pos center_x 0");
add(bonusTextComp, "@id text, pos center_x rpg.y2");
}
use of eidolons.swing.components.panels.page.info.element.TextCompDC in project Eidolons by IDemiurge.
the class HeroSlidePanel method addControls.
protected void addControls() {
backButton = getButton(false);
forwardButton = getButton(true);
addControl(backButton, false, 0, 0);
addControl(forwardButton, true, getPanelWidth() - backButton.getImageWidth(), 0);
// TODO string in between
String text = hero.getName() + "'s " + StringMaster.getWellFormattedString(getCurrentSlideView().toString());
// if (text.length()>30) text = "";
add(new TextCompDC(null, text, 17), "pos " + CONTROLS_POS + ".x2-20 " + "0");
}
Aggregations