Peoplemon  0.1.0
Peoplemon 3 game source documentation
Public Types | Public Member Functions | List of all members
editor::component::StatBox Class Reference

Provides an inline GUI entry for stats in either EV mode or IV mode. More...

#include <StatBox.hpp>

Public Types

enum  Mode { EV , IV }
 Mode the entry is in. More...
 

Public Member Functions

 StatBox (Mode mode, bool showRandomBut=true)
 Construct a new Stat Box component. More...
 
core::pplmn::Stats currentValue () const
 Returns the current Stats value entered. More...
 
void update (const core::pplmn::Stats &value)
 Updates the GUI elements with the given value. More...
 
void notifyLevel (unsigned int level)
 Make the statbox aware of the level of the peoplemon it is editing. Used for random EV generation. More...
 
void reset ()
 Resets all stats to 0. More...
 
void pack (bl::gui::Box &container)
 Packs the GUI elements into the given container. More...
 

Detailed Description

Provides an inline GUI entry for stats in either EV mode or IV mode.

Definition at line 17 of file StatBox.hpp.

Member Enumeration Documentation

◆ Mode

Mode the entry is in.

Enumerator
EV 
IV 

Definition at line 20 of file StatBox.hpp.

Constructor & Destructor Documentation

◆ StatBox()

editor::component::StatBox::StatBox ( Mode  mode,
bool  showRandomBut = true 
)

Construct a new Stat Box component.

Parameters
modeEV or IV mode

Definition at line 35 of file StatBox.cpp.

Member Function Documentation

◆ currentValue()

core::pplmn::Stats editor::component::StatBox::currentValue ( ) const

Returns the current Stats value entered.

Definition at line 83 of file StatBox.cpp.

◆ notifyLevel()

void editor::component::StatBox::notifyLevel ( unsigned int  level)

Make the statbox aware of the level of the peoplemon it is editing. Used for random EV generation.

Parameters
levelThe current level of the peoplemon being edited

Definition at line 109 of file StatBox.cpp.

◆ pack()

void editor::component::StatBox::pack ( bl::gui::Box &  container)

Packs the GUI elements into the given container.

Parameters
containerThe container to pack into

Definition at line 111 of file StatBox.cpp.

◆ reset()

void editor::component::StatBox::reset ( )

Resets all stats to 0.

Definition at line 74 of file StatBox.cpp.

◆ update()

void editor::component::StatBox::update ( const core::pplmn::Stats value)

Updates the GUI elements with the given value.

Parameters
valueThe value to set

Definition at line 94 of file StatBox.cpp.


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