当前位置: 首页>>代码示例>>C++>>正文


C++ UI_DrawString函数代码示例

本文整理汇总了C++中UI_DrawString函数的典型用法代码示例。如果您正苦于以下问题:C++ UI_DrawString函数的具体用法?C++ UI_DrawString怎么用?C++ UI_DrawString使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了UI_DrawString函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: DrawStatus

static void DrawStatus(void)
{
    int w;

    if (m_servers.pingstage == PING_STAGES)
        w = m_servers.pingindex * uis.width / m_servers.list.numItems;
    else
        w = uis.width;

    R_DrawFill8(0, uis.height - CHAR_HEIGHT, w, CHAR_HEIGHT, 4);
    R_DrawFill8(w, uis.height - CHAR_HEIGHT, uis.width - w, CHAR_HEIGHT, 0);

    if (m_servers.status_c)
        UI_DrawString(uis.width / 2, uis.height - CHAR_HEIGHT, UI_CENTER, m_servers.status_c);

    if (uis.width < 800)
        return;

    if (m_servers.list.numItems)
        UI_DrawString(uis.width, uis.height - CHAR_HEIGHT, UI_RIGHT, m_servers.status_r);

    if (m_servers.list.numItems && m_servers.list.curvalue >= 0) {
        serverslot_t *slot = m_servers.list.items[m_servers.list.curvalue];
        if (slot->status > SLOT_PENDING) {
            UI_DrawString(0, uis.height - CHAR_HEIGHT, UI_LEFT, slot->hostname);
        }
    }
}
开发者ID:AndreyNazarov,项目名称:q2pro,代码行数:28,代码来源:servers.c

示例2: DriverInfo_MenuDraw

/*
=================
DriverInfo_MenuDraw
=================
*/
static void DriverInfo_MenuDraw(void)
{
	int	i;
	int	y;

	Menu_Draw(&s_driverinfo.menu);

	UI_DrawString(320, 80, "VENDOR", UI_CENTER|UI_SMALLFONT, color_red);
	UI_DrawString(320, 152, "PIXELFORMAT", UI_CENTER|UI_SMALLFONT, color_red);
	UI_DrawString(320, 192, "EXTENSIONS", UI_CENTER|UI_SMALLFONT, color_red);

	UI_DrawString(320, 80+16, uis.glconfig.vendor_string, UI_CENTER|UI_SMALLFONT, text_color_normal);
	UI_DrawString(320, 96+16, uis.glconfig.version_string, UI_CENTER|UI_SMALLFONT, text_color_normal);
	UI_DrawString(320, 112+16, uis.glconfig.renderer_string, UI_CENTER|UI_SMALLFONT, text_color_normal);
	UI_DrawString(320, 152+16, va ("color(%d-bits) Z(%d-bits) stencil(%d-bits)", uis.glconfig.colorBits, uis.glconfig.depthBits, uis.glconfig.stencilBits), UI_CENTER|UI_SMALLFONT, text_color_normal);

	// double column
	y = 192+16;
	for (i=0; i<s_driverinfo.numstrings/2; i++)
	{
		UI_DrawString(320-4, y, s_driverinfo.strings[i*2], UI_RIGHT|UI_SMALLFONT, text_color_normal);
		UI_DrawString(320+4, y, s_driverinfo.strings[i*2+1], UI_LEFT|UI_SMALLFONT, text_color_normal);
		y += SMALLCHAR_HEIGHT;
	}

	if (s_driverinfo.numstrings & 1)
		UI_DrawString(320, y, s_driverinfo.strings[s_driverinfo.numstrings-1], UI_CENTER|UI_SMALLFONT, text_color_normal);
}
开发者ID:ElderPlayerX,项目名称:Invasion,代码行数:33,代码来源:ui_video.c

示例3: MenuDrawScoreLine

static void
MenuDrawScoreLine(int n, int y)
{
	int	rank;
	char	name[64], info[MAX_INFO_STRING];

	if(n > (postgame.numClients + 1))
		n -= (postgame.numClients + 2);

	if(n >= postgame.numClients)
		return;

	rank = postgame.ranks[n];
	if(rank & RANK_TIED_FLAG){
		UI_DrawString(640 - 31 * SMALLCHAR_WIDTH, y, "(tie)", 
			UI_LEFT | UI_SMALLFONT, color_white);
		rank &= ~RANK_TIED_FLAG;
	}
	trap_GetConfigString(CS_PLAYERS + postgame.clientNums[n], info,
		MAX_INFO_STRING);
	Q_strncpyz(name, Info_ValueForKey(info, "n"), sizeof(name));
	Q_cleanstr(name);

	UI_DrawString(640 - 25 * SMALLCHAR_WIDTH, y,
		va("#%i: %-16s %2i", rank + 1, name, postgame.scores[n]),
		UI_LEFT | UI_SMALLFONT, color_white);
}
开发者ID:icanhas,项目名称:yantar,代码行数:27,代码来源:sppostgame.c

