mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-22 12:41:21 +00:00
qmenu aufgeräumt
This commit is contained in:
parent
4095d26cb6
commit
ca7ab15c1c
1 changed files with 4 additions and 40 deletions
|
@ -26,12 +26,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
static void Action_DoEnter( menuaction_s *a );
|
||||
static void Action_Draw( menuaction_s *a );
|
||||
static void Menu_DrawStatusBar( const char *string );
|
||||
//static void Menulist_DoEnter( menulist_s *l );
|
||||
static void MenuList_Draw( menulist_s *l );
|
||||
static void Separator_Draw( menuseparator_s *s );
|
||||
static void Slider_DoSlide( menuslider_s *s, int dir );
|
||||
static void Slider_Draw( menuslider_s *s );
|
||||
//static void SpinControl_DoEnter( menulist_s *s );
|
||||
static void SpinControl_Draw( menulist_s *s );
|
||||
static void SpinControl_DoSlide( menulist_s *s, int dir );
|
||||
|
||||
|
@ -43,13 +41,7 @@ extern viddef_t viddef;
|
|||
|
||||
#define VID_WIDTH viddef.width
|
||||
#define VID_HEIGHT viddef.height
|
||||
|
||||
#ifdef QMAX
|
||||
#define Draw_Char(x,y,z) re.DrawChar((x),(y),(z),1)
|
||||
#else
|
||||
#define Draw_Char re.DrawChar
|
||||
#endif
|
||||
|
||||
#define Draw_Fill re.DrawFill
|
||||
|
||||
void Action_DoEnter( menuaction_s *a )
|
||||
|
@ -136,10 +128,10 @@ void Field_Draw( menufield_s *f )
|
|||
}
|
||||
}
|
||||
|
||||
extern int keydown[];
|
||||
|
||||
qboolean Field_Key( menufield_s *f, int key )
|
||||
{
|
||||
extern int keydown[];
|
||||
|
||||
switch ( key )
|
||||
{
|
||||
case K_KP_SLASH:
|
||||
|
@ -209,7 +201,7 @@ qboolean Field_Key( menufield_s *f, int key )
|
|||
strtok( cbd, "\n\r\b" );
|
||||
|
||||
strncpy( f->buffer, cbd, f->length - 1 );
|
||||
f->cursor = strlen( f->buffer );
|
||||
f->cursor = (int)strlen( f->buffer );
|
||||
f->visible_offset = f->cursor - f->visible_length;
|
||||
if ( f->visible_offset < 0 )
|
||||
f->visible_offset = 0;
|
||||
|
@ -422,7 +414,7 @@ void Menu_DrawStatusBar( const char *string )
|
|||
{
|
||||
if ( string )
|
||||
{
|
||||
int l = strlen( string );
|
||||
int l = (int)strlen( string );
|
||||
int maxcol = VID_WIDTH / 8;
|
||||
int col = maxcol / 2 - l / 2;
|
||||
|
||||
|
@ -497,10 +489,8 @@ qboolean Menu_SelectItem( menuframework_s *s )
|
|||
Action_DoEnter( ( menuaction_s * ) item );
|
||||
return true;
|
||||
case MTYPE_LIST:
|
||||
// Menulist_DoEnter( ( menulist_s * ) item );
|
||||
return false;
|
||||
case MTYPE_SPINCONTROL:
|
||||
// SpinControl_DoEnter( ( menulist_s * ) item );
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -556,20 +546,6 @@ int Menu_TallySlots( menuframework_s *menu )
|
|||
return total;
|
||||
}
|
||||
|
||||
#if 0 // unused
|
||||
void Menulist_DoEnter( menulist_s *l )
|
||||
{
|
||||
int start;
|
||||
|
||||
start = l->generic.y / 10 + 1;
|
||||
|
||||
l->curvalue = l->generic.parent->cursor - start;
|
||||
|
||||
if ( l->generic.callback )
|
||||
l->generic.callback( l );
|
||||
}
|
||||
#endif
|
||||
|
||||
void MenuList_Draw( menulist_s *l )
|
||||
{
|
||||
const char **n;
|
||||
|
@ -631,18 +607,6 @@ void Slider_Draw( menuslider_s *s )
|
|||
Draw_Char( ( int ) ( 8 + RCOLUMN_OFFSET + s->generic.parent->x + s->generic.x + (SLIDER_RANGE-1)*8 * s->range ), s->generic.y + s->generic.parent->y, 131);
|
||||
}
|
||||
|
||||
#if 0 // unused
|
||||
void SpinControl_DoEnter( menulist_s *s )
|
||||
{
|
||||
s->curvalue++;
|
||||
if ( s->itemnames[s->curvalue] == 0 )
|
||||
s->curvalue = 0;
|
||||
|
||||
if ( s->generic.callback )
|
||||
s->generic.callback( s );
|
||||
}
|
||||
#endif
|
||||
|
||||
void SpinControl_DoSlide( menulist_s *s, int dir )
|
||||
{
|
||||
s->curvalue += dir;
|
||||
|
|
Loading…
Reference in a new issue