This commit is contained in:
parent
06aa78b482
commit
8df9ff4010
8 changed files with 244 additions and 81 deletions
|
@ -107,6 +107,56 @@ void CGUIToggleButton::think(int _frames)
|
|||
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
Function:
|
||||
Purpose:
|
||||
Params:
|
||||
Returns:
|
||||
---------------------------------------------------------------------- */
|
||||
void CGUIValueButton::init(CGUIObject *_parent,GUIId _id)
|
||||
{
|
||||
CGUIToggleButton::init(_parent,_id);
|
||||
m_value=-1;
|
||||
}
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
Function:
|
||||
Purpose:
|
||||
Params:
|
||||
Returns:
|
||||
---------------------------------------------------------------------- */
|
||||
void CGUIValueButton::setButtonValue(int _value)
|
||||
{
|
||||
m_value=_value;
|
||||
}
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
Function:
|
||||
Purpose:
|
||||
Params:
|
||||
Returns:
|
||||
---------------------------------------------------------------------- */
|
||||
void CGUIValueButton::think(int _frames)
|
||||
{
|
||||
ASSERT(getTarget());
|
||||
|
||||
CGUIObject::think(_frames);
|
||||
if(isSelected())
|
||||
{
|
||||
if(PadGetRepeat(0)&PAD_CROSS)
|
||||
{
|
||||
*getTarget()=m_value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
Function:
|
||||
Purpose:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue