ManaPlus
Public Member Functions | Private Attributes
SkillListBox Class Reference

#include <skilllistbox.h>

Inheritance diagram for SkillListBox:
ListBox Widget MouseListener KeyListener Widget2

Public Member Functions

 SkillListBox (const Widget2 *const widget, SkillModel *const model)
 
 ~SkillListBox ()
 
SkillInfogetSelectedInfo () const
 
void draw (Graphics *const graphics)
 
void safeDraw (Graphics *const graphics)
 
unsigned int getRowHeight () const
 
const SkillInfogetSkillByEvent (const MouseEvent &event) const
 
void mouseMoved (MouseEvent &event)
 
void mouseDragged (MouseEvent &event)
 
void mousePressed (MouseEvent &event)
 
void mouseReleased (MouseEvent &event)
 
void mouseExited (MouseEvent &event)
 
- Public Member Functions inherited from ListBox
 ListBox (const Widget2 *const widget, ListModel *const listModel, const std::string &skin)
 
 ~ListBox ()
 
void postInit ()
 
void updateAlpha ()
 
void keyPressed (KeyEvent &event)
 
void mouseWheelMovedUp (MouseEvent &event)
 
void mouseWheelMovedDown (MouseEvent &event)
 
void mouseReleased1 (const MouseEvent &event)
 
void refocus ()
 
void setDistributeMousePressed (const bool b)
 
virtual void adjustSize ()
 
void logic ()
 
virtual int getSelectionByMouse (const int y) const
 
void setCenter (const bool b)
 
int getPressedIndex () const
 
void setRowHeight (unsigned int n)
 
int getSelected () const
 
void setSelected (const int selected)
 
void setListModel (ListModel *listModel)
 
ListModelgetListModel () const
 
bool isWrappingEnabled () const
 
void setWrappingEnabled (const bool wrappingEnabled)
 
void addSelectionListener (SelectionListener *const selectionListener)
 
void removeSelectionListener (SelectionListener *const selectionListener)
 
void distributeValueChangedEvent ()
 
- Public Member Functions inherited from Widget
 Widget (const Widget2 *const widget)
 
 ~Widget ()
 
virtual void drawFrame (Graphics *graphics)
 
virtual void safeDrawFrame (Graphics *graphics)
 
void setFrameSize (const unsigned int frameSize)
 
unsigned int getFrameSize () const
 
WidgetgetParent () const
 
void setWidth (const int width)
 
int getWidth () const
 
void setHeight (const int height)
 
int getHeight () const
 
void setSize (const int width, const int height)
 
void setX (const int x)
 
int getX () const
 
void setY (const int y)
 
int getY () const
 
void setPosition (const int x, const int y)
 
void setDimension (const Rect &dimension)
 
const RectgetDimension () const
 
void setFocusable (const bool focusable)
 
bool isFocusable () const
 
virtual bool isFocused () const
 
void setEnabled (const bool enabled)
 
bool isEnabled () const
 
void setVisible (Visible visible)
 
bool isVisible () const
 
void setBaseColor (const Color &color)
 
const ColorgetBaseColor () const
 
void setForegroundColor (const Color &color)
 
const ColorgetForegroundColor () const
 
void setBackgroundColor (const Color &color)
 
const ColorgetBackgroundColor () const
 
virtual void requestFocus ()
 
virtual void requestMoveToTop ()
 
virtual void requestMoveToBottom ()
 
virtual void setFocusHandler (FocusHandler *const focusHandler)
 
FocusHandlergetFocusHandler ()
 
void addActionListener (ActionListener *const actionListener)
 
void removeActionListener (ActionListener *const actionListener)
 
void addDeathListener (WidgetDeathListener *const deathListener)
 
void removeDeathListener (WidgetDeathListener *const deathListener)
 
void addMouseListener (MouseListener *const mouseListener)
 
void removeMouseListener (MouseListener *const mouseListener)
 
