本文整理汇总了C++中timerLib::unpause方法的典型用法代码示例。如果您正苦于以下问题:C++ timerLib::unpause方法的具体用法?C++ timerLib::unpause怎么用?C++ timerLib::unpause使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类timerLib
的用法示例。
在下文中一共展示了timerLib::unpause方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: show_timed_dialog
void dialogs::show_timed_dialog(std::string face_file, bool is_left, std::string lines[], short delay, bool show_btn=true)
{
UNUSED(is_left);
std::string temp_text;
char temp_char;
timer.pause();
draw_dialog_bg(show_btn);
draw_lib.update_screen();
st_position dialog_pos = graphLib.get_dialog_pos();
graphLib.place_face(face_file, st_position(dialog_pos.x+16, dialog_pos.y+16));
draw_lib.update_screen();
/// @TODO: usar show_config_bg e hide_config_bg da graphLib - modificar para aceitar centered (que é o atual) ou top ou bottom
for (int i=0; i<3; i++) {
for (unsigned int j=0; j<lines[i].size(); j++) {
temp_char = lines[i].at(j);
temp_text = "";
temp_text += temp_char;
graphLib.draw_text(j*9+(dialog_pos.x+52), i*11+(dialog_pos.y+16), temp_text);
//graphLib.draw_text(j*9+53, i*11+9, "A");
draw_lib.update_screen();
input.waitTime(15);
}
}
input.waitTime(delay);
timer.unpause();
}
示例2: show_leave_game_dialog
bool dialogs::show_leave_game_dialog() const
{
bool res = false;
bool repeat_menu = true;
int picked_n = -1;
timer.pause();
std::cout << ">>>>>>> show_leave_game_dialog::START" << std::endl;
graphicsLib_gSurface bgCopy;
graphLib.initSurface(st_size(RES_W, RES_H), &bgCopy);
graphLib.copyArea(st_position(0, 0), &graphLib.gameScreen, &bgCopy);
graphLib.show_dialog(0, false);
st_position dialog_pos = graphLib.get_dialog_pos();
graphLib.draw_text(dialog_pos.x+30, dialog_pos.y+16, "QUIT GAME?");
std::vector<std::string> item_list;
item_list.push_back("YES");
item_list.push_back("NO");
option_picker main_picker(false, st_position(dialog_pos.x+40, dialog_pos.y+16+11), item_list, false);
draw_lib.update_screen();
while (repeat_menu == true) {
picked_n = main_picker.pick();
std::cout << "picked_n: " << picked_n << std::endl;
if (picked_n == 0) {
res = true;
repeat_menu = false;
} else if (picked_n == 1) {
res = false;
repeat_menu = false;
} else {
main_picker.draw();
}
}
input.clean();
input.waitTime(200);
graphLib.copyArea(st_position(0, 0), &bgCopy, &graphLib.gameScreen);
draw_lib.update_screen();
timer.unpause();
std::cout << ">>>>>>> show_leave_game_dialog::END" << std::endl;
return res;
}