本文整理汇总了C++中monster::print_info方法的典型用法代码示例。如果您正苦于以下问题:C++ monster::print_info方法的具体用法?C++ monster::print_info怎么用?C++ monster::print_info使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类monster
的用法示例。
在下文中一共展示了monster::print_info方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: select
virtual void select(int entnum, uimenu *menu) override
{
if ( ! started ) {
started = true;
setup(menu);
}
if (entnum != lastent) {
lastent = entnum;
tmp = monster( mtypes[ entnum ]->id );
if (friendly) {
tmp.friendly = -1;
}
}
werase(w_info);
wrefresh(w_info);
tmp.print_info( w_info, 2, 5, 1 );
std::string header = string_format("#%d: %s (%d)%s", entnum, tmp.type->nname().c_str(),
group, (hallucination ? _(" (hallucination)") : ""));
mvwprintz(w_info, 0, ( getmaxx(w_info) - header.size() ) / 2, c_cyan, "%s",
header.c_str());
mvwprintz(w_info, getmaxy(w_info) - 3, 0, c_green, "%s", msg.c_str());
msg = padding;
mvwprintw(w_info, getmaxy(w_info) - 2, 0,
_("[/] find, [f]riendly, [h]allucination, [i]ncrease group, [d]ecrease group, [q]uit"));
}
示例2: select
virtual void select(int entnum, uimenu *menu) {
if ( ! started ) {
started = true;
setup(menu);
}
if (entnum != lastent) {
lastent = entnum;
tmp = monster(GetMType(entnum));
if (friendly) {
tmp.friendly = -1;
}
}
werase(w_info);
tmp.print_info(g, w_info);
std::string header = string_format("#%d: %s", entnum, GetMType(entnum)->name.c_str()
);
mvwprintz(w_info, 1, ( getmaxx(w_info) - header.size() ) / 2, c_cyan, "%s",
header.c_str()
);
mvwprintz(w_info, getmaxy(w_info) - 3, 0, c_green, "%s", msg.c_str());
msg = padding;
mvwprintw(w_info, getmaxy(w_info) - 2, 0, "[/] find, [f] friendly, [q]uit");
//wrefresh(w_info); // for some reason this makes everything disappear on first run? Not needed, at any rate.
}
示例3: select
virtual void select(int entnum, uimenu *menu) {
if ( ! started ) {
started = true;
setup(menu);
}
if (entnum != lastent) {
lastent = entnum;
tmp = monster(GetMType(entnum));
if (friendly) {
tmp.friendly = -1;
}
}
werase(w_info);
tmp.print_info( w_info, 6, 5, 1 );
std::string header = string_format("#%d: %s", entnum, GetMType(entnum)->nname().c_str());
mvwprintz(w_info, 1, ( getmaxx(w_info) - header.size() ) / 2, c_cyan, "%s",
header.c_str());
mvwprintz(w_info, getmaxy(w_info) - 3, 0, c_green, "%s", msg.c_str());
msg = padding;
mvwprintw(w_info, getmaxy(w_info) - 2, 0,
_("[/] find, [f]riendly, [i]ncrease group, [d]ecrease group, [q]uit"));
}
示例4: select
void select( int entnum, uilist *menu ) override {
if( ! started ) {
started = true;
setup( menu );
}
if( entnum != lastent ) {
lastent = entnum;
tmp = monster( mtypes[ entnum ]->id );
if( friendly ) {
tmp.friendly = -1;
}
}
werase( w_info );
wrefresh( w_info );
tmp.print_info( w_info, 2, 5, 1 );
std::string header = string_format( "#%d: %s (%d)%s", entnum, tmp.type->nname(),
group, ( hallucination ? _( " (hallucination)" ) : "" ) );
mvwprintz( w_info, 0, ( getmaxx( w_info ) - header.size() ) / 2, c_cyan, header );
mvwprintz( w_info, getmaxy( w_info ) - 3, 0, c_green, msg );
msg = padding;
input_context ctxt( menu->input_category );
mvwprintw( w_info, getmaxy( w_info ) - 2, 0,
_( "[%s] find, [f]riendly, [h]allucination, [i]ncrease group, [d]ecrease group, [%s] quit" ),
ctxt.get_desc( "FILTER" ), ctxt.get_desc( "QUIT" ) );
}