本文整理汇总了C++中twindow::insert_animation方法的典型用法代码示例。如果您正苦于以下问题:C++ twindow::insert_animation方法的具体用法?C++ twindow::insert_animation怎么用?C++ twindow::insert_animation使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类twindow
的用法示例。
在下文中一共展示了twindow::insert_animation方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: pre_show
//.........这里部分代码省略.........
}
std::string str;
if (!strcmp(menu_items[item], "player")) {
str = player_hero_.image(true);
} else if (!strcmp(menu_items[item], "signin")) {
if (group.signin().today) {
str = std::string("icons/") + "signin-ok" + ".png";
} else {
str = std::string("icons/") + "signin" + ".png";
}
} else {
if (!strcmp(menu_items[item], "message")) {
if (group.message_count()) {
b->set_label("misc/red-dot12.png");
}
}
str = std::string("icons/") + menu_items[item] + ".png";
}
for (int i = 0; i < 4; i ++) {
b->canvas()[i].set_variable("image", variant(str));
}
}
if (game_config::tiny_gui) {
b = find_widget<tbutton>(&window, "design", false, false);
if (b) {
b->set_visible(twidget::INVISIBLE);
}
b = find_widget<tbutton>(&window, "editor", false, false);
if (b) {
b->set_visible(twidget::INVISIBLE);
}
} else if (!preferences::developer()) {
b = find_widget<tbutton>(&window, "design", false, false);
if (b) {
b->set_visible(twidget::INVISIBLE);
}
}
#if defined(__APPLE__) && TARGET_OS_IPHONE
b = find_widget<tbutton>(&window, "quit", false, false);
if (b) {
b->set_visible(twidget::INVISIBLE);
}
#endif
for (int item = 0; item < nb_items; item ++) {
std::string id = menu_items[item];
int retval = twindow::NONE;
if (id == "editor") {
retval = START_MAP_EDITOR;
} else if (id == "quit") {
retval = QUIT_GAME;
} else if (id == "help") {
retval = HELP;
} else if (id == "campaign") {
retval = NEW_CAMPAIGN;
} else if (id == "player") {
retval = PLAYER;
} else if (id == "side") {
retval = PLAYER_SIDE;
} else if (id == "multiplayer") {
retval = MULTIPLAYER;
} else if (id == "load") {
retval = LOAD_GAME;
} else if (id == "report") {
retval = REPORT;
} else if (id == "language") {
retval = CHANGE_LANGUAGE;
} else if (id == "message") {
retval = MESSAGE;
} else if (id == "preferences") {
retval = EDIT_PREFERENCES;
} else if (id == "signin") {
retval = SIGNIN;
} else if (id == "shop") {
retval = INAPP_PURCHASE;
}
connect_signal_mouse_left_click(
find_widget<tbutton>(&window, id, false)
, boost::bind(
&ttitle_screen::set_retval
, this
, boost::ref(window)
, retval));
}
tlobby::thandler::join();
config cfg;
cfg["id"] = anim2::rfind(anim2::TITLE_SCREEN);
cfg["width"] = 1600;
cfg["height"] = 900;
window.insert_animation(cfg, false);
}