Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/source/gui/CCheckBox.h
Show All 12 Lines | |||||
* | * | ||||
* You should have received a copy of the GNU General Public License | * You should have received a copy of the GNU General Public License | ||||
* along with 0 A.D. If not, see <http://www.gnu.org/licenses/>. | * along with 0 A.D. If not, see <http://www.gnu.org/licenses/>. | ||||
*/ | */ | ||||
#ifndef INCLUDED_CCHECKBOX | #ifndef INCLUDED_CCHECKBOX | ||||
#define INCLUDED_CCHECKBOX | #define INCLUDED_CCHECKBOX | ||||
#include "gui/CGUISprite.h" | |||||
#include "gui/IGUIButtonBehavior.h" | #include "gui/IGUIButtonBehavior.h" | ||||
class CCheckBox : public IGUIButtonBehavior | class CCheckBox : public IGUIButtonBehavior | ||||
{ | { | ||||
GUI_OBJECT(CCheckBox) | GUI_OBJECT(CCheckBox) | ||||
public: | public: | ||||
CCheckBox(CGUI& pGUI); | CCheckBox(CGUI& pGUI); | ||||
virtual ~CCheckBox(); | virtual ~CCheckBox(); | ||||
/** | /** | ||||
* @see IGUIObject#ResetStates() | * @see IGUIObject#ResetStates() | ||||
*/ | */ | ||||
virtual void ResetStates() { IGUIButtonBehavior::ResetStates(); } | virtual void ResetStates() { IGUIButtonBehavior::ResetStates(); } | ||||
/** | /** | ||||
* @see IGUIObject#HandleMessage() | * @see IGUIObject#HandleMessage() | ||||
*/ | */ | ||||
virtual void HandleMessage(SGUIMessage& Message); | virtual void HandleMessage(SGUIMessage& Message); | ||||
/** | /** | ||||
* Draws the control | * Draws the control | ||||
*/ | */ | ||||
virtual void Draw(); | virtual void Draw(); | ||||
protected: | |||||
// Settings | |||||
i32 m_CellID; | |||||
bool m_Checked; | |||||
CGUISpriteInstance m_SpriteUnchecked; | |||||
CGUISpriteInstance m_SpriteUncheckedOver; | |||||
CGUISpriteInstance m_SpriteUncheckedPressed; | |||||
CGUISpriteInstance m_SpriteUncheckedDisabled; | |||||
CGUISpriteInstance m_SpriteChecked; | |||||
CGUISpriteInstance m_SpriteCheckedOver; | |||||
CGUISpriteInstance m_SpriteCheckedPressed; | |||||
CGUISpriteInstance m_SpriteCheckedDisabled; | |||||
}; | }; | ||||
#endif // INCLUDED_CCHECKBOX | #endif // INCLUDED_CCHECKBOX |
Wildfire Games · Phabricator