ManaPlus
|
#include <emoteshortcutcontainer.h>
Public Member Functions | |
EmoteShortcutContainer (Widget2 *const widget) | |
~EmoteShortcutContainer () | |
void | draw (Graphics *graphics) |
void | safeDraw (Graphics *graphics) |
void | mouseDragged (MouseEvent &event) |
void | mousePressed (MouseEvent &event) |
void | mouseReleased (MouseEvent &event) |
void | mouseMoved (MouseEvent &event) |
void | mouseExited (MouseEvent &event) |
void | widgetHidden (const Event &event) |
void | setSkin (const Widget2 *const widget, Skin *const skin) |
Public Member Functions inherited from ShortcutContainer | |
~ShortcutContainer () | |
void | widgetResized (const Event &event) |
void | widgetMoved (const Event &event) |
void | mouseDragged (MouseEvent &event) |
void | mousePressed (MouseEvent &event) |
void | mouseReleased (MouseEvent &event) |
int | getMaxItems () const |
int | getBoxWidth () const |
int | getBoxHeight () const |
void | drawBackground (Graphics *const g) |
void | safeDrawBackground (Graphics *const g) |
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 |
virtual void | logic () |
Widget * | getParent () 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 Rect & | getDimension () 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 Color & | getBaseColor () const |
void | setForegroundColor (const Color &color) |
const Color & | getForegroundColor () const |
void | setBackgroundColor (const Color &color) |
const Color & | getBackgroundColor () const |
virtual void | requestFocus () |
virtual void | requestMoveToTop () |
virtual void | requestMoveToBottom () |
virtual void | setFocusHandler (FocusHandler *const focusHandler) |
FocusHandler * | getFocusHandler () |
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) |
Font * | getFont () 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 Widget * | getWidgetAt (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 FocusHandler * | getInternalFocusHandler () |
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 () |
virtual void | postInit () |
Public Member Functions inherited from Widget2 | |
virtual | ~Widget2 () |
const Color & | getThemeColor (const ThemeColorIdT type, const unsigned int alpha) const A_INLINE |
const Color & | getThemeCharColor (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) |
Widget * | getWindow () const |
virtual void | setWindow (Widget *const window) |
Public Member Functions inherited from WidgetListener | |
virtual | ~WidgetListener () |
virtual void | widgetShown (const Event &event) |
Public Member Functions inherited from MouseListener | |
virtual | ~MouseListener () |
virtual void | mouseEntered (MouseEvent &event) |
virtual void | mouseClicked (MouseEvent &event) |
virtual void | mouseWheelMovedUp (MouseEvent &event) |
virtual void | mouseWheelMovedDown (MouseEvent &event) |
Private Attributes | |
std::vector< const EmoteSprite * > | mEmoteImg |
bool | mEmoteClicked |
unsigned char | mEmoteMoved |
An emote shortcut container. Used to quickly use emoticons.
Definition at line 35 of file emoteshortcutcontainer.h.
|
explicit |
Constructor. Initializes the graphic.
Definition at line 54 of file emoteshortcutcontainer.cpp.
References EmoteDB::getLast(), EmoteDB::getSprite(), Settings::guiAlpha, MAX_ITEMS, ShortcutContainer::mBackgroundImg, mEmoteImg, ShortcutContainer::mMaxItems, settings, and EmoteSprite::sprite.
EmoteShortcutContainer::~EmoteShortcutContainer | ( | ) |
|
virtual |
Draws the items.
Implements Widget.
Definition at line 87 of file emoteshortcutcontainer.cpp.
References BLOCK_END, BLOCK_START, CAST_U32, Font::drawString(), InputAction::EMOTE_1, emoteShortcut, InputManager::getKeyValueString(), Settings::guiAlpha, inputManager, restrict, and settings.
|
virtual |
Handles mouse when dragged.
Reimplemented from MouseListener.
Definition at line 193 of file emoteshortcutcontainer.cpp.
|
virtual |
Called when the mouse has exited the widget area.
event | Describes the event. |
Reimplemented from MouseListener.
Definition at line 288 of file emoteshortcutcontainer.cpp.
References Widget::setVisible(), textPopup, and Visible_false.
|
virtual |
Called when the mouse has moved in the widget area and no mouse button has been pressed (i.e no widget is being dragged).
event | Describes the event. |
Reimplemented from MouseListener.
Definition at line 268 of file emoteshortcutcontainer.cpp.
References CAST_SIZE, emoteShortcut, Viewport::mMouseX, Viewport::mMouseY, restrict, Widget::setVisible(), TextPopup::show(), strprintf(), textPopup, viewport, and Visible_false.
|
virtual |
Handles mouse when pressed.
Reimplemented from MouseListener.
Definition at line 198 of file emoteshortcutcontainer.cpp.
References emoteShortcut, EmoteShortcut::getEmote(), EmoteShortcut::isEmoteSelected(), MouseButton::LEFT, popupMenu, MouseButton::RIGHT, EmoteShortcut::setEmote(), EmoteShortcut::setEmoteSelected(), and PopupMenu::showEmoteType().
|
virtual |
Handles mouse release.
Reimplemented from MouseListener.
Definition at line 235 of file emoteshortcutcontainer.cpp.
References emoteShortcut, EmoteShortcut::getEmote(), EmoteShortcut::isEmoteSelected(), MouseButton::LEFT, EmoteShortcut::setEmotes(), EmoteShortcut::setEmoteSelected(), and EmoteShortcut::useEmote().
|
virtual |
Implements Widget.
Definition at line 140 of file emoteshortcutcontainer.cpp.
References BLOCK_END, BLOCK_START, CAST_U32, Font::drawString(), InputAction::EMOTE_1, emoteShortcut, InputManager::getKeyValueString(), Settings::guiAlpha, inputManager, restrict, and settings.
Reimplemented from ShortcutContainer.
Definition at line 79 of file emoteshortcutcontainer.cpp.
References Widget2::getThemeColor(), Widget::mForegroundColor, Widget2::mForegroundColor2, ShortcutContainer::setSkin(), and QuestType::TEXT.
|
virtual |
Invoked when a widget is hidden, i.e it's set to be not visible.
event | Describes the event. |
Reimplemented from WidgetListener.
Definition at line 295 of file emoteshortcutcontainer.cpp.
References Widget::setVisible(), textPopup, and Visible_false.
|
private |
Definition at line 89 of file emoteshortcutcontainer.h.
|
private |
Definition at line 87 of file emoteshortcutcontainer.h.
Referenced by EmoteShortcutContainer().
|
private |
Definition at line 90 of file emoteshortcutcontainer.h.