Mana
|
A list box, meant to be used inside a scroll area. More...
#include <shoplistbox.h>
Public Member Functions | |
ShopListBox (gcn::ListModel *listModel) | |
ShopListBox (gcn::ListModel *listModel, ShopItems *shopListModel) | |
Constructor with shopitems. | |
~ShopListBox () override | |
void | draw (gcn::Graphics *graphics) override |
Draws the list box. | |
unsigned int | getRowHeight () const override |
Returns the height of a row. | |
void | setPlayersMoney (int money) |
gives information about the current player's money | |
void | adjustSize () |
Adjust List draw size. | |
void | setPriceCheck (bool check) |
Set on/off the disabling of too expensive items. | |
void | mouseMoved (gcn::MouseEvent &event) override |
Show ItemTooltip. | |
void | mouseExited (gcn::MouseEvent &event) override |
Hide ItemTooltip. | |
![]() | |
ListBox (gcn::ListModel *listModel) | |
void | draw (gcn::Graphics *graphics) override |
Draws the list box. | |
void | drawFrame (gcn::Graphics *graphics) override |
void | keyPressed (gcn::KeyEvent &keyEvent) override |
void | mousePressed (gcn::MouseEvent &mouseEvent) override |
void | mouseWheelMovedUp (gcn::MouseEvent &mouseEvent) override |
void | mouseWheelMovedDown (gcn::MouseEvent &mouseEvent) override |
void | mouseDragged (gcn::MouseEvent &event) override |
Private Attributes | |
int | mPlayerMoney = 0 |
ShopItems * | mShopItems |
Keeps another pointer to the same listModel, permitting to use the ShopItems specific functions. | |
ItemPopup * | mItemPopup |
unsigned int | mRowHeight |
Row Height. | |
bool | mPriceCheck |
A list box, meant to be used inside a scroll area.
Same as the Guichan list box except this one doesn't have a background, instead completely relying on the scroll area. It also adds selection listener functionality.
Definition at line 36 of file shoplistbox.h.
ShopListBox::ShopListBox | ( | gcn::ListModel * | listModel | ) |
Definition at line 39 of file shoplistbox.cpp.
ShopListBox::ShopListBox | ( | gcn::ListModel * | listModel, |
ShopItems * | shopListModel | ||
) |
Constructor with shopitems.
Definition at line 48 of file shoplistbox.cpp.
|
override |
Definition at line 58 of file shoplistbox.cpp.
void ShopListBox::adjustSize | ( | ) |
Adjust List draw size.
Definition at line 142 of file shoplistbox.cpp.
|
override |
Draws the list box.
Definition at line 68 of file shoplistbox.cpp.
|
inlineoverride |
Returns the height of a row.
Definition at line 56 of file shoplistbox.h.
|
override |
Hide ItemTooltip.
Definition at line 178 of file shoplistbox.cpp.
|
override |
Show ItemTooltip.
Definition at line 153 of file shoplistbox.cpp.
void ShopListBox::setPlayersMoney | ( | int | money | ) |
gives information about the current player's money
Definition at line 63 of file shoplistbox.cpp.
void ShopListBox::setPriceCheck | ( | bool | check | ) |
Set on/off the disabling of too expensive items.
(Good for selling mode.)
Definition at line 148 of file shoplistbox.cpp.
|
private |
Definition at line 93 of file shoplistbox.h.
|
private |
Definition at line 85 of file shoplistbox.h.
|
private |
Definition at line 97 of file shoplistbox.h.
|
private |
Row Height.
Definition at line 95 of file shoplistbox.h.
|
private |
Keeps another pointer to the same listModel, permitting to use the ShopItems specific functions.
Definition at line 91 of file shoplistbox.h.