ItemPopup::ItemPopup(gcn::Container *parent): Popup("ItemPopup", "graphics/gui/gui.xml", parent) { mItemType = ""; // Item Name mItemName = new gcn::Label(""); mItemName->setFont(gui->getBoldFont()); mItemName->setPosition(getPadding(), getPadding()); const int fontHeight = getFont()->getHeight(); // Item Description mItemDesc = new TextBox(new WordTextWrapHandler()); mItemDesc->setPosition(getPadding(), fontHeight); // Item Effect mItemEffect = new TextBox(new WordTextWrapHandler()); mItemEffect->setPosition(getPadding(), 2 * fontHeight + 2 * getPadding()); // Item Weight mItemWeight = new TextBox(new WordTextWrapHandler()); mItemWeight->setPosition(getPadding(), 3 * fontHeight + 4 * getPadding()); add(mItemName); add(mItemDesc); add(mItemEffect); add(mItemWeight); loadPopupConfiguration(); }
ItemPopup::ItemPopup(): Popup("ItemPopup") { // Item Name mItemName = new gcn::Label; mItemName->setFont(boldFont); mItemName->setPosition(getPadding(), getPadding()); const int fontHeight = getFont()->getHeight(); // Item Description mItemDesc = new TextBox; mItemDesc->setEditable(false); mItemDesc->setPosition(getPadding(), fontHeight); // Item Effect mItemEffect = new TextBox; mItemEffect->setEditable(false); mItemEffect->setPosition(getPadding(), 2 * fontHeight + 2 * getPadding()); // Item Weight mItemWeight = new TextBox; mItemWeight->setEditable(false); mItemWeight->setPosition(getPadding(), 3 * fontHeight + 4 * getPadding()); add(mItemName); add(mItemDesc); add(mItemEffect); add(mItemWeight); addMouseListener(this); loadPopupConfiguration(); }
SpeechBubble::SpeechBubble(Container *wc): Popup("Speech", "graphics/gui/speechbubble.xml", wc), mText("") { setContentSize(140, 46); mCaption = new gcn::Label(""); mCaption->setFont(gui->getBoldFont()); mSpeechBox = new TextBox(new WordTextWrapHandler()); mSpeechBox->setEditable(false); mSpeechBox->setOpaque(false); add(mCaption); add(mSpeechBox); loadPopupConfiguration(); }
SpeechBubble::SpeechBubble(): Popup("Speech", "graphics/gui/speechbubble.xml") { setContentSize(140, 46); setMinWidth(29); setMinHeight(29); mCaption = new gcn::Label; mCaption->setFont(boldFont); mSpeechBox = new TextBox; mSpeechBox->setEditable(false); mSpeechBox->setOpaque(false); mSpeechBox->setTextColor(&guiPalette->getColor(Palette::CHAT)); add(mCaption); add(mSpeechBox); loadPopupConfiguration(); }
PopupMenu::PopupMenu(MenuType type, gcn::Container *parent): Popup("PopupMenu", "graphics/gui/gui.xml", parent), mPreviousFocus(NULL), mBeing(NULL), mFloorItem(NULL), mItem(NULL), mEmote(-1), mType(type) { mModel = new LinkMappedListModel(); mMappedListBox = new MappedListBox(mModel); mMappedListBox->setPosition(getPadding(), getPadding()); mMappedListBox->setWrappingEnabled(true); mMappedListBox->setFollowingMouse(true); mMappedListBox->addActionListener(this); add(mMappedListBox); loadPopupConfiguration(); }