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


C++ Painter::PrintText方法代码示例

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


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

示例1: DisplayCredits

void DisplayCredits () {
	glClear (GL_COLOR_BUFFER_BIT);

	Paint.EmptyRectangle (PREVIEW_WINDOW_X, 5, 124, 14, GREEN);
	Paint.PrintText (PREVIEW_WINDOW_X + 5, 11, "TO MENU", GREEN);

	Paint.PrintText (54, 24, "Developer : Alexei Evlanov", RED);
	Paint.PrintText (54, 49, "Year of release : 2015", RED);
	Paint.PrintText (54, 74, "Game version : 1.0 ", RED);

	glutSwapBuffers ();
}
开发者ID:AIexei,项目名称:CursTetris,代码行数:12,代码来源:main.cpp

示例2: DisplayGame

void DisplayGame () {
	// paint the background
	glClear (GL_COLOR_BUFFER_BIT);

	Paint.EmptyRectangle (PREVIEW_WINDOW_X, 5, 124, 14, GREEN);
	Paint.PrintText (PREVIEW_WINDOW_X + 5, 11, "TO MENU", GREEN);

	Paint.PrintText (PREVIEW_WINDOW_X, 25, "The next figure", RED);
	Paint.PrintText (PREVIEW_WINDOW_X, 75, Tetris.ShowLevel(), RED);
	Paint.PrintText (PREVIEW_WINDOW_X, 87, Tetris.ShowLines(), RED);
	Paint.PrintText (PREVIEW_WINDOW_X, 99, Tetris.ShowScore(), RED);
	Paint.PrintText (PREVIEW_WINDOW_X, 111, Tetris.ShowHighScore(), RED);

	Tetris.Draw (Paint);

	glutSwapBuffers();
}
开发者ID:AIexei,项目名称:CursTetris,代码行数:17,代码来源:main.cpp

示例3: DisplayGuidance

void DisplayGuidance () {
	glClear (GL_COLOR_BUFFER_BIT);

	Paint.EmptyRectangle (PREVIEW_WINDOW_X, 5, 124, 14, GREEN);
	Paint.PrintText (PREVIEW_WINDOW_X + 5, 11, "TO MENU", GREEN);

	glutSwapBuffers ();
}
开发者ID:AIexei,项目名称:CursTetris,代码行数:8,代码来源:main.cpp

示例4: DisplayMenu

void DisplayMenu () {
	glClear (GL_COLOR_BUFFER_BIT);

	Paint.EmptyRectangle (40, 10, 100, 25, GREEN);
	Paint.EmptyRectangle (40, 30, 100, 45, GREEN);
	Paint.EmptyRectangle (40, 50, 100, 65, GREEN);
	Paint.EmptyRectangle (40, 70, 100, 85, GREEN);
	Paint.EmptyRectangle (40, 90, 100, 105, GREEN);

	Paint.PrintText (54, 19, "PLAY CLASSIC", GREEN);
	Paint.PrintText (54, 39, "PLAY ARCADE ", GREEN);
	Paint.PrintText (54, 59, "PLAY FRENZY ", GREEN);
	Paint.PrintText (54, 79, "   GUIDANCE ", GREEN);
	Paint.PrintText (54, 99, "    CREDITS ", GREEN);

	glutSwapBuffers ();
}
开发者ID:AIexei,项目名称:CursTetris,代码行数:17,代码来源:main.cpp


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