本文整理汇总了C++中graphicsLib::draw_centered_text方法的典型用法代码示例。如果您正苦于以下问题:C++ graphicsLib::draw_centered_text方法的具体用法?C++ graphicsLib::draw_centered_text怎么用?C++ graphicsLib::draw_centered_text使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类graphicsLib
的用法示例。
在下文中一共展示了graphicsLib::draw_centered_text方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: draw_credit_line
void draw::draw_credit_line(graphicsLib_gSurface &surface, unsigned short initial_line)
{
if (initial_line < credits_list.size()) {
std::size_t found = credits_list.at(initial_line).find("--- ");
if (found != std::string::npos) {
graphLib.draw_centered_text(RES_H, credits_list.at(initial_line), surface, st_color(95, 151, 255));
} else {
graphLib.draw_centered_text(RES_H, credits_list.at(initial_line), surface, st_color(235, 235, 235));
}
}
}
示例2: create_credits_text
//.........这里部分代码省略.........
credits_list.push_back("PROF. CHRIS");
credits_list.push_back("");
credits_list.push_back("--- DERIVATED GRAPHICS ---");
credits_list.push_back("CAPCOM");
credits_list.push_back("");
credits_list.push_back("--- ILLUSTRATION ---");
credits_list.push_back("IURI FIEDORUK");
credits_list.push_back("ARIS KSF");
credits_list.push_back("");
credits_list.push_back("--- MUSIC COMPOSE ---");
credits_list.push_back("MODARCHIVE.ORG");
credits_list.push_back("");
credits_list.push_back("--- SOUND EFFECTS ---");
credits_list.push_back("CAPCOM");
credits_list.push_back("");
credits_list.push_back("--- PROGRAMMER ---");
credits_list.push_back("IURI FIEDORUK");
credits_list.push_back("DEMETRIO NETO");
credits_list.push_back("");
credits_list.push_back("--- PORTING ---");
credits_list.push_back("DINGUX: SHIN-NIL");
credits_list.push_back("PANDORA: SIGMA NL");
credits_list.push_back("PS2: RAGNAROK2040");
credits_list.push_back("PS2: WOON-YUNG LIU");
credits_list.push_back("PS2: SP193");
credits_list.push_back("ANDROID: PELYA");
credits_list.push_back("");
credits_list.push_back("--- TESTING ---");
credits_list.push_back("IURI FIEDORUK");
credits_list.push_back("ARIS KSF");
credits_list.push_back("LUIS AGUIRRE");
credits_list.push_back("BENOITREN (PSP)");
credits_list.push_back("BATANEN (PSP)");
credits_list.push_back("SAIYAN X (PSP)");
credits_list.push_back("AGENT 13 (PS2)");
credits_list.push_back("MK2ESCORT (PS2)");
credits_list.push_back("FOUADTJUHMASTER (ANDROID)");
credits_list.push_back("");
credits_list.push_back("--- SPECIAL THANKS ---");
credits_list.push_back("FREE SDK DEVELOPERS");
credits_list.push_back("LIBSDL PORTERS");
credits_list.push_back("DEVIANTART COMMUNITY");
credits_list.push_back("PIXELJOIN COMMUNITY");
credits_list.push_back("VENOM");
credits_list.push_back("JERONIMO");
credits_list.push_back("");
credits_list.push_back("--- DEVELOPMENT TOOLS ---");
credits_list.push_back("LIBSDL");
credits_list.push_back("LIBQT4");
credits_list.push_back("DIGIA QT");
credits_list.push_back("QT CREATOR");
credits_list.push_back("UBUNTU LINUX");
credits_list.push_back("GIMP");
credits_list.push_back("PAINT TOOL SAI");
credits_list.push_back("COREL DRAW");
credits_list.push_back("SIMPLE SCREEN RECORD");
credits_list.push_back("");
credits_list.push_back("");
credits_list.push_back("");
credits_list.push_back("");
credits_list.push_back("");
credits_list.push_back("");
credits_list.push_back("");
credits_list.push_back("");
credits_list.push_back("");
credits_list.push_back("");
credits_list.push_back("");
credits_list.push_back("");
credits_list.push_back("");
credits_list.push_back("");
credits_list.push_back("");
credits_list.push_back("");
credits_list.push_back("");
credits_list.push_back("");
credits_list.push_back("--- PRESENTED BY ---");
credits_list.push_back("UPPERLAND STUDIOS");
credits_list.push_back("GREENNEKO WEB & DESIGN");
for (unsigned int i=0; i<=RES_H/12 && i<credits_list.size(); i++) {
std::size_t found = credits_list.at(i).find("--- ");
if (found != std::string::npos) {
graphLib.draw_centered_text(12*i, credits_list.at(i), surface, st_color(95, 151, 255));
} else {
graphLib.draw_centered_text(12*i, credits_list.at(i), surface, st_color(235, 235, 235));
}
}
}