void addKeyListener (KeyListener *const keyListener)
 
void removeKeyListener (KeyListener *const keyListener)
 
void addFocusListener (FocusListener *const focusListener)
 
void removeFocusListener (FocusListener *const focusListener)
 
void addWidgetListener (WidgetListener *const widgetListener)
 
void removeWidgetListener (WidgetListener *const widgetListener)
 
void setActionEventId (const std::string &actionEventId)
 
const std::string & getActionEventId () const
 
virtual void getAbsolutePosition (int &x, int &y) const
 
virtual void setParent (Widget *parent)
 
FontgetFont () const
 
void setFont (Font *const font)
 
virtual void fontChanged ()
 
bool isTabInEnabled () const
 
void setTabInEnabled (const bool enabled)
 
bool isTabOutEnabled () const
 
void setTabOutEnabled (const bool enabled)
 
void requestModalFocus ()
 
virtual void requestModalMouseInputFocus ()
 
virtual void releaseModalFocus ()
 
virtual void releaseModalMouseInputFocus ()
 
virtual bool isModalFocused () const
 
virtual bool isModalMouseInputFocused () const
 
virtual WidgetgetWidgetAt (int x, int y)
 
const std::list< MouseListener * > & getMouseListeners () const A_CONST
 
const std::list< KeyListener * > & getKeyListeners () const A_CONST
 
const std::list< FocusListener * > & getFocusListeners () const A_CONST
 
virtual Rect getChildrenArea ()
 
virtual FocusHandlergetInternalFocusHandler ()
 
void setInternalFocusHandler (FocusHandler *const internalFocusHandler)
 
virtual void moveToTop (Widget *widget)
 
virtual void moveToBottom (Widget *widget)
 
virtual void focusNext ()
 
virtual void focusPrevious ()
 
virtual void showWidgetPart (Widget *const widget, const Rect &area)
 
void setId (const std::string &id)
 
const std::string & getId () const
 
virtual void showPart (const Rect &rectangle)
 
bool isAllowLogic () const
 
void setMouseConsume (const bool b)
 
bool isMouseConsume () const
 
void setRedraw (const bool b)
 
virtual bool isSelectable () const
 
void setSelectable (const bool selectable)
 
void windowResized ()
 
- Public Member Functions inherited from Widget2
virtual ~Widget2 ()
 
const ColorgetThemeColor (const ThemeColorIdT type, const unsigned int alpha) const A_INLINE
 
const ColorgetThemeCharColor (const signed char c, bool &valid) const A_INLINE
 
virtual void setWidget2 (const Widget2 *const widget)
 
void setPalette (int palette)
 
void checkPalette ()
 
void setForegroundColor2 (const Color &color)
 
WidgetgetWindow () const
 
virtual void setWindow (Widget *const window)
 
- Public Member Functions inherited from MouseListener
virtual ~MouseListener ()
 
virtual void mouseEntered (MouseEvent &event)
 
virtual void mouseClicked (MouseEvent &event)
 
- Public Member Functions inherited from KeyListener
virtual ~KeyListener ()
 
virtual void keyReleased (KeyEvent &event)
 

Private Attributes

SkillModelmModel
 
Color mTextColor
 
Color mTextColor2
 
Color mCooldownColor
 
int mTextPadding
 
int mSpacing
 
bool mSkillClicked
 

Additional Inherited Members

- Static Public Member Functions inherited from Widget
static void setGlobalFont (Font *const font)
 
static FontgetGloablFont ()
 
static void cleanGlobalFont ()
 
static bool widgetExists (const Widget *const widget)
 
static void distributeWindowResizeEvent ()
 
static WidgetcallPostInit (Widget *const widget)
 
- Data Fields inherited from Widget
Visible mVisible
 
- Protected Types inherited from ListBox
typedef std::list< SelectionListener * > SelectionListenerList
 
typedef SelectionListenerList::iterator SelectionListenerIterator
 
