1195 MUltiplayer kart selection cmmit 21
This commit is contained in:
@@ -1222,10 +1222,7 @@ void Skin::drawSpinnerBody(const core::recti &rect, Widget* widget,
|
||||
}
|
||||
}
|
||||
|
||||
BoxRenderParams& params = (focused || pressed)
|
||||
? SkinConfig::m_render_params["spinner::focused"]
|
||||
: SkinConfig::m_render_params["spinner::neutral"];
|
||||
|
||||
BoxRenderParams params;
|
||||
// defining a spinner widget to use the spinner widget class property(getBackgroundColor)
|
||||
SpinnerWidget* q = dynamic_cast<SpinnerWidget*>(widget);
|
||||
if(q->getUseBackgroundColor())
|
||||
|
||||
@@ -39,7 +39,6 @@ using namespace irr::video;
|
||||
SpinnerWidget::SpinnerWidget(const bool gauge) : Widget(WTYPE_SPINNER)
|
||||
{
|
||||
m_gauge = gauge;
|
||||
|
||||
m_listener = NULL;
|
||||
m_graphical = false;
|
||||
m_check_inside_me = true; //FIXME: not sure this is necessary
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace GUIEngine
|
||||
{
|
||||
public:
|
||||
class ISpinnerConfirmListener
|
||||
{
|
||||
{
|
||||
public:
|
||||
virtual ~ISpinnerConfirmListener() {}
|
||||
|
||||
@@ -70,9 +70,8 @@ namespace GUIEngine
|
||||
bool m_gauge;
|
||||
|
||||
//for setting background
|
||||
bool m_use_background_color;
|
||||
int m_spinner_widget_player_id;
|
||||
|
||||
// bool m_use_background_color;
|
||||
|
||||
/** \brief Whether to wrap back to the first value when going "beyond" the last value */
|
||||
bool m_wrap_around;
|
||||
|
||||
@@ -99,7 +98,8 @@ namespace GUIEngine
|
||||
irr::video::ITexture* getTexture();
|
||||
|
||||
public:
|
||||
|
||||
int m_spinner_widget_player_id;
|
||||
bool m_use_background_color;
|
||||
LEAK_CHECK()
|
||||
|
||||
SpinnerWidget(const bool gauge=false);
|
||||
@@ -110,10 +110,11 @@ namespace GUIEngine
|
||||
void clearLabels();
|
||||
|
||||
// next four functions are for background colour behind playername in multikart screen selection
|
||||
void setUseBackgroundColor() {m_use_background_color=true;}
|
||||
bool getUseBackgroundColor() {return m_use_background_color;}
|
||||
void setUseBackgroundColor() {m_use_background_color=true; }
|
||||
bool getUseBackgroundColor() {return m_use_background_color; }
|
||||
void setSpinnerWidgetPlayerID(int playerID) {m_spinner_widget_player_id=playerID;}
|
||||
int getSpinnerWidgetPlayerID() {return m_spinner_widget_player_id;}
|
||||
int getSpinnerWidgetPlayerID() {return m_spinner_widget_player_id; }
|
||||
void unsetUseBackgroundColor() {m_use_background_color=false; }
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -134,8 +134,6 @@ PlayerNameSpinner::PlayerNameSpinner(KartSelectionScreen* parent,
|
||||
m_incorrect = false;
|
||||
m_red_mark_widget = NULL;
|
||||
m_parent = parent;
|
||||
m_use_background_color = true;
|
||||
|
||||
setUseBackgroundColor();//except for multiplayer kart selection, this is false
|
||||
setSpinnerWidgetPlayerID(m_player_id);
|
||||
} // PlayerNameSpinner
|
||||
@@ -143,7 +141,7 @@ PlayerNameSpinner::PlayerNameSpinner(KartSelectionScreen* parent,
|
||||
void PlayerNameSpinner::setID(const int m_player_id)
|
||||
{
|
||||
PlayerNameSpinner::m_player_id = m_player_id;
|
||||
} // setID
|
||||
} // setID
|
||||
// ------------------------------------------------------------------------
|
||||
/** Add a red mark on the spinner to mean "invalid choice" */
|
||||
void PlayerNameSpinner::markAsIncorrect()
|
||||
@@ -179,6 +177,10 @@ void PlayerNameSpinner::markAsCorrect()
|
||||
}
|
||||
} // markAsCorrect
|
||||
|
||||
PlayerNameSpinner::~PlayerNameSpinner()
|
||||
{
|
||||
unsetUseBackgroundColor();
|
||||
}
|
||||
// ============================================================================
|
||||
|
||||
#if 0
|
||||
@@ -382,7 +384,6 @@ PlayerKartWidget::~PlayerKartWidget()
|
||||
|
||||
if (m_kart_name->getIrrlichtElement() != NULL)
|
||||
m_kart_name->getIrrlichtElement()->remove();
|
||||
|
||||
getCurrentScreen()->manualRemoveWidget(this);
|
||||
|
||||
#ifdef DEBUG
|
||||
|
||||
@@ -213,10 +213,11 @@ public:
|
||||
// ------------------------------------------------------------------------
|
||||
/** Add a red mark on the spinner to mean "invalid choice" */
|
||||
void markAsIncorrect();
|
||||
~PlayerNameSpinner();
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
/** Remove any red mark set with 'markAsIncorrect' */
|
||||
void markAsCorrect();
|
||||
void markAsCorrect();
|
||||
};
|
||||
|
||||
/** A widget representing the kart selection for a player (i.e. the player's
|
||||
|
||||
Reference in New Issue
Block a user