Ejemplo n.º 1
0
int info_scene()
{
	cleardevice();
	setcolor(0xFFFFFF);
	Mira mira(640, 300);
	auto p_imagetext(newimage(440, 130));
	char infostr[] = "欢迎使用Easy Graphics Enginge (EGE) V0.3.8 ,本库是一个面向新手,或者面向快速图形程序开发的图形库,使用方便快捷,容易上手,特别适合于新手学习图形程序设计。本程序为安装程序,如果你要继续安装,请按'y'键继续";
	setcolor(0xFFFF, p_imagetext);
	setfont(18, 0, "宋体", p_imagetext);
	setbkmode(TRANSPARENT, p_imagetext);
	for(int i = 0; i < 8; ++i)
	{
		outtextrect(5, 5, 440, 280, infostr, p_imagetext);
		imagefilter_blurring(p_imagetext, 0xF0, 0x100);
	}
	setcolor(0xFF, p_imagetext);
	outtextrect(5, 5, 440, 280, infostr, p_imagetext);

	for(; kbhit() == 0; delay_fps(60))
	{
		mira.update();
		mira.render(0, 480 - 300);
		putimage(100, 50, p_imagetext);
	}
	delimage(p_imagetext);
	return getch();
}
Ejemplo n.º 2
0
int setup_scene()
{
	cleardevice();
	int it;
	g_output[0] = 0;
	setfont(14, 0, "宋体");
	for(it = 0; ver[it][0]; ++it)
	{
		if(installpath[it][0] == 0)
			continue;
		copyfile(".\\", installpath[it], "include", "graphics.h");
		if(it == 0)
			copyfile(".\\", installpath[it], "lib", "graphics.lib");
		if(it == 1)
			copyfile(".\\", installpath[it], "lib", "graphics05.lib");
		if(it == 2 || it == 3)
			copyfile(".\\", installpath[it], "lib", "graphics08.lib");
		if(it == 4)
			copyfile(".\\", installpath[it], "lib", "libgraphics.a");
	}
	if(g_output[0])
	{
		outtextxy(10, 10, "以下为复制记录列表,如果有发生错误的话,可能需要你手工安装");
	}
	outtextrect(10, 30, 600, 400, g_output);
	outtextxy(10, 400, "安装步骤执行完成,按任意键退出本程序");
	return getch();
}
Ejemplo n.º 3
0
int getpath_scene()
{
	//HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio
	char strpath[MAX_PATH];
	HKEY key;
	int it;
	cleardevice();
	setfont(18, 0, "宋体");

	outtextrect(100, 30, 440, 280, "以下显示本程序所搜索到的IDE安装路径,如果有找不到的,请把本程序连同子文件夹一起复制到安装目录下,然后再在那个目录下运行本程序。例如如果你使用的是VC6的绿色版,那就可能会找不到,假如你安装在'D:\\Program Files\\Microsoft Visual Studio\\',那你只需要把本程序目录下的include, lib目录复制到'D:\\Program Files\\Microsoft Visual Studio\\VC98\\',并确认文件夹合并就可以了。\n如果你要继续安装,请按Y键继续");

	for(it = 0; ver[it][0]; ++it)
	{
		std::sprintf(strpath, "%s%s", strbasepath, ver[it]);
		if(::RegOpenKeyExA(HKEY_LOCAL_MACHINE, strpath, 0, KEY_READ, &key) == ERROR_SUCCESS)
		{
			unsigned long dwtype = REG_SZ;
			unsigned long dwsize = MAX_PATH;
			if(::RegQueryValueExA(key, "ProductDir", {}, &dwtype, (unsigned char*)(installpath[it]), &dwsize))
			{
				::RegQueryValueExA(key, "InstallDir", {}, &dwtype, (unsigned char*)(installpath[it]), &dwsize);
				strcat(installpath[it], "\\mingw");
			}
			::RegCloseKey(key);
		}
		outtextxy(100, it * 20 + 250, installpath[it]);
	}

	//::GetCurrentDirectory(MAX_PATH, installpath[it]);
	//outtextxy(100, it * 20 + 250, installpath[it]);
	return getch();
}
int main() {
	initgraph(640,480);
	
	char s[101];
	inputbox_getline("Input Box", "Input a string", s, 100);
	outtextxy(10,10,s);
	int x = getInteger();
	xyprintf(10,30,"This is an integer: %d",x);
	double y = getDouble();
	xyprintf(10,50,"This is a double: %f",y);
	getString(s, 100);
	outtextrect(10, 80, 100, 60, s);
	char c = getChar("Input a character");
	outtext(c);
	int  coords[4];
	int *pc = getCoords(coords, 2);
	line(pc[0], pc[1], pc[2], pc[3]);
	
	ege::getch();
	closegraph();  
	
	return 0;
}
Ejemplo n.º 5
0
void putThing(int screen_x,int screen_y,int box_y,char *str,int color)
{
	setcolor(color);
	setfont(20,0,"宋体");
	outtextrect(0,box_y,screen_x,screen_y,str);
}