#include <uMenu.h>
Public Member Functions | |
uMenuItemSelection (uMenu *m, const tOutput &tit, const tOutput &help, T &targ) | |
~uMenuItemSelection () | |
void | Clear () |
void | NewChoice (uSelectItem< T > *c) |
void | NewChoice (const tOutput &desc, const tOutput &help, T val) |
virtual void | LeftRight (int lr) |
virtual void | Render (REAL x, REAL y, REAL alpha=1, bool selected=0) |
virtual tString | Help () |
Protected Attributes | |
tList< uSelectItem< T > > | choices |
tOutput | title |
int | select |
T * | target |
Definition at line 242 of file uMenu.h.
uMenuItemSelection< T >::uMenuItemSelection | ( | uMenu * | m, | |
const tOutput & | tit, | |||
const tOutput & | help, | |||
T & | targ | |||
) | [inline] |
uMenuItemSelection< T >::~uMenuItemSelection | ( | ) | [inline] |
void uMenuItemSelection< T >::Clear | ( | void | ) | [inline] |
Definition at line 265 of file uMenu.h.
Referenced by uMenuItemSelection< bool >::~uMenuItemSelection().
00265 { 00266 for(int i=choices.Len()-1;i>=0;i--){ 00267 uSelectItem<T> *x=choices(i); 00268 choices.Remove(x,x->idnum); 00269 delete x; 00270 } 00271 select=0; 00272 }
void uMenuItemSelection< T >::NewChoice | ( | uSelectItem< T > * | c | ) | [inline] |
Reimplemented in uMenuItemToggle.
Definition at line 274 of file uMenu.h.
Referenced by ArmageTron_feature_menuitem::ArmageTron_feature_menuitem(), ArmageTron_texmode_menuitem::ArmageTron_texmode_menuitem(), gResMenEntry::gResMenEntry(), gGameSettings::Menu(), uMenuItemSelection< bool >::NewChoice(), PasswordCallback(), sg_LanguageMenu(), sg_PlayerMenu(), uMenuItemToggle::uMenuItemToggle(), and uSelectEntry< Vote >::uSelectEntry().
void uMenuItemSelection< T >::NewChoice | ( | const tOutput & | desc, | |
const tOutput & | help, | |||
T | val | |||
) | [inline] |
Definition at line 278 of file uMenu.h.
00278 { 00279 uSelectItem<T> *x=new uSelectItem<T>(desc,help,val); 00280 NewChoice(x); 00281 }
virtual void uMenuItemSelection< T >::LeftRight | ( | int | lr | ) | [inline, virtual] |
virtual void uMenuItemSelection< T >::Render | ( | REAL | x, | |
REAL | y, | |||
REAL | alpha = 1 , |
|||
bool | selected = 0 | |||
) | [inline, virtual] |
Reimplemented from uMenuItem.
Definition at line 293 of file uMenu.h.
00293 { 00294 for(int i=choices.Len()-1;i>=0;i--) 00295 if (choices(i)->value==*target) 00296 select=i; 00297 00298 DisplayText(REAL(x-.02),y,title,selected,alpha,1); 00299 if (choices.Len()>0) 00300 DisplayText(REAL(x+.02),y,choices(select)->description,selected,alpha,-1); 00301 }
virtual tString uMenuItemSelection< T >::Help | ( | ) | [inline, virtual] |
tList<uSelectItem<T> > uMenuItemSelection< T >::choices [protected] |
Definition at line 244 of file uMenu.h.
Referenced by uMenuItemSelection< bool >::Clear(), uMenuItemSelection< bool >::Help(), uMenuItemSelection< bool >::LeftRight(), uMenuItemSelection< bool >::NewChoice(), and uMenuItemSelection< bool >::Render().
tOutput uMenuItemSelection< T >::title [protected] |
Definition at line 245 of file uMenu.h.
Referenced by uMenuItemSelection< bool >::Render(), eVoteItem::UpdateMenuItem(), and eVoteItem::~eVoteItem().
int uMenuItemSelection< T >::select [protected] |
Definition at line 246 of file uMenu.h.
Referenced by uMenuItemSelection< bool >::Clear(), uMenuItemSelection< bool >::Help(), uMenuItemSelection< bool >::LeftRight(), and uMenuItemSelection< bool >::Render().
T* uMenuItemSelection< T >::target [protected] |
Definition at line 247 of file uMenu.h.
Referenced by uMenuItemSelection< bool >::LeftRight(), and uMenuItemSelection< bool >::Render().