- Protected Types inherited from Widget
typedef std::list< MouseListener * > MouseListenerList
 
typedef MouseListenerList::iterator MouseListenerIterator
 
typedef std::list< KeyListener * > KeyListenerList
 
typedef KeyListenerList::iterator KeyListenerIterator
 
typedef std::list< ActionListener * > ActionListenerList
 
typedef ActionListenerList::iterator ActionListenerIterator
 
typedef std::list< WidgetDeathListener * > WidgetDeathListenerList
 
typedef WidgetDeathListenerList::iterator WidgetDeathListenerIterator
 
typedef std::list< FocusListener * > FocusListenerList
 
typedef FocusListenerList::iterator FocusListenerIterator
 
typedef std::list< WidgetListener * > WidgetListenerList
 
typedef WidgetListenerList::iterator WidgetListenerIterator
 
- Protected Member Functions inherited from Widget
void distributeActionEvent ()
 
void distributeResizedEvent ()
 
void distributeMovedEvent ()
 
void distributeHiddenEvent ()
 
void distributeShownEvent ()
 
- Protected Member Functions inherited from Widget2
 Widget2 (const Widget2 *const widget)
 
- Protected Member Functions inherited from MouseListener
 MouseListener ()
 
- Protected Member Functions inherited from KeyListener
 KeyListener ()
 
- Protected Attributes inherited from ListBox
int mSelected
 
ListModelmListModel
 
bool mWrappingEnabled
 
SelectionListenerList mSelectionListeners
 
Color mHighlightColor
 
Color mForegroundSelectedColor
 
Color mForegroundSelectedColor2
 
int mOldSelected
 
int mPadding
 
int mPressedIndex
 
unsigned int mRowHeight
 
int mItemPadding
 
SkinmSkin
 
bool mDistributeMousePressed
 
bool mCenterText
 
- Protected Attributes inherited from Widget
MouseListenerList mMouseListeners
 
KeyListenerList mKeyListeners
 
ActionListenerList mActionListeners
 
WidgetDeathListenerList mDeathListeners
 
FocusListenerList mFocusListeners
 
WidgetListenerList mWidgetListeners
 
Color mForegroundColor
 
Color mBackgroundColor
 
Color mBaseColor
 
Rect mDimension
 
std::string mActionEventId
 
std::string mId
 
FocusHandlermFocusHandler
 
FocusHandlermInternalFocusHandler
 
WidgetmParent
 
FontmCurrentFont
 
unsigned int mFrameSize
 
bool mFocusable
 
bool mTabIn
 
bool mTabOut
 
bool mEnabled
 
bool mAllowLogic
 
bool mMouseConsume
 
bool mRedraw
 
bool mSelectable
 
- Protected Attributes inherited from Widget2
int mPaletteOffset
 
WidgetmWindow
 
Color mForegroundColor2
 
- Static Protected Attributes inherited from ListBox
static float mAlpha = 1.0
 
- Static Protected Attributes inherited from Widget
static FontmGlobalFont = 0
 

Detailed Description

Definition at line 51 of file skilllistbox.h.

Constructor & Destructor Documentation

◆ SkillListBox()

SkillListBox::SkillListBox ( const Widget2 *const  widget,
SkillModel *const  model 
)
inline

Definition at line 54 of file skilllistbox.h.

55  :
56  ListBox(widget, model, "skilllistbox.xml"),
57  mModel(model),
59  mTextColor2(getThemeColor(ThemeColorId::TEXT_OUTLINE, 255U)),
61  mTextPadding(mSkin != nullptr ?
62  mSkin->getOption("textPadding", 34) : 34),
63  mSpacing(mSkin != nullptr ? mSkin->getOption("spacing", 0) : 0),
64  mSkillClicked(false)
65  {
66  mRowHeight = getFont()->getHeight() * 2 + mSpacing + 2 * mPadding;
67  mHighlightColor = getThemeColor(ThemeColorId::HIGHLIGHT, 255U);
68 
69  if (mRowHeight < 34)
70  mRowHeight = 34;
71  }
int getHeight() const
Definition: font.cpp:362
ListBox(const Widget2 *const widget, ListModel *const listModel, const std::string &skin)
Definition: listbox.cpp:89
Color mHighlightColor
Definition: listbox.h:283
unsigned int mRowHeight
Definition: listbox.h:289
int mPadding
Definition: listbox.h:287
Skin * mSkin
Definition: listbox.h:291
Color mCooldownColor
Definition: skilllistbox.h:285
SkillModel * mModel
Definition: skilllistbox.h:282
Color mTextColor2
Definition: skilllistbox.h:284
bool mSkillClicked
Definition: skilllistbox.h:288
Color mTextColor
Definition: skilllistbox.h:283
int getOption(const std::string &name) const
Definition: skin.h:106
const Color & getThemeColor(const ThemeColorIdT type, const unsigned int alpha) const A_INLINE
Definition: widget2.h:45
Font * getFont() const
Definition: widget.cpp:331
@ SKILL_COOLDOWN
Definition: sp.h:256

References Widget::getFont(), Font::getHeight(), Widget2::getThemeColor(), ListBox::mHighlightColor, ListBox::mPadding, ListBox::mRowHeight, and mSpacing.

◆ ~SkillListBox()

SkillListBox::~SkillListBox ( )
inline

Definition at line 75 of file skilllistbox.h.

76  {
78  }
#define delete2(var)
Definition: delete2.h:25

References delete2, and mModel.

Member Function Documentation

◆ draw()

void SkillListBox::draw ( Graphics *const  graphics)
inlinevirtual

Draws the list box.

Reimplemented from ListBox.

Definition at line 92 of file skilllistbox.h.

93  {
94  if (mListModel == nullptr)
95  return;
96 
97  SkillModel *const model = static_cast<SkillModel*>(mListModel);
98  updateAlpha();
99 
100  mHighlightColor.a = CAST_S32(mAlpha * 255.0F);
101  graphics->setColor(mHighlightColor);
102 
103  const int width1 = getWidth();
104  const int usableWidth = width1 - 2 * mPadding;
105 
106  // Draw filled rectangle around the selected list element
107  if (mSelected >= 0)
108  {
110  * mSelected + mPadding, usableWidth,
111  getRowHeight()));
112  }
113 
114  // Draw the list elements
115  Font *const font = getFont();
116  const int space = font->getHeight() + mSpacing;
117  const int width2 = width1 - mPadding;
118 
119  graphics->setColor(mCooldownColor);
120  for (int i = 0, y = 1 + mPadding;
121  i < model->getNumberOfElements();
122  ++i, y += getRowHeight())
123  {
124  SkillInfo *const e = model->getSkillAt(i);
125  if (e != nullptr)
126  {
127  if (e->cooldown != 0)
128  {
129  graphics->fillRectangle(Rect(mPadding, y,
130  usableWidth * 100 / e->cooldown, 10));
131  }
132  }
133  }
134 
135  for (int i = 0, y = 1 + mPadding;
136  i < model->getNumberOfElements();
137  ++i, y += getRowHeight())
138  {
139  SkillInfo *const e = model->getSkillAt(i);
140  if (e != nullptr)
141  {
142  const SkillData *const data = e->data;
143  const std::string &description = data->description;
144  graphics->drawImage(data->icon, mPadding, y);
145  font->drawString(graphics,
146  mTextColor,
147  mTextColor2,
148  data->name,
149  mTextPadding, y);
150  if (!description.empty())
151  {
152  font->drawString(graphics,
153  mTextColor,
154  mTextColor2,
155  description,
156  mTextPadding,
157  y + space);
158  }
159 
160  if (e->skillLevelWidth < 0)
161  {
162  // Add one for padding
163  e->skillLevelWidth = font->getWidth(e->skillLevel) + 1;
164  }
165 
166  font->drawString(graphics,
167  mTextColor,
168  mTextColor2,
169  e->skillLevel,
170  width2 - e->skillLevelWidth,
171  y);
172  }
173  }
174  }
#define CAST_S32
Definition: cast.h:30
unsigned int a
Definition: color.h:251
Definition: font.h:90
int getWidth(const std::string &text) const
Definition: font.cpp:334
void drawString(Graphics *const graphics, Color col, const Color &col2, const std::string &text, const int x, const int y)
Definition: font.cpp:254
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)
Definition: graphics.h:320
int mSelected
Definition: listbox.h:256
void updateAlpha()
Definition: listbox.cpp:154
ListModel * mListModel
Definition: listbox.h:261
static float mAlpha
Definition: listbox.h:292
Definition: rect.h:74
unsigned int getRowHeight() const
Definition: skilllistbox.h:181
SkillInfo * getSkillAt(const int i) const
Definition: skillmodel.cpp:39
int getNumberOfElements()
Definition: skillmodel.h:46
int getWidth() const
Definition: widget.h:221
uint32_t data
int skillLevelWidth
Definition: skillinfo.h:68
int cooldown
Definition: skillinfo.h:74
std::string skillLevel
Definition: skillinfo.h:52
SkillData * data
Definition: skillinfo.h:63

