|
Mana
|
A box showing a player character. More...
#include <playerbox.h>
Public Member Functions | |
| PlayerBox (const Being *being=nullptr) | |
| Constructor. | |
| void | setPlayer (const Being *being) |
| Sets a new player character to be displayed by this box. | |
| void | draw (gcn::Graphics *graphics) override |
| Draws the scroll area and the player. | |
Public Member Functions inherited from ScrollArea | |
| ScrollArea () | |
| Constructor that takes no content. | |
| ScrollArea (gcn::Widget *content) | |
| Constructor. | |
| ~ScrollArea () override | |
| Destructor. | |
| void | setShowButtons (bool showButtons) |
| Sets whether the scroll bar buttons are shown. | |
| void | logic () override |
| Logic function optionally adapts width or height of contents. | |
| void | draw (gcn::Graphics *graphics) override |
| Overridden to draw the frame if its size is 0. | |
| void | drawFrame (gcn::Graphics *graphics) override |
| Draws the background and border of the scroll area. | |
| void | drawChildren (gcn::Graphics *graphics) override |
| Applies clipping to the contents. | |
| void | setOpaque (bool opaque) |
| Sets whether the widget should draw its background or not. | |
| bool | isOpaque () const |
| Returns whether the widget draws its background or not. | |
| void | mouseMoved (gcn::MouseEvent &event) override |
| Called when the mouse moves in the widget area. | |
| void | mouseEntered (gcn::MouseEvent &event) override |
| Called when the mouse enteres the widget area. | |
| void | mouseExited (gcn::MouseEvent &event) override |
| Called when the mouse leaves the widget area. | |
| void | mousePressed (gcn::MouseEvent &mouseEvent) override |
| Code copied from gcn::ScrollArea::mousePressed to make it call our custom getVerticalMarkerDimension and getHorizontalMarkerDimension functions. | |
| void | mouseDragged (gcn::MouseEvent &mouseEvent) override |
| Code copied from gcn::ScrollArea::mouseDragged to make it call our custom getVerticalMarkerDimension and getHorizontalMarkerDimension functions. | |
Private Attributes | |
| const Being * | mBeing |
| The character used for display. | |
Additional Inherited Members | |
Protected Member Functions inherited from ScrollArea | |
| void | init () |
| Initializes the scroll area. | |
| void | drawBackground (gcn::Graphics *graphics) override |
| void | drawUpButton (gcn::Graphics *graphics) override |
| void | drawDownButton (gcn::Graphics *graphics) override |
| void | drawLeftButton (gcn::Graphics *graphics) override |
| void | drawRightButton (gcn::Graphics *graphics) override |
| void | drawVBar (gcn::Graphics *graphics) override |
| void | drawHBar (gcn::Graphics *graphics) override |
| void | drawVMarker (gcn::Graphics *graphics) override |
| void | drawHMarker (gcn::Graphics *graphics) override |
| void | checkPolicies () override |
| Code copied from gcn::ScrollArea::checkPolicies to make sure it takes the frame size of the content into account. | |
| gcn::Rectangle | getUpButtonDimension () |
| Shadowing these functions from gcn::ScrollArea with versions that support hiding the buttons. | |
| gcn::Rectangle | getDownButtonDimension () |
| gcn::Rectangle | getLeftButtonDimension () |
| gcn::Rectangle | getRightButtonDimension () |
| gcn::Rectangle | getVerticalBarDimension () |
| gcn::Rectangle | getHorizontalBarDimension () |
| gcn::Rectangle | getVerticalMarkerDimension () |
| Shadowing these functions from gcn::ScrollArea with versions that supports fixed-size scroll bar markers. | |
| gcn::Rectangle | getHorizontalMarkerDimension () |
Protected Attributes inherited from ScrollArea | |
| int | mX = 0 |
| int | mY = 0 |
| bool | mHasMouse = false |
| bool | mShowButtons = true |
A box showing a player character.
Definition at line 33 of file playerbox.h.
| PlayerBox::PlayerBox | ( | const Being * | being = nullptr | ) |
Constructor.
Takes the initial player character that this box should display, which defaults to NULL.
Definition at line 27 of file playerbox.cpp.
|
override |
Draws the scroll area and the player.
Definition at line 32 of file playerbox.cpp.
|
inline |
Sets a new player character to be displayed by this box.
Setting the player to NULL causes the box not to draw any character.
Definition at line 47 of file playerbox.h.
|
private |
The character used for display.
Definition at line 56 of file playerbox.h.