Mana
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members

The player status dialog. More...

#include <statuswindow.h>

Inheritance diagram for StatusWindow:
Window EventListener

Public Member Functions

 StatusWindow ()
 
void event (Event::Channel channel, const Event &event) override
 
void updateAttrs ()
 
void setPointsNeeded (int id, int needed)
 
void addAttribute (int id, const std::string &name, bool modifiable, const std::string &description)
 
void updateProgressBar (ProgressBar *bar, int id, bool percent=true)
 
- Public Member Functions inherited from Window
 Window (const std::string &caption="Window", bool modal=false, Window *parent=nullptr)
 Constructor.
 
 Window (SkinType skinType, const std::string &caption="Window", bool modal=false, Window *parent=nullptr)
 Constructor that allows customizing the SkinType used by the window.
 
 ~Window () override
 Destructor.
 
void draw (gcn::Graphics *graphics) override
 Draws the window contents.
 
void drawFrame (gcn::Graphics *graphics) override
 Draws the window frame.
 
void setContentSize (int width, int height)
 Sets the size of this window.
 
void setMinimumContentSize (int width, int height)
 Sets the minimum size of the window content.
 
void setLocationRelativeTo (gcn::Widget *widget)
 Sets the location relative to the given widget.
 
void setResizable (bool resize)
 Sets whether or not the window can be resized.
 
void redraw ()
 
void widgetResized (const gcn::Event &event) override
 Called whenever the widget changes size.
 
void widgetHidden (const gcn::Event &event) override
 Called whenever the widget is hidden.
 
void setCloseButton (bool flag)
 Sets whether or not the window has a close button.
 
bool isResizable () const
 Returns whether the window can be resized.
 
void setMinWidth (int width)
 Sets the minimum width of the window.
 
int getMinWidth () const
 
void setMinHeight (int height)
 Sets the minimum height of the window.
 
int getMinHeight () const
 
void setMaxWidth (int width)
 Sets the maximum width of the window.
 
int getMaxWidth () const
 
void setMaxHeight (int height)
 Sets the minimum height of the window.
 
int getMaxHeight () const
 
void setShowTitle (bool flag)
 Sets flag to show a title or not.
 
void setStickyButton (bool flag)
 Sets whether or not the window has a sticky button.
 
void setSticky (bool sticky)
 Sets whether the window is sticky.
 
bool isSticky () const
 Returns whether the window is sticky.
 
virtual void setVisible (bool visible)
 Overloads window setVisible by Guichan to allow sticky window handling.
 
void setVisible (bool visible, bool forceSticky)
 Overloads window setVisible by Guichan to allow sticky window handling, or not, if you force the sticky state.
 
bool isDefaultVisible () const
 Returns whether the window is visible by default.
 
void setDefaultVisible (bool save)
 Sets whether the window is visible by default.
 
bool willSaveVisible () const
 Returns whether the window will save it's visibility.
 
void setSaveVisible (bool save)
 Sets whether the window will save it's visibility.
 
WindowgetParentWindow () const
 Returns the parent window.
 
void scheduleDelete ()
 Schedule this window for deletion.
 
void mousePressed (gcn::MouseEvent &event) override
 Starts window resizing when appropriate.
 
void mouseDragged (gcn::MouseEvent &event) override
 Implements window resizing and makes sure the window is not dragged/resized outside of the screen.
 
void mouseMoved (gcn::MouseEvent &event) override
 Implements custom cursor image changing context, based on mouse relative position.
 
void mouseReleased (gcn::MouseEvent &event) override
 When the mouse button has been let go, this ensures that the mouse custom cursor is restored back to it's standard image.
 
void mouseExited (gcn::MouseEvent &event) override
 When the mouse leaves the window this ensures that the custom cursor is restored back to it's standard image.
 
void setWindowName (const std::string &name)
 Sets the name of the window.
 
const std::string & getWindowName () const
 Returns the name of the window.
 
void loadWindowState ()
 Reads the position (and the size for resizable windows) in the configuration based on the given string.
 
void saveWindowState () const
 Saves the window state so that when the window is reloaded, it'll maintain its previous state and location.
 
void setDefaultSize (int defaultX, int defaultY, int defaultWidth, int defaultHeight)
 Set the default win pos and size.
 
void setDefaultSize ()
 Set the default win pos and size to the current ones.
 
void setDefaultSize (int defaultWidth, int defaultHeight, WindowAlignment alignment, int offsetx=0, int offsetY=0)
 Set the default win pos and size.
 
virtual void resetToDefaultSize ()
 Reset the win pos and size to default.
 
void adjustPositionAfterResize (int oldScreenWidth, int oldScreenHeight)
 Adjusts the window position after the application window has been resized.
 
LayoutgetLayout ()
 Gets the layout handler for this window.
 
void clearLayout ()
 Clears the window's layout (useful for redesigning the window).
 
void reflowLayout (int w=0, int h=0)
 Computes the position of the widgets according to the current layout.
 
LayoutCellplace (int x, int y, gcn::Widget *, int w=1, int h=1)
 Adds a widget to the window and sets it at given cell.
 
ContainerPlacer getPlacer (int x, int y)
 Returns a proxy for adding widgets in an inner table of the layout.
 
void center ()
 Positions the window in the center of it's parent.
 
virtual void close ()
 Overrideable functionality for when the window is to close.
 
const SkingetSkin () const
 Returns the Skin used by this window.
 
- Public Member Functions inherited from EventListener
virtual ~EventListener ()
 
void listen (Event::Channel channel)
 
void ignore (Event::Channel channel)
 

Static Public Member Functions

static void updateHPBar (ProgressBar *bar, bool showMax=false)
 
static void updateMPBar (ProgressBar *bar, bool showMax=false)
 
