Public Member Functions | |
ArmageTronPlayer_to_viewport_menuitem (uMenu *m, int v) | |
virtual REAL | SpaceRight () |
virtual void | LeftRight (int x) |
virtual void | RenderBackground () |
virtual void | Render (REAL x, REAL y, REAL alpha=1, bool selected=0) |
Private Attributes | |
int | vp |
Definition at line 731 of file gMenus.cpp.
ArmageTronPlayer_to_viewport_menuitem::ArmageTronPlayer_to_viewport_menuitem | ( | uMenu * | m, | |
int | v | |||
) | [inline] |
Definition at line 734 of file gMenus.cpp.
References uMenu::RequestSpaceBelow().
00734 : 00735 uMenuItemInt(m,"", 00736 "$viewport_assign_help", 00737 s_newViewportBelongsToPlayer[v], 00738 0,MAX_PLAYERS-1),vp(v){ 00739 m->RequestSpaceBelow(.9); 00740 }
virtual REAL ArmageTronPlayer_to_viewport_menuitem::SpaceRight | ( | ) | [inline, virtual] |
virtual void ArmageTronPlayer_to_viewport_menuitem::LeftRight | ( | int | x | ) | [inline, virtual] |
Reimplemented from uMenuItemInt.
Definition at line 744 of file gMenus.cpp.
References MAX_PLAYERS, and rViewport::SetDirectionOfCorrection().
00744 { 00745 rViewport::SetDirectionOfCorrection(vp,x); 00746 target=(target + MAX_PLAYERS + x) % MAX_PLAYERS; 00747 }
virtual void ArmageTronPlayer_to_viewport_menuitem::RenderBackground | ( | ) | [inline, virtual] |
Reimplemented from uMenuItem.
Definition at line 749 of file gMenus.cpp.
References rViewport::CorrectViewport(), rViewportConfiguration::DemonstrateViewport(), MAX_PLAYERS, MAX_VIEWPORTS, ePlayer::Name(), ePlayer::PlayerConfig(), uMenuItem::RenderBackground(), and s_newViewportBelongsToPlayer.
00749 { 00750 rViewport::CorrectViewport(vp, MAX_PLAYERS); 00751 00752 uMenuItem::RenderBackground(); 00753 00754 tString titles[MAX_VIEWPORTS]; 00755 for(int i=MAX_VIEWPORTS-1;i>=0;i--){ 00756 titles[i] << s_newViewportBelongsToPlayer[i]+1; 00757 titles[i] << " ("; 00758 titles[i] << ePlayer::PlayerConfig(s_newViewportBelongsToPlayer[i])->Name(); 00759 titles[i] << ")"; 00760 } 00761 #ifndef DEDICATED 00762 rViewportConfiguration::DemonstrateViewport(titles); 00763 #endif 00764 }
virtual void ArmageTronPlayer_to_viewport_menuitem::Render | ( | REAL | x, | |
REAL | y, | |||
REAL | alpha = 1 , |
|||
bool | selected = 0 | |||
) | [inline, virtual] |
Reimplemented from uMenuItemInt.
Definition at line 766 of file gMenus.cpp.
References uMenuItem::DisplayText(), ePlayer::PlayerConfig(), s_newViewportBelongsToPlayer, and tOutput::SetTemplateParameter().
00766 { 00767 00768 tOutput disp; 00769 00770 disp.SetTemplateParameter(1, vp +1); 00771 disp.SetTemplateParameter(2, s_newViewportBelongsToPlayer[vp]+1); 00772 disp.SetTemplateParameter(3, ePlayer::PlayerConfig(s_newViewportBelongsToPlayer[vp])->Name()); 00773 disp << "$viewport_belongs_text"; 00774 00775 DisplayText(x-.02,y,disp,selected,alpha); 00776 }
int ArmageTronPlayer_to_viewport_menuitem::vp [private] |
Definition at line 732 of file gMenus.cpp.