本文整理汇总了C++中BitmapText::hardlight方法的典型用法代码示例。如果您正苦于以下问题:C++ BitmapText::hardlight方法的具体用法?C++ BitmapText::hardlight怎么用?C++ BitmapText::hardlight使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BitmapText
的用法示例。
在下文中一共展示了BitmapText::hardlight方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
WndBag::WndBag(Bag* bag, Listener* listener, Mode mode, const std::string& title)
{
this->listener = listener;
this->mode = mode;
this->title = title;
lastMode = mode;
lastBag = bag;
nCols = PixelDungeon::landscape() ? COLS_L : COLS_P;
nRows = (Belongings::BACKPACK_SIZE + 4 + 1) / nCols + ((Belongings::BACKPACK_SIZE + 4 + 1) % nCols > 0 ? 1 : 0);
int slotsWidth = SLOT_SIZE * nCols + SLOT_MARGIN * (nCols - 1);
int slotsHeight = SLOT_SIZE * nRows + SLOT_MARGIN * (nRows - 1);
BitmapText* txtTitle = PixelScene::createText(title.size() > 0 ? title : bag->Name(), 9);
txtTitle->hardlight(TITLE_COLOR);
txtTitle->measure();
txtTitle->x = (int)(slotsWidth - txtTitle->Width()) / 2;
txtTitle->y = (int)(TITLE_HEIGHT - txtTitle->Height()) / 2;
Group::add(txtTitle);
placeItems(bag);
resize(slotsWidth, slotsHeight + TITLE_HEIGHT);
Belongings* stuff = Dungeon::hero->belongings;
//Bag[] bags = {
// stuff.backpack,
// stuff.getItem(SeedPouch.class),
// stuff.getItem(ScrollHolder.class),
// stuff.getItem(WandHolster.class),
// stuff.getItem(Keyring.class) };
//
//for (Bag b : bags) {
// if (b != null) {
// BagTab tab = new BagTab(b);
// tab.setSize(TAB_WIDTH, tabHeight());
// add(tab);
//
// tab.select(b == bag);
// }
//}
}