31 #include "gui/viewport.h"
55 ListBox(widget, listModel,
"shoplistbox.xml"),
58 mWarningColor(getThemeColor(
ThemeColorId::SHOP_WARNING, 255U)),
73 ListBox(widget, listModel,
"shoplistbox.xml"),
75 mShopItems(shopListModel),
76 mWarningColor(getThemeColor(
ThemeColorId::SHOP_WARNING, 255U)),
111 for (
int i = 0,
y = 0;
115 bool needDraw(
false);
120 if ((item !=
nullptr) &&
122 (mPlayerMoney < item->getPrice() &&
mPriceCheck) ||
128 backgroundColor->
a = alpha;
137 backgroundColor = &temp;
154 graphics->
setColor(*backgroundColor);
159 if ((
mShopItems !=
nullptr) && (item !=
nullptr))
164 icon->setAlpha(1.0F);
269 if (inventory ==
nullptr)
DragDropSourceT getSource() const
void drawString(Graphics *const graphics, Color col, const Color &col2, const std::string &text, const int x, const int y)
virtual void drawImage(const Image *const image, int dstX, int dstY)=0
virtual void fillRectangle(const Rect &rectangle)=0
virtual void setColor(const Color &color)
Item * getItem(const int index) const
static void showWindow(const ItemAmountWindowUsageT usage, Window *const parent, Item *const item, int maxRange, const int tag)
Color mForegroundSelectedColor2
void mouseReleased(MouseEvent &event)
void setSelected(const int selected)
virtual int getSelectionByMouse(const int y) const
Color mForegroundSelectedColor
virtual std::string getElementAt(int i)=0
virtual int getNumberOfElements()=0
MouseButtonT getButton() const
MouseEventTypeT getType() const
int getNumberOfElements()
ShopItem * at(const size_t i) const
void mouseExited(MouseEvent &event)
void draw(Graphics *const graphics)
void safeDraw(Graphics *const graphics)
void mouseReleased(MouseEvent &event)
ShopListBox(const Widget2 *const widget, ListModel *const listModel, const ShopListBoxTypeT type)
void setPlayersMoney(const int money)
void setPriceCheck(const bool check)
void mouseMoved(MouseEvent &event)
DragDropSource ::T DragDropSourceT
ServerTypeT getNetworkType()
Inventory * getInventory()
Inventory * getCartInventory()
bool isItemProtected(const int id)
#define BLOCK_START(name)
ShopListBoxType ::T ShopListBoxTypeT