YAPOG  0.0.1
Yet Another Pokemon Online Game
ycl::BattleInfoWidget Class Reference

#include <BattleInfoWidget.hpp>

Inheritance diagram for ycl::BattleInfoWidget:
Collaboration diagram for ycl::BattleInfoWidget:

List of all members.

Public Member Functions

 BattleInfoWidget (const yap::Padding &widgetPadding)
virtual void Init ()
void UpdateHPColor (int value)
void UpdateHPSize (int value)
virtual void HandleDraw (yap::IDrawingContext &context)
virtual yap::Vector2 HandleGetSize () const
Setters.
void SetName (const yap::String &value)
void SetLevel (int value)
void SetGender (const yap::Gender &value)
- Public Member Functions inherited from ycl::BaseBattleWidget
 BaseBattleWidget ()
virtual bool IsFocusable () const
- Public Member Functions inherited from yap::BaseWidget
 BaseWidget ()
virtual ~BaseWidget ()
virtual void AddDrawable (IDrawable &drawable)
virtual void AddChild (IWidget &child)
virtual void FrontAddChild (IWidget &child)
virtual void RemoveChild (IWidget &child)
virtual IWidgetGetRoot () const
virtual void SetDefaultColor (const sf::Color &color)
virtual void SetParent (IWidget &parent)
virtual void SetPadding (const Padding &padding)
virtual void SetBackground (WidgetBackground &background)
virtual void SetBorder (WidgetBorder &border, uint width)
virtual void SetBorder (WidgetBorder &border)
virtual void UnsetBackground ()
virtual void UnsetBorder ()
Vector2 GetUserSize () const
virtual void SetToTop ()
virtual void SetEnable (bool enable)
virtual void Open ()
virtual void Close ()
virtual const Vector2GetPosition () const
 Gets the coordinates in pixels of the origin of this ISpatial from the global origin.
virtual const Vector2GetSize () const
 Gets the size in pixels of this ISpatial.
virtual const Vector2GetTopLeft () const
virtual const Vector2GetBottomRight () const
virtual const Vector2GetCenter () const
virtual const sf::FloatRect & GetRectangle () const
virtual WidgetBorderGetBorder () const
virtual void Move (const Vector2 &offset)
virtual void Scale (const Vector2 &factor)
virtual void SetPosition (const Vector2 &position)
virtual void SetSize (const Vector2 &size)
virtual void Draw (IDrawingContext &context)
virtual bool IsVisible () const
virtual void Show (bool isVisible)
virtual void ChangeColor (const sf::Color &color)
virtual bool OnEvent (const GuiEvent &guiEvent)
 Treats an event. Transferts the event before treating it.
virtual bool OnPriorityEvent (const GuiEvent &guiEvent)
 Treats an event. Treats the event before transfering it.
virtual void Update (const Time &dt)
 Makes the object evolve for one frame of the game.
- Public Member Functions inherited from yap::IWidget
virtual ~IWidget ()
- Public Member Functions inherited from yap::ISpatial
virtual ~ISpatial ()
- Public Member Functions inherited from yap::IDrawable
virtual ~IDrawable ()
- Public Member Functions inherited from yap::IEventHandler
virtual ~IEventHandler ()
- Public Member Functions inherited from yap::IUpdateable
virtual ~IUpdateable ()

Protected Attributes

Labels.
yap::Label nameLabel_
yap::Label levelLabel_
Layouts.
yap::VerticalLayout battleInfoBox_
yap::HorizontalLayout firstLine_
yap::HorizontalLayout nameBox_
yap::HorizontalLayout levelAndGenderBox_
yap::VerticalLayout levelBox_
yap::HorizontalLayout genderBox_
Picture boxes.
yap::PictureBoxhpBarPictureBox_
yap::PictureBoxhpBarContent_
yap::PictureBoxgenderPictureBox_

Static Protected Attributes

static const sf::Color DEFAULT_HP_COLOR_GOOD
static const sf::Color DEFAULT_HP_COLOR_MEDIUM
static const sf::Color DEFAULT_HP_COLOR_BAD
static const float MAX_HP_BAR_SIZE = 145.f

Private Member Functions

 DISALLOW_COPY (BattleInfoWidget)

Additional Inherited Members

