34static const int MAX_ITEMS = 12;
56 const char *key = SDL_GetKeyName(
59 g->drawText(key, state.
x + 2, state.
y + 2, gcn::Graphics::LEFT);
66 image->setAlpha(1.0f);
67 g->drawImage(image, state.
x + 2, state.
y + 10);
77 image->setAlpha(1.0f);
79 const int tPosX =
mCursorPosX - (image->getWidth() / 2);
80 const int tPosY =
mCursorPosY - (image->getHeight() / 2);
82 g->drawImage(image, tPosX, tPosY);
89 if (event.getButton() == gcn::MouseEvent::LEFT)
133 if (event.getButton() == gcn::MouseEvent::LEFT)
void mousePressed(gcn::MouseEvent &event) override
Handles mouse when pressed.
void draw(gcn::Graphics *graphics) override
Draws the items.
void mouseReleased(gcn::MouseEvent &event) override
Handles mouse release.
void mouseDragged(gcn::MouseEvent &event) override
Handles mouse when dragged.
void useEmote(int index)
Try to use the Emote specified by the index.
void setEmoteSelected(int emoteId)
Set the Emote that is selected.
bool isEmoteSelected() const
A flag to check if the Emote is selected.
void removeEmote(int index)
Remove a Emote from the shortcut.
int getEmote(int index) const
Returns the shortcut Emote ID specified by the index.
void setEmote(int index)
Adds the selected emote ID to the emotes specified by the index.
void setEmotes(int index, int emoteId)
Adds a emoticon to the emotes store specified by the index.
A central point of control for graphics.
void setColor(const gcn::Color &color) override
Theme * getTheme() const
The global GUI theme.
int getKeyValue(int index) const
Obtain the value stored in memory.
int getIndexFromGrid(int pointX, int pointY) const
Gets the index from the grid provided the point is in an item box.
static const gcn::Color & getThemeColor(int type)
Gets the color associated with the type in the default palette (0).
EmoteShortcut * emoteShortcut
const Emote & get(int id)