static void updateXPBar (ProgressBar *bar, bool percent=true)
 
static void updateProgressBar (ProgressBar *bar, int value, int max, bool percent)
 
- Static Public Member Functions inherited from Window
static void setWindowContainer (WindowContainer *windowContainer)
 Sets the window container to be used by new windows.
 
static int getGuiAlpha ()
 Gets the alpha value used by the window, in a Guichan usable format.
 

Private Attributes

gcn::Label * mLvlLabel
 Status Part.
 
gcn::Label * mMoneyLabel
 
gcn::Label * mHpLabel
 
gcn::Label * mMpLabel
 
gcn::Label * mXpLabel
 
ProgressBarmHpBar
 
ProgressBarmMpBar
 
ProgressBarmXpBar
 
gcn::Label * mJobLvlLabel
 
gcn::Label * mJobLabel
 
ProgressBarmJobBar
 
VertContainermAttrCont
 
ScrollAreamAttrScroll
 
VertContainermDAttrCont
 
ScrollAreamDAttrScroll
 
gcn::Label * mCharacterPointsLabel
 
gcn::Label * mCorrectionPointsLabel
 
std::map< int, AttrDisplay * > mAttrs
 

Additional Inherited Members

- Static Protected Attributes inherited from Window
static int mouseResize = 0
 Active resize handles.
 

Detailed Description

The player status dialog.

Definition at line 42 of file statuswindow.h.

Constructor & Destructor Documentation

◆ StatusWindow()

StatusWindow::StatusWindow ( )

Definition at line 97 of file statuswindow.cpp.

Member Function Documentation

◆ addAttribute()

void StatusWindow::addAttribute ( int  id,
const std::string &  name,
bool  modifiable,
const std::string &  description 
)

Definition at line 322 of file statuswindow.cpp.

◆ event()

void StatusWindow::event ( Event::Channel  channel,
const Event event 
)
overridevirtual

Implements EventListener.

Definition at line 223 of file statuswindow.cpp.

◆ setPointsNeeded()

void StatusWindow::setPointsNeeded ( int  id,
int  needed 
)

Definition at line 310 of file statuswindow.cpp.

◆ updateAttrs()

void StatusWindow::updateAttrs ( )

Definition at line 302 of file statuswindow.cpp.

◆ updateHPBar()

void StatusWindow::updateHPBar ( ProgressBar bar,
bool  showMax = false 
)
static

Definition at line 342 of file statuswindow.cpp.

◆ updateMPBar()

void StatusWindow::updateMPBar ( ProgressBar bar,
bool  showMax = false 
)
static

Definition at line 361 of file statuswindow.cpp.

◆ updateProgressBar() [1/2]

void StatusWindow::updateProgressBar ( ProgressBar bar,
int  id,
bool  percent = true 
)

Definition at line 419 of file statuswindow.cpp.

◆ updateProgressBar() [2/2]

void StatusWindow::updateProgressBar ( ProgressBar bar,
int  value,
int  max,
bool  percent 
)
static

Definition at line 386 of file statuswindow.cpp.

◆ updateXPBar()

void StatusWindow::updateXPBar ( ProgressBar bar,
bool  percent = true 
)
static

Definition at line 410 of file statuswindow.cpp.

Member Data Documentation

◆ mAttrCont

VertContainer* StatusWindow::mAttrCont
private

Definition at line 75 of file statuswindow.h.

◆ mAttrs

std::map<int, AttrDisplay *> StatusWindow::mAttrs
private

Definition at line 83 of file statuswindow.h.

◆ mAttrScroll

ScrollArea* StatusWindow::mAttrScroll
private

Definition at line 76 of file statuswindow.h.

◆ mCharacterPointsLabel

gcn::Label* StatusWindow::mCharacterPointsLabel
private

Definition at line 80 of file statuswindow.h.

◆ mCorrectionPointsLabel

gcn::Label* StatusWindow::mCorrectionPointsLabel
private

Definition at line 81 of file statuswindow.h.

◆ mDAttrCont

VertContainer* StatusWindow::mDAttrCont
private

Definition at line 77 of file statuswindow.h.

◆ mDAttrScroll

ScrollArea* StatusWindow::mDAttrScroll
private

Definition at line 78 of file statuswindow.h.

◆ mHpBar

ProgressBar* StatusWindow::mHpBar
private

Definition at line 70 of file statuswindow.h.

◆ mHpLabel

gcn::Label* StatusWindow::mHpLabel
private

Definition at line 69 of file statuswindow.h.

◆ mJobBar

ProgressBar* StatusWindow::mJobBar
private

Definition at line 73 of file statuswindow.h.

◆ mJobLabel

gcn::Label * StatusWindow::mJobLabel
private

Definition at line 72 of file statuswindow.h.

◆ mJobLvlLabel

gcn::Label* StatusWindow::mJobLvlLabel
private

Definition at line 72 of file statuswindow.h.

◆ mLvlLabel

gcn::Label* StatusWindow::mLvlLabel
private

Status Part.

Definition at line 68 of file statuswindow.h.

◆ mMoneyLabel

gcn::Label * StatusWindow::mMoneyLabel
private

Definition at line 68 of file statuswindow.h.

◆ mMpBar

ProgressBar * StatusWindow::mMpBar
private

Definition at line 70 of file statuswindow.h.

◆ mMpLabel

gcn::Label * StatusWindow::mMpLabel
private

Definition at line 69 of file statuswindow.h.

◆ mXpBar

ProgressBar * StatusWindow::mXpBar
private

Definition at line 70 of file statuswindow.h.

◆ mXpLabel

gcn::Label * StatusWindow::mXpLabel
private

Definition at line 69 of file statuswindow.h.


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