//--------- Begin of function Unit::disp_main_menu ---------// // void Unit::disp_main_menu(int refreshFlag) { disp_basic_info(INFO_Y1, refreshFlag); disp_unit_profile( INFO_Y1+52, refreshFlag ); if( !should_show_info() ) return; //---------------------------------// int y=INFO_Y1+98; if( race_id ) { disp_unit_info( y, refreshFlag ); y += 89; } //---------------------------------// if( is_own_spy() ) { disp_spy_menu(y, refreshFlag); y+=spy_menu_height()+3; } if( is_own() ) { if( refreshFlag == INFO_REPAINT ) disp_button(y); y+=BUTTON_ACTION_HEIGHT; } #ifdef DEBUG if( sys.debug_session || sys.testing_session ) disp_debug_info(this, INFO_Y2-68, refreshFlag); #endif }
void Sys::disp_frame() { if( sys.signal_exit_flag ) return; if( option_menu.is_active() ) { // ##### begin Gilbert 3/11 ######// option_menu.disp(need_redraw_flag); // ##### end Gilbert 3/11 ######// blt_virtual_buf(); } else { // -------- re-draw the whole screen if needed, such as after task switching ---------// if( need_redraw_flag ) { info.disp_panel(); world.paint(); disp_button(); world.refresh(); disp_view(); if( in_game_menu.is_active() ) { vga.use_back(); in_game_menu.disp(); vga.use_front(); } vga_util.blt_buf(0,0, VGA_WIDTH-1, VGA_HEIGHT-1, 0); // ###### begin Gilbert 4/11 ######// disp_view_mode(); // ###### end Gilbert 4/11 ######// info.disp(); } else { update_view(); info.update(); } //--------- display the map and info area --------// disp_map(); blt_virtual_buf(); //---------- display help ----------// if( !remote.is_enable() ) // help is only available in a single player game as it has to pause the game help.disp(); } // ####### end Glbert 24/10 #######// anim_line.inc_phase(); // originally in Sys::process() need_redraw_flag = 0; }
//--------- Begin of function Info::disp_nation ---------// // // <int> refreshFlag - INFO_REPAINT - the user has just switched // to this report. // INFO_UPDATE - the report is already in this mode, // just keep displaying and updating. // void Info::disp_nation(int refreshFlag) { //--------- Create nation income and expenses browsers -------// int x=REPORT_BROWSE_X1+9, y=REPORT_BROWSE_Y1+4; vga_back.d3_panel_up(REPORT_BROWSE_X1, REPORT_BROWSE_Y1, REPORT_BROWSE_X2, REPORT_BROWSE_Y1+33 ); font_san.put( x , y+7, "Kingdom" ); font_san.put( x+185, y+7, "Reputation" ); font_san.put( x+275, y+7, "Status" ); #if(defined(SPANISH)) font_san.put( x+335, y , "Allow" ); font_san.put( x+335, y+13, "Attack" ); font_san.put( x+395, y, "Acuerdo" ); font_san.put( x+395, y+13, "Comerc." ); font_san.put( x+468, y , "Cantidad" ); font_san.put( x+468, y+13, "Comerciada" ); #elif(defined(FRENCH)) font_san.put( x+335, y , "Allow" ); font_san.put( x+335, y+13, "Attack" ); font_san.put( x+395, y, "Accord" ); font_san.put( x+395, y+13, "Commercial" ); font_san.put( x+473, y , "Montant" ); font_san.put( x+473, y+13, "Commercial" ); #elif(defined(GERMAN)) font_san.put( x+345, y , "Allow" ); font_san.put( x+343, y+13, "Attack" ); font_san.put( x+405, y , "Handels-" ); font_san.put( x+405, y+13, "Vertrag" ); font_san.put( x+465, y , "Handels-" ); font_san.put( x+465, y+13, "Betrag" ); #else font_san.put( x+345, y , "Allow" ); font_san.put( x+343, y+13, "Attack" ); font_san.put( x+405, y , "Trade" ); font_san.put( x+405, y+13, "Treaty" ); font_san.put( x+465, y , "Trade" ); font_san.put( x+465, y+13, "Amount" ); #endif if( refreshFlag == INFO_REPAINT ) { browse_nation.init( REPORT_BROWSE_X1, REPORT_BROWSE_Y1+35, REPORT_BROWSE_X2, REPORT_BROWSE_Y2, 0, 20, nation_filter(), put_nation_rec, 1 ); browse_nation.open(browse_nation_recno); } else { browse_nation.paint(); browse_nation.open(browse_nation_recno, nation_filter()); } browse_nation_recno = browse_nation.recno(); //------- disp report buttons --------// disp_button(); //--------- display detail info --------// if( refreshFlag==INFO_REPAINT ) { info.last_talk_nation_recno = 0; browse_talk_msg_recno = 1; } disp_detail(refreshFlag); }
//--------- Begin of function Info::disp_nation ---------// // // <int> refreshFlag - INFO_REPAINT - the user has just switched // to this report. // INFO_UPDATE - the report is already in this mode, // just keep displaying and updating. // void Info::disp_nation(int refreshFlag) { int hideNationBrowse = nation_report_mode == NATION_REPORT_CHAT && hide_nation_browse; //--------- Create nation income and expenses browsers -------// if( !hideNationBrowse ) { int x=REPORT_BROWSE_X1+9, y=REPORT_BROWSE_Y1+4; vga_back.d3_panel_up(REPORT_BROWSE_X1, REPORT_BROWSE_Y1, REPORT_BROWSE_X2, REPORT_BROWSE_Y1+33 ); font_bld.put( x , y+7, text_reports.str_nat_kingdom()); // "Kingdom" ); #if(defined(CHINESE)) font_bld.right_put( x+235 +3, y+7, text_reports.str_nat_reputation()); // "Reputation" ); font_bld.put( x+265 -6, y+7, text_reports.str_nat_status()); // "Status" ); #else font_bld.right_put( x+235, y+7, text_reports.str_nat_reputation()); font_bld.put( x+265, y+7, text_reports.str_nat_status()); // "Status" ); #endif #if(defined(CHINESE)) font_bld.put_paragraph( x+343-8, y+7, x+405, y+28+7, text_reports.str_nat_allow_attack(), 0 ); #else #if(defined(GERMAN)) #define X_SHIFT -5 #else #define X_SHIFT 0 #endif font_bld.put_paragraph( x+343+X_SHIFT, y, x+405+X_SHIFT, y+28, text_reports.str_nat_allow_attack(), 0 ); #undef X_SHIFT #endif //SXM #if(defined(CHINESE)) font_bld.put_paragraph( x+405 -16, y+7, x+465, y+28+7, text_reports.str_nat_trade_treaty(), 0 ); font_bld.put_paragraph( x+465 -14, y+7, x+525, y+28+7, text_reports.str_nat_trade_amount(), 0 ); #else // font_bld.put( x+405, y , "Trade" ); // font_bld.put( x+405, y+13, "Treaty" ); font_bld.put_paragraph( x+405, y, x+465, y+28, text_reports.str_nat_trade_treaty(), 0 ); // font_bld.put( x+465, y , "Trade" ); // font_bld.put( x+465, y+13, "Amount" ); font_bld.put_paragraph( x+465, y, x+525, y+28, text_reports.str_nat_trade_amount(), 0 ); #endif //SXM } if( refreshFlag == INFO_REPAINT ) { browse_nation.init( REPORT_BROWSE_X1, REPORT_BROWSE_Y1+35, REPORT_BROWSE_X2, REPORT_BROWSE_Y2, 0, 20, info.nation_filter(), put_nation_rec, 1 ); if( !hideNationBrowse ) browse_nation.open(browse_nation_recno); } else { if( !hideNationBrowse ) { browse_nation.paint(); browse_nation.open(browse_nation_recno, nation_filter()); } } if( !hideNationBrowse ) browse_nation_recno = browse_nation.recno(); else { int nCount; if( browse_nation_recno > (nCount = nation_filter()) ) browse_nation_recno = nCount; // avoid browse_nation_recno too large } //------- disp report buttons --------// disp_button(); //--------- display detail info --------// if( refreshFlag==INFO_REPAINT ) { info.last_talk_nation_recno = 0; browse_talk_msg_recno = 1; } disp_detail(refreshFlag); }