示例4: ServerInfo_MenuDraw

/*
=================
ServerInfo_MenuDraw
=================
*/
static void ServerInfo_MenuDraw( void )
{
	const char		*s;
	char			key[MAX_INFO_KEY];
	char			value[MAX_INFO_VALUE];
	int				y, i=0;
	int				keylen, vallen, infonum=-1;

	UI_DrawIngameBG();
	UI_DrawProportionalString( 320, 110, "SERVER INFO",UI_CENTER|UI_SMALLFONT,color_black);

	y = 140;//95;
	s = s_serverinfo.info;
	s_serverinfo.numdrawn = 0;
	while ( s && i < s_serverinfo.numlines ) {
		i++;
		Info_NextPair( &s, key, value );
		if ( !key[0] ) {
			break;
		}

		infonum++;
		if(s_serverinfo.firstline>infonum)
			continue;

		if(y>260) break;

		Com_sprintf(key,MAX_INFO_KEY,"%s: ",key);
		keylen=Q_PrintStrlen(key);
		vallen=Q_PrintStrlen(value);
		if(keylen+vallen<20)
		{
			UI_DrawString(230,y,key,UI_LEFT|UI_SMALLFONT,color_black);
			UI_DrawString(230+keylen*8,y,value,UI_LEFT|UI_SMALLFONT,color_blue);

			s_serverinfo.numdrawn++;
		}
		else
		{
			int i;

			// TODO: Also add linebreaks for long keys?
			UI_DrawString(230,y,key,UI_LEFT|UI_SMALLFONT,color_black);
			
			for(i=0;i<vallen;i+=20)
			{
				y += SMALLCHAR_HEIGHT;
				if(y>260) break;

				UI_DrawString(230,y,va("%20.20s",&value[i]),UI_LEFT|UI_SMALLFONT,color_blue);

				s_serverinfo.numdrawn++;
			}
		}

		y += SMALLCHAR_HEIGHT;
	}

	Menu_Draw( &s_serverinfo.menu );
}
开发者ID:PadWorld-Entertainment,项目名称:wop-gamesource,代码行数:65,代码来源:ui_serverinfo.c

示例5: UI_CreditMenu_Draw