References Color::a, CAST_S32, SkillInfo::cooldown, data, SkillInfo::data, Font::drawString(), Widget::getFont(), Font::getHeight(), SkillModel::getNumberOfElements(), getRowHeight(), SkillModel::getSkillAt(), Widget::getWidth(), Font::getWidth(), ListBox::mAlpha, mCooldownColor, ListBox::mHighlightColor, ListBox::mListModel, ListBox::mPadding, ListBox::mSelected, mSpacing, mTextColor, mTextColor2, mTextPadding, SkillInfo::skillLevel, SkillInfo::skillLevelWidth, ListBox::updateAlpha(), and y.

Referenced by safeDraw().

◆ getRowHeight()

unsigned int SkillListBox::getRowHeight ( ) const
inlinevirtual

Reimplemented from ListBox.

Definition at line 181 of file skilllistbox.h.

182  { return mRowHeight; }

References ListBox::mRowHeight.

Referenced by draw(), and getSkillByEvent().

◆ getSelectedInfo()

SkillInfo* SkillListBox::getSelectedInfo ( ) const
inline

Definition at line 80 of file skilllistbox.h.

81  {
82  const int selected = getSelected();
83  if ((mListModel == nullptr) || selected < 0
84  || selected > mListModel->getNumberOfElements())
85  {
86  return nullptr;
87  }
88 
89  return static_cast<SkillModel*>(mListModel)->getSkillAt(selected);
90  }
int getSelected() const
Definition: listbox.h:168
virtual int getNumberOfElements()=0

References ListModel::getNumberOfElements(), ListBox::getSelected(), and ListBox::mListModel.

Referenced by SkillTab::getSelectedInfo().

◆ getSkillByEvent()

const SkillInfo* SkillListBox::getSkillByEvent ( const MouseEvent event) const
inline

Definition at line 184 of file skilllistbox.h.

185  {
186  const int y = (event.getY() + mPadding) / getRowHeight();
187  if (mModel == nullptr || y >= mModel->getNumberOfElements())
188  return nullptr;
189  const SkillInfo *const skill = mModel->getSkillAt(y);
190  if (skill == nullptr)
191  return nullptr;
192  return skill;
193  }
bool skill(InputEvent &event)
Definition: commands.cpp:97

References SkillModel::getNumberOfElements(), getRowHeight(), SkillModel::getSkillAt(), mModel, ListBox::mPadding, Actions::skill(), and y.

Referenced by mouseDragged(), mouseMoved(), and mousePressed().

◆ mouseDragged()

void SkillListBox::mouseDragged ( MouseEvent event)
inlinevirtual

Called when the mouse has moved and the mouse has previously been pressed on the widget.

Parameters
eventDescribes the event.

Reimplemented from ListBox.

Definition at line 213 of file skilllistbox.h.

214  {
215  if (event.getButton() == MouseButton::LEFT)
216  {
217  if (dragDrop.isEmpty())
218  {
219  if (mSkillClicked)
220  {
221  mSkillClicked = false;
222  const SkillInfo *const skill = getSkillByEvent(event);
223  if (skill == nullptr)
224  return;
227  dragDrop.setItemData(skill->toDataStr());
228  }
229  ListBox::mouseDragged(event);
230  }
231  }
232  else
233  {
234  ListBox::mouseDragged(event);
235  }
236  }
void setItem(const int item)
Definition: dragdrop.h:238
void dragSkill(const SkillInfo *const info, const DragDropSourceT source, const int tag)
Definition: dragdrop.h:152
bool isEmpty() const
Definition: dragdrop.h:196
void setItemData(const std::string &data)
Definition: dragdrop.h:78
void mouseDragged(MouseEvent &event)
Definition: listbox.cpp:355
MouseButtonT getButton() const
Definition: mouseevent.h:116
const SkillInfo * getSkillByEvent(const MouseEvent &event) const
Definition: skilllistbox.h:184
DragDrop dragDrop
const int SKILL_MIN_ID
Definition: skill.h:25

References dragDrop, DragDrop::dragSkill(), getSkillByEvent(), DragDrop::isEmpty(), MouseButton::LEFT, ListBox::mouseDragged(), mSkillClicked, DragDrop::setItem(), DragDrop::setItemData(), Actions::skill(), SKILL_MIN_ID, and DragDropSource::Skills.

◆ mouseExited()

void SkillListBox::mouseExited ( MouseEvent event)
inlinevirtual

Called when the mouse has exited the widget area.

Parameters
eventDescribes the event.

Reimplemented from MouseListener.

Definition at line 276 of file skilllistbox.h.

277  {
278  skillPopup->hide();
279  }
void hide()
Definition: popup.cpp:265
SkillPopup * skillPopup
Definition: skillpopup.cpp:42

References Popup::hide(), and skillPopup.

◆ mouseMoved()

void SkillListBox::mouseMoved ( MouseEvent event)
inlinevirtual

Called when the mouse has moved in the widget area and no mouse button has been pressed (i.e no widget is being dragged).

Parameters
eventDescribes the event.

Reimplemented from MouseListener.

Definition at line 195 of file skilllistbox.h.

196  {
197  ListBox::mouseMoved(event);
198  if ((viewport == nullptr) || !dragDrop.isEmpty())
199  return;
200 
201  const SkillInfo *const skill = getSkillByEvent(event);
202  if (skill == nullptr)
203  return;
205  skill->customSelectedLevel,
206  skill->customCastType,
207  skill->customOffsetX,
208  skill->customOffsetY);
210  viewport->mMouseY);
211  }
virtual void mouseMoved(MouseEvent &event)
void position(const int x, const int y)
Definition: popup.cpp:235
void show(const SkillInfo *const skill, const int level, const CastTypeT type, const int offsetX, const int offsetY)
Definition: skillpopup.cpp:106
int mMouseX
Definition: viewport.h:154
int mMouseY
Definition: viewport.h:155
Viewport * viewport
Definition: viewport.cpp:36

References dragDrop, getSkillByEvent(), DragDrop::isEmpty(), Viewport::mMouseX, Viewport::mMouseY, MouseListener::mouseMoved(), Popup::position(), SkillPopup::show(), Actions::skill(), skillPopup, and viewport.

◆ mousePressed()

void SkillListBox::mousePressed ( MouseEvent event)
inlinevirtual

Called when a mouse button has been pressed on the widget area.

NOTE: A mouse press is NOT equal to a mouse click. Use mouseClickMessage to check for mouse clicks.

