2009-02-28 14:41:18 +00:00
|
|
|
/*
|
2010-06-19 08:15:18 +00:00
|
|
|
* Copyright (C) 1997-2001 Id Software, Inc.
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or (at
|
|
|
|
* your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful, but
|
|
|
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
*
|
|
|
|
* See the GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
2010-07-13 18:19:42 +00:00
|
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
|
|
|
* USA.
|
2010-06-19 08:15:18 +00:00
|
|
|
*
|
|
|
|
* =======================================================================
|
|
|
|
*
|
|
|
|
* This file implements the generic part of the menu
|
|
|
|
*
|
|
|
|
* =======================================================================
|
|
|
|
*/
|
2009-02-28 14:41:18 +00:00
|
|
|
|
|
|
|
#include <string.h>
|
|
|
|
#include <ctype.h>
|
2009-03-03 13:43:32 +00:00
|
|
|
#include "../header/client.h"
|
2010-06-19 19:21:16 +00:00
|
|
|
#include "header/qmenu.h"
|
2009-02-28 14:41:18 +00:00
|
|
|
|
2012-07-22 13:34:45 +00:00
|
|
|
static void Action_DoEnter(menuaction_s *a);
|
|
|
|
static void Action_Draw(menuaction_s *a);
|
|
|
|
static void Menu_DrawStatusBar(const char *string);
|
|
|
|
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_Draw(menulist_s *s);
|
|
|
|
static void SpinControl_DoSlide(menulist_s *s, int dir);
|
|
|
|
|
|
|
|
#define RCOLUMN_OFFSET 16
|
2009-02-28 14:41:18 +00:00
|
|
|
#define LCOLUMN_OFFSET -16
|
|
|
|
|
|
|
|
extern viddef_t viddef;
|
|
|
|
|
2012-07-22 13:34:45 +00:00
|
|
|
#define VID_WIDTH viddef.width
|
2009-02-28 14:41:18 +00:00
|
|
|
#define VID_HEIGHT viddef.height
|
|
|
|
|
2012-07-22 13:34:45 +00:00
|
|
|
void
|
|
|
|
Action_DoEnter(menuaction_s *a)
|
|
|
|
{
|
|
|
|
if (a->generic.callback)
|
|
|
|
{
|
|
|
|
a->generic.callback(a);
|
|
|
|
}
|
2009-02-28 14:41:18 +00:00
|
|
|
}
|
|
|
|
|
2012-07-22 13:34:45 +00:00
|
|
|
void
|
|
|
|
Action_Draw(menuaction_s *a)
|
|
|
|
{
|
2015-11-16 18:18:50 +00:00
|
|
|
float scale = SCR_GetMenuScale();
|
2015-10-22 10:36:41 +00:00
|
|
|
|
2012-07-22 13:34:45 +00:00
|
|
|
if (a->generic.flags & QMF_LEFT_JUSTIFY)
|
|
|
|
{
|
|
|
|
if (a->generic.flags & QMF_GRAYED)
|
|
|
|
{
|
2015-10-22 10:36:41 +00:00
|
|
|
Menu_DrawStringDark(a->generic.x + a->generic.parent->x + (LCOLUMN_OFFSET * scale),
|
2015-11-16 18:18:50 +00:00
|
|
|
a->generic.y + a->generic.parent->y, a->generic.name);
|
2012-07-22 13:34:45 +00:00
|
|
|
}
|
2010-06-19 08:15:18 +00:00
|
|
|
|
2009-02-28 14:41:18 +00:00
|
|
|
else
|
2012-07-22 13:34:45 +00:00
|
|
|
{
|
2015-10-22 10:36:41 +00:00
|
|
|
Menu_DrawString(a->generic.x + a->generic.parent->x + (LCOLUMN_OFFSET * scale),
|
2015-11-16 18:18:50 +00:00
|
|
|
a->generic.y + a->generic.parent->y, a->generic.name);
|
2012-07-22 13:34:45 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
if (a->generic.flags & QMF_GRAYED)
|
|
|
|
{
|
2015-10-22 10:36:41 +00:00
|
|
|
Menu_DrawStringR2LDark(a->generic.x + a->generic.parent->x + (LCOLUMN_OFFSET * scale),
|
2015-11-16 18:18:50 +00:00
|
|
|
a->generic.y + a->generic.parent->y, a->generic.name);
|
2012-07-22 13:34:45 +00:00
|
|
|
}
|
2010-06-19 08:15:18 +00:00
|
|
|
|
2009-02-28 14:41:18 +00:00
|
|
|
else
|
2012-07-22 13:34:45 +00:00
|
|
|
{
|
2015-10-22 10:36:41 +00:00
|
|
|
Menu_DrawStringR2L(a->generic.x + a->generic.parent->x + (LCOLUMN_OFFSET * scale),
|
2015-11-16 18:18:50 +00:00
|
|
|
a->generic.y + a->generic.parent->y, a->generic.name);
|
2012-07-22 13:34:45 +00:00
|
|
|
}
|
2009-02-28 14:41:18 +00:00
|
|
|
}
|
2010-06-19 08:15:18 +00:00
|
|
|
|
2012-07-22 13:34:45 +00:00
|
|
|
if (a->generic.ownerdraw)
|
|
|
|
{
|
|
|
|
a->generic.ownerdraw(a);
|
|
|
|
}
|
2009-02-28 14:41:18 +00:00
|
|
|
}
|
|
|
|
|
2012-07-22 13:34:45 +00:00
|
|
|
qboolean
|
|
|
|
Field_DoEnter(menufield_s *f)
|
|
|
|
{
|
|
|
|
if (f->generic.callback)
|
|
|
|
{
|
|
|
|
f->generic.callback(f);
|
2009-02-28 14:41:18 +00:00
|
|
|
return true;
|
|
|
|
}
|
2010-06-19 08:15:18 +00:00
|
|
|
|
2009-02-28 14:41:18 +00:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2012-07-22 13:34:45 +00:00
|
|
|
void
|
|
|
|
Field_Draw(menufield_s *f)
|
|
|
|
{
|
2013-05-12 18:25:00 +00:00
|
|
|
int i, n;
|
2012-07-22 13:34:45 +00:00
|
|
|
char tempbuffer[128] = "";
|
2014-06-24 17:12:48 +00:00
|
|
|
float scale = SCR_GetMenuScale();
|
2009-02-28 14:41:18 +00:00
|
|
|
|
2012-07-22 13:34:45 +00:00
|
|
|
if (f->generic.name)
|
|
|
|
{
|
|
|
|
Menu_DrawStringR2LDark(f->generic.x + f->generic.parent->x +
|
2015-10-22 10:36:41 +00:00
|
|
|
LCOLUMN_OFFSET * scale, f->generic.y + f->generic.parent->y,
|
2012-07-22 13:34:45 +00:00
|
|
|
f->generic.name);
|
|
|
|
}
|
2009-02-28 14:41:18 +00:00
|
|
|
|
2013-05-12 18:25:00 +00:00
|
|
|
n = f->visible_length + 1;
|
|
|
|
if (n > sizeof(tempbuffer))
|
2013-05-11 12:44:36 +00:00
|
|
|
{
|
2013-05-12 18:25:00 +00:00
|
|
|
n = sizeof(tempbuffer);
|
2013-05-11 12:44:36 +00:00
|
|
|
}
|
2013-05-12 18:25:00 +00:00
|
|
|
Q_strlcpy(tempbuffer, f->buffer + f->visible_offset, n);
|
2012-07-22 13:34:45 +00:00
|
|
|
|
2015-10-22 10:36:41 +00:00
|
|
|
Draw_CharScaled(f->generic.x + f->generic.parent->x + 16 * scale,
|
2014-06-24 17:12:48 +00:00
|
|
|
(f->generic.y + f->generic.parent->y - 4) * scale, 18, scale);
|
2015-10-22 10:36:41 +00:00
|
|
|
Draw_CharScaled(f->generic.x + f->generic.parent->x + 16 * scale,
|
2014-06-24 17:12:48 +00:00
|
|
|
(f->generic.y + f->generic.parent->y + 4) * scale, 24, scale);
|
2012-07-22 13:34:45 +00:00
|
|
|
|
2015-10-22 10:36:41 +00:00
|
|
|
Draw_CharScaled((f->generic.x + f->generic.parent->x + 24 * scale) + (f->visible_length * 8 * scale),
|
2015-11-16 18:18:50 +00:00
|
|
|
(f->generic.y + f->generic.parent->y - 4) * scale, 20, scale);
|
2015-10-22 10:36:41 +00:00
|
|
|
Draw_CharScaled((f->generic.x + f->generic.parent->x + 24 * scale) + (f->visible_length * 8 * scale),
|
2015-11-16 18:18:50 +00:00
|
|
|
(f->generic.y + f->generic.parent->y + 4) * scale, 26, scale);
|
2012-07-22 13:34:45 +00:00
|
|
|
|
|
|
|
for (i = 0; i < f->visible_length; i++)
|
|
|
|
{
|
2015-10-22 10:36:41 +00:00
|
|
|
Draw_CharScaled((f->generic.x + f->generic.parent->x + 24 * scale) + (i * 8 * scale),
|
2014-06-24 17:12:48 +00:00
|
|
|
(f->generic.y + f->generic.parent->y - 4) * scale, 19, scale);
|
2015-10-22 10:36:41 +00:00
|
|
|
Draw_CharScaled((f->generic.x + f->generic.parent->x + 24 * scale) + (i * 8 * scale),
|
2014-06-24 17:12:48 +00:00
|
|
|
(f->generic.y + f->generic.parent->y + 4) * scale, 25, scale);
|
2009-02-28 14:41:18 +00:00
|
|
|
}
|
|
|
|
|
2015-10-22 10:36:41 +00:00
|
|
|
Menu_DrawString(f->generic.x + f->generic.parent->x + 24 * scale,
|
2012-07-22 13:34:45 +00:00
|
|
|
f->generic.y + f->generic.parent->y, tempbuffer);
|
2009-02-28 14:41:18 +00:00
|
|
|
|
2012-07-22 13:34:45 +00:00
|
|
|
if (Menu_ItemAtCursor(f->generic.parent) == f)
|
|
|
|
{
|
2009-02-28 14:41:18 +00:00
|
|
|
int offset;
|
|
|
|
|
2012-07-22 13:34:45 +00:00
|
|
|
if (f->visible_offset)
|
|
|
|
{
|
2009-02-28 14:41:18 +00:00
|
|
|
offset = f->visible_length;
|
2012-07-22 13:34:45 +00:00
|
|
|
}
|
2010-06-19 08:15:18 +00:00
|
|
|
|
2009-02-28 14:41:18 +00:00
|
|
|
else
|
2012-07-22 13:34:45 +00:00
|
|
|
{
|
2009-02-28 14:41:18 +00:00
|
|
|
offset = f->cursor;
|
2012-07-22 13:34:45 +00:00
|
|
|
}
|
2009-02-28 14:41:18 +00:00
|
|
|
|
2012-07-22 13:34:45 +00:00
|
|
|
if (((int)(Sys_Milliseconds() / 250)) & 1)
|
|
|
|
{
|
2015-10-22 10:36:41 +00:00
|
|
|
Draw_CharScaled(
|
2015-11-16 18:18:50 +00:00
|
|
|
f->generic.x + f->generic.parent->x + 24 * scale + (offset * 8 * scale),
|
|
|
|
(f->generic.y + f->generic.parent->y) * scale, 11, scale);
|
2012-07-22 13:34:45 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-10-22 10:36:41 +00:00
|
|
|
Draw_CharScaled(
|
2015-11-16 18:18:50 +00:00
|
|
|
f->generic.x + f->generic.parent->x + 24 * scale + (offset * 8 * scale),
|
|
|
|
(f->generic.y + f->generic.parent->y) * scale, ' ', scale);
|
2009-02-28 14:41:18 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2009-03-03 10:34:25 +00:00
|
|
|
extern int keydown[];
|
|
|
|
|
2012-07-22 13:34:45 +00:00
|
|
|
qboolean
|
|
|
|
Field_Key(menufield_s *f, int key)
|
|
|
|
{
|
|
|
|
switch (key)
|
|
|
|
{
|
2010-06-19 08:15:18 +00:00
|
|
|
case K_KP_SLASH:
|
|
|
|
key = '/';
|
|
|
|
break;
|
|
|
|
case K_KP_MINUS:
|
|
|
|
key = '-';
|
|
|
|
break;
|
|
|
|
case K_KP_PLUS:
|
|
|
|
key = '+';
|
|
|
|
break;
|
|
|
|
case K_KP_HOME:
|
|
|
|
key = '7';
|
|
|
|
break;
|
|
|
|
case K_KP_UPARROW:
|
|
|
|
key = '8';
|
|
|
|
break;
|
|
|
|
case K_KP_PGUP:
|
|
|
|
key = '9';
|
|
|
|
break;
|
|
|
|
case K_KP_LEFTARROW:
|
|
|
|
key = '4';
|
|
|
|
break;
|
|
|
|
case K_KP_5:
|
|
|
|
key = '5';
|
|
|
|
break;
|
|
|
|
case K_KP_RIGHTARROW:
|
|
|
|
key = '6';
|
|
|
|
break;
|
|
|
|
case K_KP_END:
|
|
|
|
key = '1';
|
|
|
|
break;
|
|
|
|
case K_KP_DOWNARROW:
|
|
|
|
key = '2';
|
|
|
|
break;
|
|
|
|
case K_KP_PGDN:
|
|
|
|
key = '3';
|
|
|
|
break;
|
|
|
|
case K_KP_INS:
|
|
|
|
key = '0';
|
|
|
|
break;
|
|
|
|
case K_KP_DEL:
|
|
|
|
key = '.';
|
|
|
|
break;
|
2009-02-28 14:41:18 +00:00
|
|
|
}
|
|
|
|
|
2012-07-22 13:34:45 +00:00
|
|
|
if (key > 127)
|
|
|
|
{
|
2012-12-09 16:32:21 +00:00
|
|
|
return false;
|
2009-02-28 14:41:18 +00:00
|
|
|
}
|
|
|
|
|
2012-07-22 13:34:45 +00:00
|
|
|
switch (key)
|
|
|
|
{
|
2010-06-19 08:15:18 +00:00
|
|
|
case K_KP_LEFTARROW:
|
|
|
|
case K_LEFTARROW:
|
|
|
|
case K_BACKSPACE:
|
|
|
|
|
2012-07-22 13:34:45 +00:00
|
|
|
if (f->cursor > 0)
|
|
|
|
{
|
|
|
|
memmove(&f->buffer[f->cursor - 1],
|
|
|
|
&f->buffer[f->cursor],
|
|
|
|
strlen(&f->buffer[f->cursor]) + 1);
|
2010-06-19 08:15:18 +00:00
|
|
|
f->cursor--;
|
|
|
|
|
2012-07-22 13:34:45 +00:00
|
|
|
if (f->visible_offset)
|
|
|
|
{
|
2010-06-19 08:15:18 +00:00
|
|
|
f->visible_offset--;
|
|
|
|
}
|
2009-02-28 14:41:18 +00:00
|
|
|
}
|
2010-06-19 08:15:18 +00:00
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case K_KP_DEL:
|
|
|
|
case K_DEL:
|
2012-07-22 13:34:45 +00:00
|
|
|
memmove(&f->buffer[f->cursor], &f->buffer[f->cursor + 1],
|
|
|
|
strlen(&f->buffer[f->cursor + 1]) + 1);
|
2010-06-19 08:15:18 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case K_KP_ENTER:
|
|
|
|
case K_ENTER:
|
|
|
|
case K_ESCAPE:
|
|
|
|
case K_TAB:
|
2009-02-28 14:41:18 +00:00
|
|
|
return false;
|
|
|
|
|
2010-06-19 08:15:18 +00:00
|
|
|
case K_SPACE:
|
|
|
|
default:
|
|
|
|
|
2012-07-22 13:34:45 +00:00
|
|
|
if (!isdigit(key) && (f->generic.flags & QMF_NUMBERSONLY))
|
|
|
|
{
|
2010-06-19 08:15:18 +00:00
|
|
|
return false;
|
2012-07-22 13:34:45 +00:00
|
|
|
}
|
2010-06-19 08:15:18 +00:00
|
|
|
|
2012-07-22 13:34:45 +00:00
|
|
|
if (f->cursor < f->length)
|
|
|
|
{
|
2010-06-19 08:15:18 +00:00
|
|
|
f->buffer[f->cursor++] = key;
|
|
|
|
f->buffer[f->cursor] = 0;
|
2009-02-28 14:41:18 +00:00
|
|
|
|
2012-07-22 13:34:45 +00:00
|
|
|
if (f->cursor > f->visible_length)
|
|
|
|
{
|
2010-06-19 08:15:18 +00:00
|
|
|
f->visible_offset++;
|
|
|
|
}
|
2009-02-28 14:41:18 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2012-07-22 13:34:45 +00:00
|
|
|
void
|
|
|
|
Menu_AddItem(menuframework_s *menu, void *item)
|
|
|
|
{
|
|
|
|
if (menu->nitems == 0)
|
|
|
|
{
|
2009-02-28 14:41:18 +00:00
|
|
|
menu->nslots = 0;
|
2012-07-22 13:34:45 +00:00
|
|
|
}
|
2009-02-28 14:41:18 +00:00
|
|
|
|
2012-07-22 13:34:45 +00:00
|
|
|
if (menu->nitems < MAXMENUITEMS)
|
|
|
|
{
|
2009-02-28 14:41:18 +00:00
|
|
|
menu->items[menu->nitems] = item;
|
2012-07-22 13:34:45 +00:00
|
|
|
((menucommon_s *)menu->items[menu->nitems])->parent = menu;
|
2009-02-28 14:41:18 +00:00
|
|
|
menu->nitems++;
|
|
|
|
}
|
|
|
|
|
2012-07-22 13:34:45 +00:00
|
|
|
menu->nslots = Menu_TallySlots(menu);
|
2009-02-28 14:41:18 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
2010-06-19 08:15:18 +00:00
|
|
|
* This function takes the given menu, the direction, and attempts
|
|
|
|
* to adjust the menu's cursor so that it's at the next available
|
|
|
|
* slot.
|
|
|
|
*/
|
2012-07-22 13:34:45 +00:00
|
|
|
void
|
|
|
|
Menu_AdjustCursor(menuframework_s *m, int dir)
|
|
|
|
{
|
2009-02-28 14:41:18 +00:00
|
|
|
menucommon_s *citem;
|
|
|
|
|
2010-06-19 08:15:18 +00:00
|
|
|
/* see if it's in a valid spot */
|
2012-07-22 13:34:45 +00:00
|
|
|
if ((m->cursor >= 0) && (m->cursor < m->nitems))
|
|
|
|
{
|
|
|
|
if ((citem = Menu_ItemAtCursor(m)) != 0)
|
|
|
|
{
|
|
|
|
if (citem->type != MTYPE_SEPARATOR)
|
|
|
|
{
|
2009-02-28 14:41:18 +00:00
|
|
|
return;
|
2012-07-22 13:34:45 +00:00
|
|
|
}
|
2009-02-28 14:41:18 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2010-06-19 08:15:18 +00:00
|
|
|
/* it's not in a valid spot, so crawl in the direction
|
|
|
|
indicated until we find a valid spot */
|
2012-07-22 13:34:45 +00:00
|
|
|
if (dir == 1)
|
|
|
|
{
|
|
|
|
while (1)
|
|
|
|
{
|
|
|
|
citem = Menu_ItemAtCursor(m);
|
|
|
|
|
|
|
|
if (citem)
|
|
|
|
{
|
|
|
|
if (citem->type != MTYPE_SEPARATOR)
|
|
|
|
{
|
2009-02-28 14:41:18 +00:00
|
|
|
break;
|
2012-07-22 13:34:45 +00:00
|
|
|
}
|
|
|
|
}
|
2010-06-19 08:15:18 +00:00
|
|
|
|
2009-02-28 14:41:18 +00:00
|
|
|
m->cursor += dir;
|
2010-06-19 08:15:18 +00:00
|
|
|
|
2012-07-22 13:34:45 +00:00
|
|
|
if (m->cursor >= m->nitems)
|
|
|
|
{
|
2009-02-28 14:41:18 +00:00
|
|
|
m->cursor = 0;
|
2012-07-22 13:34:45 +00:00
|
|
|
}
|
2009-02-28 14:41:18 +00:00
|
|
|
}
|
2012-07-22 13:34:45 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
while (1)
|
|
|
|
{
|
|
|
|
citem = Menu_ItemAtCursor(m);
|
|
|
|
|
|
|
|
if (citem)
|
|
|
|
{
|
|
|
|
if (citem->type != MTYPE_SEPARATOR)
|
|
|
|
{
|
2009-02-28 14:41:18 +00:00
|
|
|
break;
|
2012-07-22 13:34:45 +00:00
|
|
|
}
|
|
|
|
}
|
2010-06-19 08:15:18 +00:00
|
|
|
|
2009-02-28 14:41:18 +00:00
|
|
|
m->cursor += dir;
|
2010-06-19 08:15:18 +00:00
|
|
|
|
2012-07-22 13:34:45 +00:00
|
|
|
if (m->cursor < 0)
|
|
|
|
{
|
2009-02-28 14:41:18 +00:00
|
|
|
m->cursor = m->nitems - 1;
|
2012-07-22 13:34:45 +00:00
|
|
|
}
|
2009-02-28 14:41:18 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-07-22 13:34:45 +00:00
|
|
|
void
|
|
|
|
Menu_Center(menuframework_s *menu)
|
|
|
|
{
|
2009-02-28 14:41:18 +00:00
|
|
|
int height;
|
2014-06-24 17:12:48 +00:00
|
|
|
float scale = SCR_GetMenuScale();
|
2009-02-28 14:41:18 +00:00
|
|
|
|
2012-07-22 13:34:45 +00:00
|
|
|
height = ((menucommon_s *)menu->items[menu->nitems - 1])->y;
|
2009-02-28 14:41:18 +00:00
|
|
|
height += 10;
|
|
|
|
|
2015-11-16 18:18:50 +00:00
|
|
|
menu->y = (VID_HEIGHT / scale - height) / 2;
|
2009-02-28 14:41:18 +00:00
|
|
|
}
|
|
|
|
|
2012-07-22 13:34:45 +00:00
|
|
|
void
|
|
|
|
Menu_Draw(menuframework_s *menu)
|
|
|
|
{
|
2009-02-28 14:41:18 +00:00
|
|
|
int i;
|
|
|
|
menucommon_s *item;
|
2014-06-24 17:12:48 +00:00
|
|
|
float scale = SCR_GetMenuScale();
|
2009-02-28 14:41:18 +00:00
|
|
|
|
2010-06-19 08:15:18 +00:00
|
|
|
/* draw contents */
|
2012-07-22 13:34:45 +00:00
|
|
|
for (i = 0; i < menu->nitems; i++)
|
|
|
|
{
|
|
|
|
switch (((menucommon_s *)menu->items[i])->type)
|
|
|
|
{
|
2010-06-19 08:15:18 +00:00
|
|
|
case MTYPE_FIELD:
|
2012-07-22 13:34:45 +00:00
|
|
|
Field_Draw((menufield_s *)menu->items[i]);
|
2010-06-19 08:15:18 +00:00
|
|
|
break;
|
|
|
|
case MTYPE_SLIDER:
|
2012-07-22 13:34:45 +00:00
|
|
|
Slider_Draw((menuslider_s *)menu->items[i]);
|
2010-06-19 08:15:18 +00:00
|
|
|
break;
|
|
|
|
case MTYPE_LIST:
|
2012-07-22 13:34:45 +00:00
|
|
|
MenuList_Draw((menulist_s *)menu->items[i]);
|
2010-06-19 08:15:18 +00:00
|
|
|
break;
|
|
|
|
case MTYPE_SPINCONTROL:
|
2012-07-22 13:34:45 +00:00
|
|
|
SpinControl_Draw((menulist_s *)menu->items[i]);
|
2010-06-19 08:15:18 +00:00
|
|
|
break;
|
|
|
|
case MTYPE_ACTION:
|
2012-07-22 13:34:45 +00:00
|
|
|
Action_Draw((menuaction_s *)menu->items[i]);
|
2010-06-19 08:15:18 +00:00
|
|
|
break;
|
|
|
|
case MTYPE_SEPARATOR:
|
2012-07-22 13:34:45 +00:00
|
|
|
Separator_Draw((menuseparator_s *)menu->items[i]);
|
2010-06-19 08:15:18 +00:00
|
|
|
break;
|
2009-02-28 14:41:18 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-07-22 13:34:45 +00:00
|
|
|
item = Menu_ItemAtCursor(menu);
|
2010-06-19 08:15:18 +00:00
|
|
|
|
2012-07-22 13:34:45 +00:00
|
|
|
if (item && item->cursordraw)
|
|
|
|
{
|
|
|
|
item->cursordraw(item);
|
|
|
|
}
|
|
|
|
else if (menu->cursordraw)
|
|
|
|
{
|
|
|
|
menu->cursordraw(menu);
|
|
|
|
}
|
|
|
|
else if (item && (item->type != MTYPE_FIELD))
|
|
|
|
{
|
|
|
|
if (item->flags & QMF_LEFT_JUSTIFY)
|
|
|
|
{
|
2015-10-22 10:36:41 +00:00
|
|
|
Draw_CharScaled(menu->x + (item->x / scale - 24 + item->cursor_offset) * scale,
|
|
|
|
(menu->y + item->y) * scale,
|
2015-11-16 18:18:50 +00:00
|
|
|
12 + ((int)(Sys_Milliseconds() / 250) & 1), scale);
|
2012-07-22 13:34:45 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2015-10-22 10:36:41 +00:00
|
|
|
Draw_CharScaled(menu->x + (item->cursor_offset) * scale,
|
2015-11-16 18:18:50 +00:00
|
|
|
(menu->y + item->y) * scale,
|
|
|
|
12 + ((int)(Sys_Milliseconds() / 250) & 1), scale);
|
2009-02-28 14:41:18 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-07-22 13:34:45 +00:00
|
|
|
if (item)
|
|
|
|
{
|
|
|
|
if (item->statusbarfunc)
|
|
|
|
{
|
|
|
|
item->statusbarfunc((void *)item);
|
|
|
|
}
|
2010-06-19 08:15:18 +00:00
|
|
|
|
2012-07-22 13:34:45 +00:00
|
|
|
else if (item->statusbar)
|
|
|
|
{
|
|
|
|
Menu_DrawStatusBar(item->statusbar);
|
|
|
|
}
|
2010-06-19 08:15:18 +00:00
|
|
|
|
2009-02-28 14:41:18 +00:00
|
|
|
else
|
2012-07-22 13:34:45 +00:00
|
|
|
{
|
|
|
|
Menu_DrawStatusBar(menu->statusbar);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
Menu_DrawStatusBar(menu->statusbar);
|
2009-02-28 14:41:18 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-07-22 13:34:45 +00:00
|
|
|
void
|
|
|
|
Menu_DrawStatusBar(const char *string)
|
|
|
|
{
|
2014-06-24 17:12:48 +00:00
|
|
|
float scale = SCR_GetMenuScale();
|
|
|
|
|
2012-07-22 13:34:45 +00:00
|
|
|
if (string)
|
|
|
|
{
|
|
|
|
int l = (int)strlen(string);
|
2015-11-16 18:18:50 +00:00
|
|
|
float col = (VID_WIDTH / 2) - (l*8 / 2) * scale;
|
2009-02-28 14:41:18 +00:00
|
|
|
|
2014-06-24 17:12:48 +00:00
|
|
|
Draw_Fill(0, VID_HEIGHT - 8 * scale, VID_WIDTH, 8 * scale, 4);
|
2015-10-22 12:06:48 +00:00
|
|
|
Menu_DrawString(col, VID_HEIGHT / scale - 8, string);
|
2012-07-22 13:34:45 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2014-06-24 17:12:48 +00:00
|
|
|
Draw_Fill(0, VID_HEIGHT - 8 * scale, VID_WIDTH, 8 * scale, 0);
|
2009-02-28 14:41:18 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-07-22 13:34:45 +00:00
|
|
|
void
|
|
|
|
Menu_DrawString(int x, int y, const char *string)
|
|
|
|
{
|
2009-02-28 14:41:18 +00:00
|
|
|
unsigned i;
|
2014-06-24 17:12:48 +00:00
|
|
|
float scale = SCR_GetMenuScale();
|
2009-02-28 14:41:18 +00:00
|
|
|
|
2012-07-22 13:34:45 +00:00
|
|
|
for (i = 0; i < strlen(string); i++)
|
|
|
|
{
|
2014-06-24 17:12:48 +00:00
|
|
|
Draw_CharScaled(x + i * 8 * scale, y * scale, string[i], scale);
|
2009-02-28 14:41:18 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-07-22 13:34:45 +00:00
|
|
|
void
|
|
|
|
Menu_DrawStringDark(int x, int y, const char *string)
|
|
|
|
{
|
2009-02-28 14:41:18 +00:00
|
|
|
unsigned i;
|
2014-06-24 17:12:48 +00:00
|
|
|
float scale = SCR_GetMenuScale();
|
2009-02-28 14:41:18 +00:00
|
|
|
|
2012-07-22 13:34:45 +00:00
|
|
|
for (i = 0; i < strlen(string); i++)
|
|
|
|
{
|
2014-06-24 17:12:48 +00:00
|
|
|
Draw_CharScaled(x + i * 8 * scale, y * scale, string[i] + 128, scale);
|
2009-02-28 14:41:18 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-07-22 13:34:45 +00:00
|
|
|
void
|
|
|
|
Menu_DrawStringR2L(int x, int y, const char *string)
|
|
|
|
{
|
2009-02-28 14:41:18 +00:00
|
|
|
unsigned i;
|
2014-06-24 17:12:48 +00:00
|
|
|
float scale = SCR_GetMenuScale();
|
2009-02-28 14:41:18 +00:00
|
|
|
|
2012-07-22 13:34:45 +00:00
|
|
|
for (i = 0; i < strlen(string); i++)
|
|
|
|
{
|
2014-06-24 17:12:48 +00:00
|
|
|
Draw_CharScaled(x - i * 8 * scale, y * scale, string[strlen(string) - i - 1], scale);
|
2009-02-28 14:41:18 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-07-22 13:34:45 +00:00
|
|
|
void
|
|
|
|
Menu_DrawStringR2LDark(int x, int y, const char *string)
|
|
|
|
{
|
2009-02-28 14:41:18 +00:00
|
|
|
unsigned i;
|
2014-06-24 17:12:48 +00:00
|
|
|
float scale = SCR_GetMenuScale();
|
2009-02-28 14:41:18 +00:00
|
|
|
|
2012-07-22 13:34:45 +00:00
|
|
|
for (i = 0; i < strlen(string); i++)
|
|
|
|
{
|
2014-06-24 17:12:48 +00:00
|
|
|
Draw_CharScaled(x - i * 8 * scale, y * scale, string[strlen(string) - i - 1] + 128, scale);
|
2009-02-28 14:41:18 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-07-22 13:34:45 +00:00
|
|
|
void *
|
|
|
|
Menu_ItemAtCursor(menuframework_s *m)
|
|
|
|
{
|
|
|
|
if ((m->cursor < 0) || (m->cursor >= m->nitems))
|
|
|
|
{
|
2009-02-28 14:41:18 +00:00
|
|
|
return 0;
|
2012-07-22 13:34:45 +00:00
|
|
|
}
|
2009-02-28 14:41:18 +00:00
|
|
|
|
|
|
|
return m->items[m->cursor];
|
|
|
|
}
|
|
|
|
|
2012-07-22 13:34:45 +00:00
|
|
|
qboolean
|
|
|
|
Menu_SelectItem(menuframework_s *s)
|
|
|
|
{
|
|
|
|
menucommon_s *item = (menucommon_s *)Menu_ItemAtCursor(s);
|
2009-02-28 14:41:18 +00:00
|
|
|
|
2012-07-22 13:34:45 +00:00
|
|
|
if (item)
|
|
|
|
{
|
|
|
|
switch (item->type)
|
|
|
|
{
|
2010-06-19 08:15:18 +00:00
|
|
|
case MTYPE_FIELD:
|
2012-07-22 13:34:45 +00:00
|
|
|
return Field_DoEnter((menufield_s *)item);
|
2010-06-19 08:15:18 +00:00
|
|
|
case MTYPE_ACTION:
|
2012-07-22 13:34:45 +00:00
|
|
|
Action_DoEnter((menuaction_s *)item);
|
2010-06-19 08:15:18 +00:00
|
|
|
return true;
|
|
|
|
case MTYPE_LIST:
|
|
|
|
return false;
|
|
|
|
case MTYPE_SPINCONTROL:
|
|
|
|
return false;
|
2009-02-28 14:41:18 +00:00
|
|
|
}
|
|
|
|
}
|
2010-06-19 08:15:18 +00:00
|
|
|
|
2009-02-28 14:41:18 +00:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2012-07-22 13:34:45 +00:00
|
|
|
void
|
|
|
|
Menu_SetStatusBar(menuframework_s *m, const char *string)
|
|
|
|
{
|
2009-02-28 14:41:18 +00:00
|
|
|
m->statusbar = string;
|
|
|
|
}
|
|
|
|
|
2012-07-22 13:34:45 +00:00
|
|
|
void
|
|
|
|
Menu_SlideItem(menuframework_s *s, int dir)
|
|
|
|
{
|
|
|
|
menucommon_s *item = (menucommon_s *)Menu_ItemAtCursor(s);
|
2009-02-28 14:41:18 +00:00
|
|
|
|
2012-07-22 13:34:45 +00:00
|
|
|
if (item)
|
|
|
|
{
|
|
|
|
switch (item->type)
|
|
|
|
{
|
2010-06-19 08:15:18 +00:00
|
|
|
case MTYPE_SLIDER:
|
2012-07-22 13:34:45 +00:00
|
|
|
Slider_DoSlide((menuslider_s *)item, dir);
|
2010-06-19 08:15:18 +00:00
|
|
|
break;
|
|
|
|
case MTYPE_SPINCONTROL:
|
2012-07-22 13:34:45 +00:00
|
|
|
SpinControl_DoSlide((menulist_s *)item, dir);
|
2010-06-19 08:15:18 +00:00
|
|
|
break;
|
2009-02-28 14:41:18 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-07-22 13:34:45 +00:00
|
|
|
int
|
|
|
|
Menu_TallySlots(menuframework_s *menu)
|
|
|
|
{
|
2009-02-28 14:41:18 +00:00
|
|
|
int i;
|
|
|
|
int total = 0;
|
|
|
|
|
2012-07-22 13:34:45 +00:00
|
|
|
for (i = 0; i < menu->nitems; i++)
|
|
|
|
{
|
|
|
|
if (((menucommon_s *)menu->items[i])->type == MTYPE_LIST)
|
|
|
|
{
|
2009-02-28 14:41:18 +00:00
|
|
|
int nitems = 0;
|
2012-07-22 13:34:45 +00:00
|
|
|
const char **n = ((menulist_s *)menu->items[i])->itemnames;
|
2009-02-28 14:41:18 +00:00
|
|
|
|
|
|
|
while (*n)
|
2012-07-22 13:34:45 +00:00
|
|
|
{
|
2009-02-28 14:41:18 +00:00
|
|
|
nitems++, n++;
|
2012-07-22 13:34:45 +00:00
|
|
|
}
|
2009-02-28 14:41:18 +00:00
|
|
|
|
|
|
|
total += nitems;
|
2012-07-22 13:34:45 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2009-02-28 14:41:18 +00:00
|
|
|
total++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return total;
|
|
|
|
}
|
|
|
|
|
2012-07-22 13:34:45 +00:00
|
|
|
void
|
|
|
|
MenuList_Draw(menulist_s *l)
|
|
|
|
{
|
2009-02-28 14:41:18 +00:00
|
|
|
const char **n;
|
|
|
|
int y = 0;
|
2015-11-16 18:18:50 +00:00
|
|
|
float scale = SCR_GetMenuScale();
|
2009-02-28 14:41:18 +00:00
|
|
|
|
2013-05-01 19:12:38 +00:00
|
|
|
Menu_DrawStringR2LDark(l->generic.x + l->generic.parent->x
|
2015-10-22 10:36:41 +00:00
|
|
|
+ LCOLUMN_OFFSET * scale, l->generic.y + l->generic.parent->y,
|
2012-07-22 13:34:45 +00:00
|
|
|
l->generic.name);
|
2009-02-28 14:41:18 +00:00
|
|
|
|
|
|
|
n = l->itemnames;
|
|
|
|
|
2013-05-01 19:12:38 +00:00
|
|
|
Draw_Fill(l->generic.x - 112 + l->generic.parent->x,
|
|
|
|
l->generic.parent->y + l->generic.y +
|
2012-07-22 13:34:45 +00:00
|
|
|
l->curvalue * 10 + 10, 128, 10, 16);
|
2010-06-19 08:15:18 +00:00
|
|
|
|
2012-07-22 13:34:45 +00:00
|
|
|
while (*n)
|
|
|
|
{
|
|
|
|
Menu_DrawStringR2LDark(l->generic.x + l->generic.parent->x +
|
2015-10-22 10:36:41 +00:00
|
|
|
LCOLUMN_OFFSET * scale, l->generic.y + l->generic.parent->y +
|
2012-07-22 13:34:45 +00:00
|
|
|
y + 10, *n);
|
2009-02-28 14:41:18 +00:00
|
|
|
|
|
|
|
n++;
|
|
|
|
y += 10;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-07-22 13:34:45 +00:00
|
|
|
void
|
|
|
|
Separator_Draw(menuseparator_s *s)
|
|
|
|
{
|
|
|
|
if (s->generic.name)
|
|
|
|
{
|
|
|
|
Menu_DrawStringR2LDark(s->generic.x + s->generic.parent->x,
|
|
|
|
s->generic.y + s->generic.parent->y,
|
|
|
|
s->generic.name);
|
|
|
|
}
|
2009-02-28 14:41:18 +00:00
|
|
|
}
|
|
|
|
|
2012-07-22 13:34:45 +00:00
|
|
|
void
|
|
|
|
Slider_DoSlide(menuslider_s *s, int dir)
|
|
|
|
{
|
2009-02-28 14:41:18 +00:00
|
|
|
s->curvalue += dir;
|
|
|
|
|
2012-07-22 13:34:45 +00:00
|
|
|
if (s->curvalue > s->maxvalue)
|
|
|
|
{
|
2009-02-28 14:41:18 +00:00
|
|
|
s->curvalue = s->maxvalue;
|
2012-07-22 13:34:45 +00:00
|
|
|
}
|
|
|
|
else if (s->curvalue < s->minvalue)
|
|
|
|
{
|
2009-02-28 14:41:18 +00:00
|
|
|
s->curvalue = s->minvalue;
|
2012-07-22 13:34:45 +00:00
|
|
|
}
|
2009-02-28 14:41:18 +00:00
|
|
|
|
2012-07-22 13:34:45 +00:00
|
|
|
if (s->generic.callback)
|
|
|
|
{
|
|
|
|
s->generic.callback(s);
|
|
|
|
}
|
2009-02-28 14:41:18 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#define SLIDER_RANGE 10
|
|
|
|
|
2012-07-22 13:34:45 +00:00
|
|
|
void
|
|
|
|
Slider_Draw(menuslider_s *s)
|
|
|
|
{
|
|
|
|
int i;
|
2014-06-24 17:12:48 +00:00
|
|
|
float scale = SCR_GetMenuScale();
|
2009-02-28 14:41:18 +00:00
|
|
|
|
2012-07-22 13:34:45 +00:00
|
|
|
Menu_DrawStringR2LDark(s->generic.x + s->generic.parent->x +
|
2015-10-22 10:36:41 +00:00
|
|
|
LCOLUMN_OFFSET * scale, s->generic.y + s->generic.parent->y,
|
2012-07-22 13:34:45 +00:00
|
|
|
s->generic.name);
|
2009-02-28 14:41:18 +00:00
|
|
|
|
2013-05-01 19:12:38 +00:00
|
|
|
s->range = (s->curvalue - s->minvalue) /
|
2012-07-22 13:34:45 +00:00
|
|
|
(float)(s->maxvalue - s->minvalue);
|
2009-02-28 14:41:18 +00:00
|
|
|
|
2012-07-22 13:34:45 +00:00
|
|
|
if (s->range < 0)
|
|
|
|
{
|
2009-02-28 14:41:18 +00:00
|
|
|
s->range = 0;
|
2012-07-22 13:34:45 +00:00
|
|
|
}
|
2010-06-19 08:15:18 +00:00
|
|
|
|
2012-07-22 13:34:45 +00:00
|
|
|
if (s->range > 1)
|
|
|
|
{
|
2009-02-28 14:41:18 +00:00
|
|
|
s->range = 1;
|
2012-07-22 13:34:45 +00:00
|
|
|
}
|
2010-06-19 08:15:18 +00:00
|
|
|
|
2015-10-22 10:36:41 +00:00
|
|
|
Draw_CharScaled(s->generic.x + (s->generic.parent->x + RCOLUMN_OFFSET * scale),
|
2014-06-24 17:12:48 +00:00
|
|
|
(s->generic.y + s->generic.parent->y) * scale, 128, scale);
|
2010-06-19 08:15:18 +00:00
|
|
|
|
2014-06-24 17:12:48 +00:00
|
|
|
for (i = 0; i < SLIDER_RANGE * scale; i++)
|
2012-07-22 13:34:45 +00:00
|
|
|
{
|
2015-10-22 10:36:41 +00:00
|
|
|
Draw_CharScaled((RCOLUMN_OFFSET * scale + s->generic.x + i * 8 + s->generic.parent->x + 8),
|
2014-06-24 17:12:48 +00:00
|
|
|
(s->generic.y + s->generic.parent->y) * scale, 129, scale);
|
2012-07-22 13:34:45 +00:00
|
|
|
}
|
2010-06-19 08:15:18 +00:00
|
|
|
|
2015-10-22 10:36:41 +00:00
|
|
|
Draw_CharScaled((RCOLUMN_OFFSET * scale + s->generic.x + i * 8 +
|
2014-06-24 17:12:48 +00:00
|
|
|
s->generic.parent->x + 8), (s->generic.y +
|
|
|
|
s->generic.parent->y) * scale, 130, scale);
|
2015-10-22 10:36:41 +00:00
|
|
|
Draw_CharScaled(((int)(8 + RCOLUMN_OFFSET * scale + s->generic.parent->x +
|
2014-06-24 17:12:48 +00:00
|
|
|
s->generic.x + (SLIDER_RANGE * scale - 1) * 8 * s->range)),
|
|
|
|
(s->generic.y + s->generic.parent->y) * scale, 131, scale);
|
2009-02-28 14:41:18 +00:00
|
|
|
}
|
|
|
|
|
2012-07-22 13:34:45 +00:00
|
|
|
void
|
|
|
|
SpinControl_DoSlide(menulist_s *s, int dir)
|
|
|
|
{
|
2009-02-28 14:41:18 +00:00
|
|
|
s->curvalue += dir;
|
|
|
|
|
2012-07-22 13:34:45 +00:00
|
|
|
if (s->curvalue < 0)
|
|
|
|
{
|
2009-02-28 14:41:18 +00:00
|
|
|
s->curvalue = 0;
|
2012-07-22 13:34:45 +00:00
|
|
|
}
|
|
|
|
else if (s->itemnames[s->curvalue] == 0)
|
|
|
|
{
|
2009-02-28 14:41:18 +00:00
|
|
|
s->curvalue--;
|
2012-07-22 13:34:45 +00:00
|
|
|
}
|
2009-02-28 14:41:18 +00:00
|
|
|
|
2012-07-22 13:34:45 +00:00
|
|
|
if (s->generic.callback)
|
|
|
|
{
|
|
|
|
s->generic.callback(s);
|
|
|
|
}
|
2009-02-28 14:41:18 +00:00
|
|
|
}
|
|
|
|
|
2012-07-22 13:34:45 +00:00
|
|
|
void
|
|
|
|
SpinControl_Draw(menulist_s *s)
|
|
|
|
{
|
2009-02-28 14:41:18 +00:00
|
|
|
char buffer[100];
|
2015-11-16 18:18:50 +00:00
|
|
|
float scale = SCR_GetMenuScale();
|
2009-02-28 14:41:18 +00:00
|
|
|
|
2012-07-22 13:34:45 +00:00
|
|
|
if (s->generic.name)
|
|
|
|
{
|
|
|
|
Menu_DrawStringR2LDark(s->generic.x + s->generic.parent->x +
|
2015-10-22 10:36:41 +00:00
|
|
|
LCOLUMN_OFFSET * scale, s->generic.y + s->generic.parent->y,
|
2012-07-22 13:34:45 +00:00
|
|
|
s->generic.name);
|
2009-02-28 14:41:18 +00:00
|
|
|
}
|
2010-06-19 08:15:18 +00:00
|
|
|
|
2012-07-22 13:34:45 +00:00
|
|
|
if (!strchr(s->itemnames[s->curvalue], '\n'))
|
|
|
|
{
|
2015-10-22 10:36:41 +00:00
|
|
|
Menu_DrawString(RCOLUMN_OFFSET * scale + s->generic.x +
|
2013-05-01 19:12:38 +00:00
|
|
|
s->generic.parent->x, s->generic.y +
|
2012-07-22 13:34:45 +00:00
|
|
|
s->generic.parent->y,
|
|
|
|
s->itemnames[s->curvalue]);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
strcpy(buffer, s->itemnames[s->curvalue]);
|
|
|
|
*strchr(buffer, '\n') = 0;
|
2015-10-22 10:36:41 +00:00
|
|
|
Menu_DrawString(RCOLUMN_OFFSET * scale + s->generic.x +
|
2013-05-01 19:12:38 +00:00
|
|
|
s->generic.parent->x, s->generic.y +
|
2012-07-22 13:34:45 +00:00
|
|
|
s->generic.parent->y, buffer);
|
|
|
|
strcpy(buffer, strchr(s->itemnames[s->curvalue], '\n') + 1);
|
2015-10-22 10:36:41 +00:00
|
|
|
Menu_DrawString(RCOLUMN_OFFSET * scale + s->generic.x +
|
2013-05-01 19:12:38 +00:00
|
|
|
s->generic.parent->x, s->generic.y +
|
2012-07-22 13:34:45 +00:00
|
|
|
s->generic.parent->y + 10, buffer);
|
2009-02-28 14:41:18 +00:00
|
|
|
}
|
|
|
|
}
|
2012-07-22 13:34:45 +00:00
|
|
|
|