当前位置: 首页>>代码示例>>C++>>正文


C++ monster::print_info方法代码示例

本文整理汇总了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"));
        }
开发者ID:Madnus,项目名称:Cataclysm-DDA,代码行数:28,代码来源:wish.cpp

示例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.
        }
开发者ID:8Z,项目名称:Cataclysm-DDA,代码行数:27,代码来源:wish.cpp

示例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"));
        }
开发者ID:Daidalon,项目名称:Cataclysm-DDA,代码行数:25,代码来源:wish.cpp

示例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" ) );
        }
开发者ID:Reclusive-reptile,项目名称:Cataclysm-DDA,代码行数:28,代码来源:wish.cpp


注:本文中的monster::print_info方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。