Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 23, 2011, 9:57:54 PM (13 years ago)
Author:
dafrick
Message:

Merging changes from tetris branch into trunk, since they are also useful, there.

Location:
code/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/modules/pong/PongScore.h

    r5781 r8108  
    2727 */
    2828
     29/**
     30    @file PongScore.h
     31    @brief Declaration of the PongScore class.
     32    @ingroup Pong
     33*/
     34
    2935#ifndef _PongScore_H__
    3036#define _PongScore_H__
     
    3339
    3440#include "tools/interfaces/Tickable.h"
     41
    3542#include "overlays/OverlayText.h"
    3643
    3744namespace orxonox
    3845{
     46
     47    /**
     48    @brief
     49        The PongScore class displays the score for a game of @ref orxonox::Pong "Pong".
     50
     51    @author
     52        Fabian 'x3n' Landau
     53
     54    @ingroup Pong
     55    */
    3956    class _PongExport PongScore : public OverlayText, public Tickable
    4057    {
     
    4360            virtual ~PongScore();
    4461
    45             virtual void tick(float dt);
     62            virtual void tick(float dt); //!< Creates and sets the caption to be displayed by the PongScore.
    4663            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    47             virtual void changedOwner();
     64            virtual void changedOwner(); //!< Is called when the owner changes.
    4865
     66            /**
     67            @brief Set whether the PongScore displays the players' names.
     68            @param value If true the players' names are displayed.
     69            */
    4970            inline void setShowName(bool value)
    5071                { this->bShowName_ = value; }
     72            /**
     73            @brief Get whether the PongScore displays the players' names.
     74            @return Returns true if the players' names are displayed, false otherwise.
     75            */
    5176            inline bool getShowName() const
    5277                { return this->bShowName_; }
    5378
     79            /**
     80            @brief Set whether the PongScore displays the players' scores.
     81            @param value If true the players' scores are displayed.
     82            */
    5483            inline void setShowScore(bool value)
    5584                { this->bShowScore_ = value; }
     85            /**
     86            @brief Get whether the PongScore displays the players' scores.
     87            @return Returns true if the players' scores are displayed, false otherwise.
     88            */
    5689            inline bool getShowScore() const
    5790                { return this->bShowScore_; }
    5891
     92            /**
     93            @brief Set whether the PongScore displays the left player.
     94            @param value If true the left player is displayed.
     95            */
    5996            inline void setShowLeftPlayer(bool value)
    6097                { this->bShowLeftPlayer_ = value; }
     98            /**
     99            @brief Get whether the PongScore displays the left player.
     100            @return Returns true if the left player is displayed, false otherwise.
     101            */
    61102            inline bool getShowLeftPlayer() const
    62103                { return this->bShowLeftPlayer_; }
    63104
     105            /**
     106            @brief Set whether the PongScore displays the right player.
     107            @param value If true the right player is displayed.
     108            */
    64109            inline void setShowRightPlayer(bool value)
    65110                { this->bShowRightPlayer_ = value; }
     111            /**
     112            @brief Get whether the PongScore displays the right player.
     113            @return Returns true if the right player is displayed, false otherwise.
     114            */
    66115            inline bool getShowRightPlayer() const
    67116                { return this->bShowRightPlayer_; }
    68117
    69118        private:
    70             Pong* owner_;
    71             bool bShowName_;
    72             bool bShowScore_;
    73             bool bShowLeftPlayer_;
    74             bool bShowRightPlayer_;
     119            Pong* owner_; //!< The Pong game that owns this PongScore.
     120            bool bShowName_; //!< Whether the names of the players are shown.
     121            bool bShowScore_; //!< Whether the score of the players is shown.
     122            bool bShowLeftPlayer_; //!< Whether the left player is shown.
     123            bool bShowRightPlayer_; //!< Whether the right player is shown.
    75124    };
    76125}
Note: See TracChangeset for help on using the changeset viewer.