- Protected Member Functions inherited from ycl::BaseBattleWidget
virtual void HandleMove (const yap::Vector2 &offset)
virtual void HandleScale (const yap::Vector2 &factor)
virtual void HandleShow (bool isVisible)
virtual void HandleChangeColor (const sf::Color &color)
virtual void HandleUpdate (const yap::Time &dt)
- Protected Member Functions inherited from yap::BaseWidget
void RefreshBorder ()
virtual void SetFocused (bool state)
virtual void Refresh ()
virtual bool HandleOnEvent (const GuiEvent &guiEvent)
virtual bool HandleOnPriorityEvent (const GuiEvent &guiEvent)

Detailed Description

Definition at line 20 of file BattleInfoWidget.hpp.


Constructor & Destructor Documentation

ycl::BattleInfoWidget::BattleInfoWidget ( const yap::Padding widgetPadding)

Definition at line 24 of file BattleInfoWidget.cpp.


Member Function Documentation

ycl::BattleInfoWidget::DISALLOW_COPY ( BattleInfoWidget  )
private
void ycl::BattleInfoWidget::HandleDraw ( yap::IDrawingContext context)
virtual

Reimplemented from ycl::BaseBattleWidget.

Definition at line 162 of file BattleInfoWidget.cpp.

yap::Vector2 ycl::BattleInfoWidget::HandleGetSize ( ) const
virtual

Reimplemented from yap::BaseWidget.

Definition at line 166 of file BattleInfoWidget.cpp.

Here is the call graph for this function:

void ycl::BattleInfoWidget::Init ( )
virtual

Borders.

Reimplemented in ycl::PokemonBattleInfoWidget, and ycl::OpponentBattleInfoWidget.

Definition at line 45 of file BattleInfoWidget.cpp.

Here is the call graph for this function:

void ycl::BattleInfoWidget::SetGender ( const yap::Gender &  value)

Definition at line 146 of file BattleInfoWidget.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void ycl::BattleInfoWidget::SetLevel ( int  value)

Definition at line 141 of file BattleInfoWidget.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void ycl::BattleInfoWidget::SetName ( const yap::String value)

Definition at line 136 of file BattleInfoWidget.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void ycl::BattleInfoWidget::UpdateHPColor ( int  value)

Definition at line 103 of file BattleInfoWidget.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

void ycl::BattleInfoWidget::UpdateHPSize ( int  value)

Definition at line 127 of file BattleInfoWidget.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

yap::VerticalLayout ycl::BattleInfoWidget::battleInfoBox_
protected

Definition at line 51 of file BattleInfoWidget.hpp.

const sf::Color ycl::BattleInfoWidget::DEFAULT_HP_COLOR_BAD
staticprotected

Definition at line 68 of file BattleInfoWidget.hpp.

const sf::Color ycl::BattleInfoWidget::DEFAULT_HP_COLOR_GOOD
staticprotected

Definition at line 66 of file BattleInfoWidget.hpp.

const sf::Color ycl::BattleInfoWidget::DEFAULT_HP_COLOR_MEDIUM
staticprotected

Definition at line 67 of file BattleInfoWidget.hpp.

yap::HorizontalLayout ycl::BattleInfoWidget::firstLine_
protected

Definition at line 52 of file BattleInfoWidget.hpp.

yap::HorizontalLayout ycl::BattleInfoWidget::genderBox_
protected

Definition at line 56 of file BattleInfoWidget.hpp.

yap::PictureBox* ycl::BattleInfoWidget::genderPictureBox_
protected

Definition at line 63 of file BattleInfoWidget.hpp.

yap::PictureBox* ycl::BattleInfoWidget::hpBarContent_
protected

Definition at line 62 of file BattleInfoWidget.hpp.

yap::PictureBox* ycl::BattleInfoWidget::hpBarPictureBox_
protected

Definition at line 61 of file BattleInfoWidget.hpp.

yap::HorizontalLayout ycl::BattleInfoWidget::levelAndGenderBox_
protected

Definition at line 54 of file BattleInfoWidget.hpp.

yap::VerticalLayout ycl::BattleInfoWidget::levelBox_
protected

Definition at line 55 of file BattleInfoWidget.hpp.

yap::Label ycl::BattleInfoWidget::levelLabel_
protected

Definition at line 46 of file BattleInfoWidget.hpp.

const float ycl::BattleInfoWidget::MAX_HP_BAR_SIZE = 145.f
staticprotected

Definition at line 69 of file BattleInfoWidget.hpp.

yap::HorizontalLayout ycl::BattleInfoWidget::nameBox_
protected

Definition at line 53 of file BattleInfoWidget.hpp.

yap::Label ycl::BattleInfoWidget::nameLabel_
protected

Definition at line 45 of file BattleInfoWidget.hpp.


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