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


C++ Icon::create_texture方法代码示例

本文整理汇总了C++中Icon::create_texture方法的典型用法代码示例。如果您正苦于以下问题:C++ Icon::create_texture方法的具体用法?C++ Icon::create_texture怎么用?C++ Icon::create_texture使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Icon的用法示例。


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

示例1: dlgabout

void dlgabout()
{
	char work[32];
	const char str_auth[] = "Yui/Punyu/Studio Milmake";
	float x,y;

	tx_resetwork();
	icon.create_texture();
  
	milstr_ncpy(work, str_xmil, NELEMENTS(work));
	milstr_ncat(work, str_space, NELEMENTS(work));
	milstr_ncat(work, xmilversion, NELEMENTS(work));

	float base_width = MAX_MENU_SIZE;
	float base_height = (ui_font_height() + 5) * 3 + (32 + 5) + 6;

	float offx = ui_offx() + (ui_width() - base_width) / 2;
	float offy = ui_offy() + (ui_height() - base_height) / 2;

	tx_resetfont();
  
	scrnmng_update();
	draw_transquad(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, UI_TR, UI_TR, UI_TR, UI_TR);
	draw_transquad(offx, offy, offx + base_width, offy + base_height, UI_BS, UI_BS, UI_BS, UI_BS);

	x = offx + (base_width - strlen(mstr_about) * ui_font_width()) / 2;
	y = offy;
	ui_font_draw(x, y, 255, 255, 255, mstr_about);
	y += ui_font_height() + 5;

	draw_transquad(offx, y, offx + base_width, y + 1, MAKECOL32(128, 128, 128, 255),
				   MAKECOL32(128, 128, 128, 255), MAKECOL32(128, 128, 128, 255), MAKECOL32(128, 128, 128, 255));

	y += 6;
  
	x = offx + (base_width - strlen(work) * ui_font_width()) / 2;
	ui_font_draw(x, y, 255, 255, 255, work);
	y += ui_font_height() + 5;

	x = offx + (base_width - 32) / 2;
	icon.drawIcon(x, y);
	y += 32 + 5;

	x = offx + (base_width - strlen(str_auth) * ui_font_width()) / 2;
	ui_font_draw(x, y, 255, 255, 255, str_auth);

	x = ui_offx();
	y = ui_height() - ui_font_height();
  
	ui_font_draw(x, y, 255, 255, 255, "B:Back");
    
	ta_commit_frame();
  
	for (;;) {
		uisys_task();

		if(ui_keypressed(JOY_B))
			break;
	}
}
开发者ID:histat,项目名称:dc-xmil,代码行数:60,代码来源:dlgabout.cpp


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