/*
===============
UI_CreditMenu_Draw
===============
*/
static void UI_CreditMenu_Draw( void ) {
    int		y;

    y = 12;
    UI_DrawProportionalString( 320, y, "id Software is:", UI_CENTER|UI_SMALLFONT, color_white );

    y += 1.42 * PROP_HEIGHT * PROP_SMALL_SIZE_SCALE;
    UI_DrawProportionalString( 320, y, "Programming", UI_CENTER|UI_SMALLFONT, color_white );
    y += PROP_HEIGHT * PROP_SMALL_SIZE_SCALE;
    UI_DrawProportionalString( 320, y, "John Carmack, Robert A. Duffy, Jim Dose'", UI_CENTER|UI_SMALLFONT, color_white );

    y += 1.42 * PROP_HEIGHT * PROP_SMALL_SIZE_SCALE;
    UI_DrawProportionalString( 320, y, "Art", UI_CENTER|UI_SMALLFONT, color_white );
    y += PROP_HEIGHT * PROP_SMALL_SIZE_SCALE;
    UI_DrawProportionalString( 320, y, "Adrian Carmack, Kevin Cloud,", UI_CENTER|UI_SMALLFONT, color_white );
    y += PROP_HEIGHT * PROP_SMALL_SIZE_SCALE;
    UI_DrawProportionalString( 320, y, "Kenneth Scott, Seneca Menard, Fred Nilsson", UI_CENTER|UI_SMALLFONT, color_white );

    y += 1.42 * PROP_HEIGHT * PROP_SMALL_SIZE_SCALE;
    UI_DrawProportionalString( 320, y, "Game Designer", UI_CENTER|UI_SMALLFONT, color_white );
    y += PROP_HEIGHT * PROP_SMALL_SIZE_SCALE;
    UI_DrawProportionalString( 320, y, "Graeme Devine", UI_CENTER|UI_SMALLFONT, color_white );

    y += 1.42 * PROP_HEIGHT * PROP_SMALL_SIZE_SCALE;
    UI_DrawProportionalString( 320, y, "Level Design", UI_CENTER|UI_SMALLFONT, color_white );
    y += PROP_HEIGHT * PROP_SMALL_SIZE_SCALE;
    UI_DrawProportionalString( 320, y, "Tim Willits, Christian Antkow, Paul Jaquays", UI_CENTER|UI_SMALLFONT, color_white );

    y += 1.42 * PROP_HEIGHT * PROP_SMALL_SIZE_SCALE;
    UI_DrawProportionalString( 320, y, "CEO", UI_CENTER|UI_SMALLFONT, color_white );
    y += PROP_HEIGHT * PROP_SMALL_SIZE_SCALE;
    UI_DrawProportionalString( 320, y, "Todd Hollenshead", UI_CENTER|UI_SMALLFONT, color_white );

    y += 1.42 * PROP_HEIGHT * PROP_SMALL_SIZE_SCALE;
    UI_DrawProportionalString( 320, y, "Director of Business Development", UI_CENTER|UI_SMALLFONT, color_white );
    y += PROP_HEIGHT * PROP_SMALL_SIZE_SCALE;
    UI_DrawProportionalString( 320, y, "Marty Stratton", UI_CENTER|UI_SMALLFONT, color_white );

    y += 1.42 * PROP_HEIGHT * PROP_SMALL_SIZE_SCALE;
    UI_DrawProportionalString( 320, y, "Biz Assist and id Mom", UI_CENTER|UI_SMALLFONT, color_white );
    y += PROP_HEIGHT * PROP_SMALL_SIZE_SCALE;
    UI_DrawProportionalString( 320, y, "Donna Jackson", UI_CENTER|UI_SMALLFONT, color_white );

    y += 1.42 * PROP_HEIGHT * PROP_SMALL_SIZE_SCALE;
    UI_DrawProportionalString( 320, y, "Development Assistance", UI_CENTER|UI_SMALLFONT, color_white );
    y += PROP_HEIGHT * PROP_SMALL_SIZE_SCALE;
    UI_DrawProportionalString( 320, y, "Eric Webb", UI_CENTER|UI_SMALLFONT, color_white );

    y += 1.35 * PROP_HEIGHT * PROP_SMALL_SIZE_SCALE;
    UI_DrawString( 320, y, "To order: 1-800-idgames     www.quake3arena.com     www.idsoftware.com", UI_CENTER|UI_SMALLFONT, color_red );
    y += SMALLCHAR_HEIGHT;
    UI_DrawString( 320, y, "Quake III Arena(c) 1999-2000, Id Software, Inc.  All Rights Reserved", UI_CENTER|UI_SMALLFONT, color_red );
}
开发者ID:zturtleman,项目名称:reaction,代码行数:58,代码来源:ui_credits.c

示例6: RadioButton_Draw

/*
=================
RadioButton_Draw
=================
*/
static void RadioButton_Draw( menuradiobutton_s *rb )
{
	int	x;
	int y;
	float *color;
	int	style;
	qboolean focus;

	x = rb->generic.x;
	y = rb->generic.y;

	focus = (rb->generic.parent->cursor == rb->generic.menuPosition);

	if ( rb->generic.flags & QMF_GRAYED )
	{
		color = text_color_disabled;
		style = UI_LEFT|UI_SMALLFONT;
	}
	else if ( focus )
	{
		color = text_color_highlight;
		style = UI_LEFT|UI_PULSE|UI_SMALLFONT;
	}
	else
	{
		color = text_color_normal;
		style = UI_LEFT|UI_SMALLFONT;
	}

	if ( focus )
	{
		// draw cursor
		UI_FillRect( rb->generic.left, rb->generic.top, rb->generic.right-rb->generic.left+1, rb->generic.bottom-rb->generic.top+1, listbar_color ); 
		UI_DrawChar( x, y, 13, UI_CENTER|UI_BLINK|UI_SMALLFONT, color);
	}

	if ( rb->generic.name )
		UI_DrawString( x - SMALLCHAR_WIDTH, y, rb->generic.name, UI_RIGHT|UI_SMALLFONT, color );

	if ( !rb->curvalue )
	{
		UI_DrawHandlePic( x + SMALLCHAR_WIDTH, y + 2, 16, 16, uis.rb_off);
		UI_DrawString( x + SMALLCHAR_WIDTH + 16, y, "off", style, color );
	}
	else
	{
		UI_DrawHandlePic( x + SMALLCHAR_WIDTH, y + 2, 16, 16, uis.rb_on );
		UI_DrawString( x + SMALLCHAR_WIDTH + 16, y, "on", style, color );
	}
}
开发者ID:Barbatos,项目名称:ioq3-bumpy-UrbanTerror-4.x,代码行数:55,代码来源:ui_qmenu.c

示例7: UI_CreditMenu_Draw

/*
===============
UI_CreditMenu_Draw
===============
*/
static void UI_CreditMenu_Draw(void)
{
	int		y;

	y = 16;
	UI_DrawProportionalString(320, y, "id Software is:", UI_CENTER|UI_SMALLFONT, color_white);

	y += 1.65 * PROP_HEIGHT * PROP_SMALL_SIZE_SCALE;
	UI_DrawProportionalString(320, y, "Programming", UI_CENTER|UI_SMALLFONT, color_white);
	y += PROP_HEIGHT * PROP_SMALL_SIZE_SCALE;
	UI_DrawProportionalString(320, y, "John Carmack, John Cash", UI_CENTER|UI_SMALLFONT, color_white);

	y += 1.65 * PROP_HEIGHT * PROP_SMALL_SIZE_SCALE;
	UI_DrawProportionalString(320, y, "Art", UI_CENTER|UI_SMALLFONT, color_white);
	y += PROP_HEIGHT * PROP_SMALL_SIZE_SCALE;
	UI_DrawProportionalString(320, y, "Adrian Carmack, Kevin Cloud,", UI_CENTER|UI_SMALLFONT, color_white);
	y += PROP_HEIGHT * PROP_SMALL_SIZE_SCALE;
	UI_DrawProportionalString(320, y, "Paul Steed, Kenneth Scott", UI_CENTER|UI_SMALLFONT, color_white);

	y += 1.65 * PROP_HEIGHT * PROP_SMALL_SIZE_SCALE;
	UI_DrawProportionalString(320, y, "Game Designer", UI_CENTER|UI_SMALLFONT, color_white);
	y += PROP_HEIGHT * PROP_SMALL_SIZE_SCALE;
	UI_DrawProportionalString(320, y, "Graeme Devine", UI_CENTER|UI_SMALLFONT, color_white);

	y += 1.65 * PROP_HEIGHT * PROP_SMALL_SIZE_SCALE;
	UI_DrawProportionalString(320, y, "Level Design", UI_CENTER|UI_SMALLFONT, color_white);
	y += PROP_HEIGHT * PROP_SMALL_SIZE_SCALE;
	UI_DrawProportionalString(320, y, "Tim Willits, Christian Antkow, Paul Jaquays", UI_CENTER|UI_SMALLFONT, color_white);

	y += 1.65 * PROP_HEIGHT * PROP_SMALL_SIZE_SCALE;
	UI_DrawProportionalString(320, y, "CEO", UI_CENTER|UI_SMALLFONT, color_white);
	y += PROP_HEIGHT * PROP_SMALL_SIZE_SCALE;
	UI_DrawProportionalString(320, y, "Todd Hollenshead", UI_CENTER|UI_SMALLFONT, color_white);

	y += 1.65 * PROP_HEIGHT * PROP_SMALL_SIZE_SCALE;
	UI_DrawProportionalString(320, y, "Director of Business Development", UI_CENTER|UI_SMALLFONT, color_white);
	y += PROP_HEIGHT * PROP_SMALL_SIZE_SCALE;
	UI_DrawProportionalString(320, y, "Katherine Anna Kang", UI_CENTER|UI_SMALLFONT, color_white);

	y += 1.65 * PROP_HEIGHT * PROP_SMALL_SIZE_SCALE;
	UI_DrawProportionalString(320, y, "Biz Assist and id Mom", UI_CENTER|UI_SMALLFONT, color_white);
	y += PROP_HEIGHT * PROP_SMALL_SIZE_SCALE;
	UI_DrawProportionalString(320, y, "Donna Jackson", UI_CENTER|UI_SMALLFONT, color_white);

	y += 1.65 * PROP_HEIGHT * PROP_SMALL_SIZE_SCALE;
	UI_DrawString(320, y, "To order: 1-800-idgames     www.quake3arena.com     www.idsoftware.com", UI_CENTER|UI_SMALLFONT, color_red);
	y += SMALLCHAR_HEIGHT;
	UI_DrawString(320, y, "Quake III Arena(c) 1999-2000, Id Software, Inc.  All Rights Reserved", UI_CENTER|UI_SMALLFONT, color_red);
}
开发者ID:ElderPlayerX,项目名称:Invasion,代码行数:54,代码来源:ui_credits.c

示例8: UI_DrawTooltip

/**
 * @brief Generic tooltip function
 */
int UI_DrawTooltip (const char* string, int x, int y, int maxWidth)
{
	const char* font = "f_small";
	int height = 0, width = 0;

	if (Q_strnull(string) || !font)
		return 0;

	R_FontTextSize(font, string, maxWidth, LONGLINES_WRAP, &width, &height, nullptr, nullptr);

	if (!width)
		return 0;

	x += 5;
	y += 5;

	if (x + width + 3 > VID_NORM_WIDTH)
		x -= width + 10;

	if (y + height + 3 > VID_NORM_HEIGHT)
		y -= height + 10;

	UI_DrawFill(x - 1, y - 1, width + 4, height + 4, tooltipBG);
	R_Color(tooltipColor);
	UI_DrawString(font, ALIGN_UL, x + 1, y + 1, x + 1, maxWidth, 0, string);
	R_Color(nullptr);

	return width;
}
开发者ID:yason,项目名称:ufoai,代码行数:32,代码来源:ui_tooltip.cpp

示例9: datadropper_draw_cb

static void datadropper_draw_cb(const struct bContext *C, ARegion *ar, void *arg)
{
	DataDropper *ddr = arg;
	int width;
	const char *name = ddr->name;
	wmWindow *win = CTX_wm_window(C);
	int x = win->eventstate->x;
	int y = win->eventstate->y;

	if ((name[0] == '\0') ||
	    (BLI_rcti_isect_pt(&ar->winrct, x, y) == false))
	{
		return;
	}

	width = UI_GetStringWidth(name);
	x = x - ar->winrct.xmin;
	y = y - ar->winrct.ymin;

	y += 20;

	glColor4ub(0, 0, 0, 50);

	uiSetRoundBox(UI_CNR_ALL | UI_RB_ALPHA);
	uiRoundBox(x, y, x + width + 8, y + 15, 4);

	glColor4ub(255, 255, 255, 255);
	UI_DrawString(x + 4, y + 4, name);
}
开发者ID:SuriyaaKudoIsc,项目名称:blender-git,代码行数:29,代码来源:interface_eyedropper.c

示例10: SCRQ2_DrawHUDString

static void SCRQ2_DrawHUDString( const char* string, int x, int y, int centerwidth, int _xor ) {
	int margin = x;

	while ( *string ) {
		// scan out one line of text from the string
		int width = 0;
		char line[ 1024 ];
		while ( *string && *string != '\n' ) {
			line[ width++ ] = *string++;
		}
		line[ width ] = 0;

		if ( centerwidth ) {
			x = margin + ( centerwidth - width * 8 ) / 2;
		} else {
			x = margin;
		}
		UI_DrawString( x, y, line, _xor );
		if ( *string ) {
			string++;	// skip the \n
			x = margin;
			y += 8;
		}
	}
}
开发者ID:janisl,项目名称:jlquake,代码行数:25,代码来源:hud.cpp

示例11: UIE_AwardIcons_DrawValues

/*
=================
UIE_AwardIcons_DrawValues
=================
*/
void UIE_AwardIcons_DrawValues(awardInfo_t* a)
{
	int 			x, y, i, n;
	int 			level;
	char			string[64];

	y = AWARDS_Y  - a->iconRaise;
	i = 0;
	for( n = 0; n < 6; n++ ) {
		level = a->levels[n];
		if( level > 0 ) {
			x = AwardIcons_PositionX(a, i);
			i++;

			if( level == 1 ) {
				continue;
			}

			if( level >= 1000000 ) {
				Com_sprintf( string, sizeof(string), "%im", level / 1000000 );
			}
			else if( level >= 1000 ) {
				Com_sprintf( string, sizeof(string), "%ik", level / 1000 );
			}
			else {
				Com_sprintf( string, sizeof(string), "%i", level );
			}

			UI_DrawString( x + 24, y + 48, string, UI_CENTER, color_yellow );
		}
	}
}
开发者ID:themuffinator,项目名称:fnq3,代码行数:37,代码来源:ui_splevel.c

示例12: draw_render_info

static void draw_render_info(Scene *scene, Image *ima, ARegion *ar)
{
	RenderResult *rr;
	rcti rect;
	float colf[3];
	
	rr= BKE_image_acquire_renderresult(scene, ima);

	if(rr && rr->text) {
		rect= ar->winrct;
		rect.xmin= 0;
		rect.ymin= ar->winrct.ymax - ar->winrct.ymin - HEADER_HEIGHT;
		rect.xmax= ar->winrct.xmax - ar->winrct.xmin;
		rect.ymax= ar->winrct.ymax - ar->winrct.ymin;
		
		/* clear header rect */
		UI_GetThemeColor3fv(TH_BACK, colf);
		glEnable(GL_BLEND);
		glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
		glColor4f(colf[0]+0.1f, colf[1]+0.1f, colf[2]+0.1f, 0.5f);
		glRecti(rect.xmin, rect.ymin, rect.xmax, rect.ymax+1);
		glDisable(GL_BLEND);
		
		UI_ThemeColor(TH_TEXT_HI);

		UI_DrawString(12, rect.ymin + 5, rr->text);
	}

	BKE_image_release_renderresult(scene, ima);
}
开发者ID:BHCLL,项目名称:blendocv,代码行数:30,代码来源:image_draw.c

示例13: UI_CreditMenu_Draw_ioq3

/*
===============
UI_CreditMenu_Draw_ioq3
===============
*/
static void UI_CreditMenu_Draw_ioq3( void ) {
    int		y;
    int		i;

    // These are all people that have made commits to Subversion, and thus
    //  probably incomplete.
    // (These are in alphabetical order, for the defense of everyone's egos.)
    static const char *names[] = {
        "Tim Angus",
        "James Canete",
        "Vincent Cojot",
        "Ryan C. Gordon",
        "Aaron Gyes",
        "Zack Middleton",
        "Ludwig Nussel",
        "Julian Priestley",
        "Scirocco Six",
        "Thilo Schulz",
        "Zachary J. Slater",
        "Tony J. White",
        "...and many, many others!",  // keep this one last.
        NULL
    };

    y = 12;
    UI_DrawProportionalString( 320, y, "ioquake3 contributors:", UI_CENTER|UI_SMALLFONT, color_white );
    y += 1.42 * PROP_HEIGHT * PROP_SMALL_SIZE_SCALE;

    for (i = 0; names[i]; i++) {
        UI_DrawProportionalString( 320, y, names[i], UI_CENTER|UI_SMALLFONT, color_white );
        y += 1.42 * PROP_HEIGHT * PROP_SMALL_SIZE_SCALE;
    }

    UI_DrawString( 320, 459, "http://www.ioquake3.org/", UI_CENTER|UI_SMALLFONT, color_red );
}
开发者ID:zturtleman,项目名称:reaction,代码行数:40,代码来源:ui_credits.c

示例14: UI_SPPostgameMenu_DrawAwardsMedals

static void UI_SPPostgameMenu_DrawAwardsMedals( int max ) {
    int		n;
    int		medal;
    int		amount;
    int		x, y;
    char	buf[16];

    for( n = 0; n < max; n++ ) {
        x = medalLocations[n];
        y = 64;
        medal = postgameMenuInfo.awardsEarned[n];
        amount = postgameMenuInfo.awardsLevels[n];

        UI_DrawNamedPic( x, y, 48, 48, ui_medalPicNames[medal] );

        if( medal == AWARD_ACCURACY ) {
            Com_sprintf( buf, sizeof(buf), "%i%%", amount );
        }
        else {
            if( amount == 1 ) {
                continue;
            }
            Com_sprintf( buf, sizeof(buf), "%i", amount );
        }

        UI_DrawString( x + 24, y + 52, buf, UI_CENTER, color_yellow );
    }
}
开发者ID:GregMacPherson,项目名称:Quake-III-Arena,代码行数:28,代码来源:ui_sppostgame.c

示例15: Draw

static void Draw( menuFrameWork_t *self ) {
    Menu_Draw( self );
    if( uis.width >= 640 ) {
        UI_DrawString( uis.width, uis.height - CHAR_HEIGHT,
            UI_RIGHT, m_demos.status );
    }
}
开发者ID:Bad-ptr,项目名称:q2pro,代码行数:7,代码来源:ui_demos.c


注:本文中的UI_DrawString函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。