这篇教程C++ AddImage函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中AddImage函数的典型用法代码示例。如果您正苦于以下问题:C++ AddImage函数的具体用法?C++ AddImage怎么用?C++ AddImage使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了AddImage函数的27个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: IngameWindow/// Konstruktor von @p iwBuildingProductivities.iwBuildingProductivities::iwBuildingProductivities() : IngameWindow(CGI_BUILDINGSPRODUCTIVITY, 0xFFFE, 0xFFFE, left_x + 2 * percent_width + 2 * image_percent_x + percent_image_x + right_x, top_y + (BUILDINGS_COUNT / 2 + 1) * (distance_y + 1), _("Productivity"), LOADER.GetImageN("resource", 41)), percents(40, 0){ for(unsigned y = 0; y < BUILDINGS_COUNT / 2 + BUILDINGS_COUNT % 2; ++y) { for(unsigned x = 0; x < 2; ++x) { if(y * 2 + x < BUILDINGS_COUNT) { if(bts[y*2+x]!=BLD_CHARBURNER) AddImage((y * 2 + x) * 2, left_x + x * (percent_image_x + percent_width + image_percent_x), top_y + distance_y * y + percent_height / 2,LOADER.GetImageN(NATION_ICON_IDS[GameClient::inst().GetLocalPlayer()->nation], bts[y * 2 + x]), _(BUILDING_NAMES[bts[y * 2 + x]])); else AddImage((y * 2 + x) * 2, left_x + x * (percent_image_x + percent_width + image_percent_x), top_y + distance_y * y + percent_height / 2,LOADER.GetImageN("charburner", GameClient::inst().GetLocalPlayer()->nation * 8 + 8), _(BUILDING_NAMES[bts[y * 2 + x]])); AddPercent((y * 2 + x) * 2 + 1, left_x + image_percent_x + x * (percent_image_x + percent_width + image_percent_x), top_y + distance_y * y, percent_width, percent_height, TC_GREY, COLOR_YELLOW, SmallFont, &percents[bts[y * 2 + x]]); } } } UpdatePercents(); // Hilfe-Button AddImageButton(500, width - 14 - 30, height - 20 - 32, 30, 32, TC_GREY, LOADER.GetImageN("io", 21), _("Help"));}
开发者ID:MarcusSt,项目名称:s25client,代码行数:29,
示例2: IngameWindow/** * Konstruktor von @p iwMilitaryBuilding. * * @author OLiver */iwMilitaryBuilding::iwMilitaryBuilding(GameWorldViewer* const gwv, dskGameInterface* const gi, nobMilitary* const building) : IngameWindow(building->CreateGUIID(), (unsigned short) - 2, (unsigned short) - 2, 226, 194, _(BUILDING_NAMES[building->GetBuildingType()]), LOADER.GetImageN("resource", 41)), building(building),gi(gi), gwv(gwv){ // Schwert AddImage(0, 28, 39, LOADER.GetMapImageN(2298)); AddImage(1, 28, 39, LOADER.GetMapImageN(2250 + GD_SWORD)); // Schild AddImage(2, 196, 39, LOADER.GetMapImageN(2298)); AddImage(3, 196, 39, LOADER.GetMapImageN(2250 + GD_SHIELDROMANS)); // Hilfe AddImageButton(4, 16, 147, 30, 32, TC_GREY, LOADER.GetImageN("io", 21)); // Abrei C++ AddItem函数代码示例 C++ AddHotkeyName函数代码示例
|