Parameters
eventDescribes the event.

Reimplemented from ListBox.

Definition at line 238 of file skilllistbox.h.

239  {
240  ListBox::mousePressed(event);
241  const MouseButtonT button = event.getButton();
242  if (button == MouseButton::LEFT ||
243  button == MouseButton::RIGHT)
244  {
245  const SkillInfo *const skill = getSkillByEvent(event);
246  if (skill == nullptr)
247  return;
248  event.consume();
249  mSkillClicked = true;
250  SkillModel *const model = static_cast<SkillModel*>(
251  mListModel);
252  if ((model != nullptr) &&
253  mSelected >= 0 &&
254  model->getSkillAt(mSelected) == skill)
255  {
256  skillPopup->hide();
257  if (button == MouseButton::LEFT &&
258  event.getX() >
259  getWidth() - mPadding - skill->skillLevelWidth)
260  {
262  }
263  else if (button == MouseButton::RIGHT)
264  {
266  }
267  }
268  }
269  }
void mousePressed(MouseEvent &event)
Definition: listbox.cpp:304
int getX() const
Definition: mouseevent.h:127
void showSkillLevelPopup(const SkillInfo *const info)
Definition: popupmenu.cpp:2356
void showSkillPopup(const SkillInfo *const info)
Definition: popupmenu.cpp:2263
MouseButton ::T MouseButtonT
Definition: mousebutton.h:78
PopupMenu * popupMenu
Definition: popupmenu.cpp:103

References SkillModel::getSkillAt(), getSkillByEvent(), Widget::getWidth(), Popup::hide(), MouseButton::LEFT, ListBox::mListModel, ListBox::mousePressed(), ListBox::mPadding, ListBox::mSelected, mSkillClicked, popupMenu, MouseButton::RIGHT, PopupMenu::showSkillLevelPopup(), PopupMenu::showSkillPopup(), Actions::skill(), and skillPopup.

◆ mouseReleased()

void SkillListBox::mouseReleased ( MouseEvent event)
inlinevirtual

Called when a mouse button has been released on the widget area.

Parameters
eventDescribes the event.

Reimplemented from ListBox.

Definition at line 271 of file skilllistbox.h.

272  {
273  ListBox::mouseReleased(event);
274  }
void mouseReleased(MouseEvent &event)
Definition: listbox.cpp:311

References ListBox::mouseReleased().

◆ safeDraw()

void SkillListBox::safeDraw ( Graphics *const  graphics)
inlinevirtual

Reimplemented from ListBox.

Definition at line 176 of file skilllistbox.h.

177  {
178  SkillListBox::draw(graphics);
179  }
void draw(Graphics *const graphics)
Definition: skilllistbox.h:92

References draw().

Field Documentation

◆ mCooldownColor

Color SkillListBox::mCooldownColor
private

Definition at line 285 of file skilllistbox.h.

Referenced by draw().

◆ mModel

SkillModel* SkillListBox::mModel
private

Definition at line 282 of file skilllistbox.h.

Referenced by getSkillByEvent(), and ~SkillListBox().

◆ mSkillClicked

bool SkillListBox::mSkillClicked
private

Definition at line 288 of file skilllistbox.h.

Referenced by mouseDragged(), and mousePressed().

◆ mSpacing

int SkillListBox::mSpacing
private

Definition at line 287 of file skilllistbox.h.

Referenced by draw(), and SkillListBox().

◆ mTextColor

Color SkillListBox::mTextColor
private

Definition at line 283 of file skilllistbox.h.

Referenced by draw().

◆ mTextColor2

Color SkillListBox::mTextColor2
private

Definition at line 284 of file skilllistbox.h.

Referenced by draw().

◆ mTextPadding

int SkillListBox::mTextPadding
private

Definition at line 286 of file skilllistbox.h.

Referenced by draw().


The documentation for this class was generated from the following file: