refined detailed info window for stats display removed PSP button for Touch interfaces (currently only iOS and Android) on deck selection screens to not break the core engine and reduce some more complex code, I created a new vector in the JController object. mButtons. This vector will contain all the valid buttons for a given screen. The appropriate Add/Remove methods have been updated to account for this new vector.
53 lines
1.2 KiB
C++
53 lines
1.2 KiB
C++
#include "PrecompiledHeader.h"
|
|
|
|
#include "SimpleMenuItem.h"
|
|
#include "Translate.h"
|
|
#include "WResourceManager.h"
|
|
|
|
|
|
SimpleMenuItem::SimpleMenuItem(int id): SimpleButton(id)
|
|
{
|
|
}
|
|
|
|
SimpleMenuItem::SimpleMenuItem(SimpleMenu* _parent, int id, int fontId, string text, float x, float y, bool hasFocus, bool autoTranslate) :
|
|
SimpleButton( _parent, id, fontId, text, x, y, hasFocus, autoTranslate)
|
|
{
|
|
parent = (SimpleMenu *) _parent;
|
|
mDescription = "";
|
|
}
|
|
|
|
void SimpleMenuItem::Entering()
|
|
{
|
|
checkUserClick();
|
|
setFocus(true);
|
|
if (getParent() != NULL)
|
|
{
|
|
SimpleMenu *menu = (SimpleMenu *) parent;
|
|
menu->selectionTargetY = getY();
|
|
}
|
|
|
|
}
|
|
|
|
|
|
/* Accessors */
|
|
string SimpleMenuItem::getDescription() const
|
|
{
|
|
return mDescription;
|
|
}
|
|
|
|
void SimpleMenuItem::setDescription( const string& desc )
|
|
{
|
|
mDescription = desc;
|
|
}
|
|
|
|
|
|
ostream& SimpleMenuItem::toString(ostream& out) const
|
|
{
|
|
return out << "SimpleMenuItem ::: mHasFocus : " << hasFocus()
|
|
<< " ; parent : " << getParent()
|
|
<< " ; mText : " << getText()
|
|
<< " ; mScale : " << getScale()
|
|
<< " ; mTargetScale : " << getTargetScale()
|
|
<< " ; mX,mY : " << getX() << "," << getY();
|
|
}
|