1195 Multiplayer kart selection screen

This commit is contained in:
Dk 2014-03-03 23:32:43 +05:30
parent 33a5dbacfd
commit 14467e320b
13 changed files with 9 additions and 22 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

View File

@ -1233,7 +1233,6 @@ void Skin::drawSpinnerBody(const core::recti &rect, Widget* widget,
{
int player_id=q->getSpinnerWidgetPlayerID();
// printf("player id=%d",player_idd);
if(player_id==0)
params=SkinConfig::m_render_params["spinner1::neutral"];
if(player_id==1)
@ -1256,12 +1255,10 @@ void Skin::drawSpinnerBody(const core::recti &rect, Widget* widget,
if (widget->isFocusedForPlayer(0))
{
core::recti rect2 = rect;
// printf(" here ");
rect2.UpperLeftCorner.X += 2;
rect2.UpperLeftCorner.Y -= 3;
rect2.LowerRightCorner.X -= 2;
rect2.LowerRightCorner.Y += 5;
//setBackground(rect,widget,pressed,focused,1);
drawBoxFromStretchableTexture(widget, rect2,
SkinConfig::m_render_params["squareFocusHalo::neutral"]);
@ -1274,7 +1271,6 @@ void Skin::drawSpinnerBody(const core::recti &rect, Widget* widget,
rect2.UpperLeftCorner.Y -= 3;
rect2.LowerRightCorner.X -= 2;
rect2.LowerRightCorner.Y += 5;
//setBackground(rect,widget,pressed,focused,1);
drawBoxFromStretchableTexture(widget, rect2,
SkinConfig::m_render_params["squareFocusHalo2::neutral"]);

View File

@ -45,8 +45,7 @@ SpinnerWidget::SpinnerWidget(const bool gauge) : Widget(WTYPE_SPINNER)
m_check_inside_me = true; //FIXME: not sure this is necessary
m_supports_multiplayer = true;
m_value = -1;
m_backgroundcolor=0;
// background_color_image="glass_square.jpg";
m_use_background_color=false;
m_spinner_widget_player_id=-1;
m_min = 0;
@ -124,7 +123,7 @@ void SpinnerWidget::add()
m_children[0].m_id = m_children[0].m_element->getID();
m_badge_x_shift = subsize_left_arrow.getWidth();
// setBackgroundColor(); // setting background
// label
if (m_graphical)
{
@ -185,11 +184,11 @@ void SpinnerWidget::add()
void SpinnerWidget::setBackgroundColor()
{
m_backgroundcolor=1;
m_use_background_color=1;
}
int SpinnerWidget::getBackgroundColor()
{
return m_backgroundcolor;
return m_use_background_color;
}
void SpinnerWidget::setSpinnerWidgetPlayerID(int playerID)
{

View File

@ -70,7 +70,7 @@ namespace GUIEngine
bool m_gauge;
//for setting background
int m_backgroundcolor;
bool m_use_background_color;
int m_spinner_widget_player_id;
/** \brief Whether to wrap back to the first value when going "beyond" the last value */

View File

@ -135,17 +135,14 @@ PlayerNameSpinner::PlayerNameSpinner(KartSelectionScreen* parent,
m_red_mark_widget = NULL;
m_parent = parent;
m_backgroundcolor = true;
// printf("m_player_id=%d",m_player_id);
setBackgroundColor();
setBackgroundColor();//already a_use_background_color is false
setSpinnerWidgetPlayerID(m_player_id);
} // PlayerNameSpinner
}
// ------------------------------------------------------------------------
void PlayerNameSpinner::setID(const int m_player_id)
{
PlayerNameSpinner::m_player_id = m_player_id;
// printf("m_player_id=%d",m_player_id);
} // setID
// ------------------------------------------------------------------------
/** Add a red mark on the spinner to mean "invalid choice" */
@ -236,7 +233,6 @@ PlayerKartWidget::PlayerKartWidget(KartSelectionScreen* parent,
m_player_ident_spinner->m_y = player_name_y;
m_player_ident_spinner->m_w = player_name_w;
m_player_ident_spinner->m_h = player_name_h;
//m_player_ident_spinner->setBgimage(m_player_id);
if (parent->m_multiplayer && associated_player)
@ -420,13 +416,12 @@ void PlayerKartWidget::setPlayerID(const int newPlayerID)
// Change the player ID
m_player_id = newPlayerID;
// m_player_ident_spinner->setBgimage(m_player_id);
// restore previous focus, but with new player ID
if (focus != NULL) focus->setFocusForPlayer(m_player_id);
if (m_player_ident_spinner != NULL){
m_player_ident_spinner->setID(m_player_id);
//m_player_ident_spinner->setBgimage(m_player_id);
}
} // setPlayerID

View File

@ -204,10 +204,7 @@ class PlayerNameSpinner : public GUIEngine::SpinnerWidget
int m_player_id;
bool m_incorrect;
irr::gui::IGUIImage* m_red_mark_widget;
irr::gui::IGUIImage* m_red_image;
//Skin* m_background;
KartSelectionScreen* m_parent;
//virtual EventPropagation focused(const int m_playerID) ;
public: