~ubuntu-branches/ubuntu/precise/simutrans/precise

« back to all changes in this revision

Viewing changes to gui/gui_convoiinfo.cc

  • Committer: Package Import Robot
  • Author(s): Ansgar Burchardt
  • Date: 2011-11-03 19:59:02 UTC
  • mfrom: (1.2.7)
  • Revision ID: package-import@ubuntu.com-20111103195902-uopgwf488mfctb75
Tags: 111.0-1
* New upstream release.
* debian/rules: Update get-orig-source target for new upstream release.
* Use xz compression for source and binary packages.
* Use override_* targets to simplify debian/rules.

Show diffs side-by-side

added added

removed removed

Lines of Context:
63
63
{
64
64
        clip_dimension clip = display_get_clip_wh();
65
65
        if(! ((pos.y+offset.y) > clip.yy ||  (pos.y+offset.y) < clip.y-32) &&  cnv.is_bound()) {
66
 
                int max_x = display_proportional_clip(pos.x+offset.x+2,pos.y+offset.y+8+LINESPACE, translator::translate("Gewinn"), ALIGN_LEFT, COL_BLACK, true);
 
66
                int max_x = display_proportional_clip(pos.x+offset.x+2,pos.y+offset.y+6+LINESPACE, translator::translate("Gewinn"), ALIGN_LEFT, COL_BLACK, true);
67
67
 
68
68
                char buf[256];
69
69
                money_to_string(buf, (double)(cnv->get_jahresgewinn()/100) );
70
 
                max_x += display_proportional_clip(pos.x+offset.x+2+max_x+5,pos.y+offset.y+8+LINESPACE, buf, ALIGN_LEFT, cnv->get_jahresgewinn()>0?MONEY_PLUS:MONEY_MINUS, true);
 
70
                max_x += display_proportional_clip(pos.x+offset.x+2+max_x+5,pos.y+offset.y+6+LINESPACE, buf, ALIGN_LEFT, cnv->get_jahresgewinn()>0?MONEY_PLUS:MONEY_MINUS, true);
71
71
 
72
72
                /*
73
73
                * only show assigned line, if there is one!
74
74
                */
75
75
                if (cnv->in_depot()) {
76
76
                        const char *txt=translator::translate("(in depot)");
77
 
                        int w=display_proportional_clip(pos.x+offset.x+2, pos.y+offset.y+8+2*LINESPACE,txt,ALIGN_LEFT, COL_BLACK, true);
 
77
                        int w=display_proportional_clip(pos.x+offset.x+2, pos.y+offset.y+6+2*LINESPACE,txt,ALIGN_LEFT, COL_BLACK, true);
78
78
                        max_x = max(max_x,w+2);
79
79
                }
80
80
                else if(cnv->get_line().is_bound()) {
81
 
                        sint16 w = display_proportional_clip( pos.x+offset.x+2, pos.y+offset.y+8+2*LINESPACE, translator::translate("Line"), ALIGN_LEFT, COL_BLACK, true );
82
 
                        w += display_proportional_clip( pos.x+offset.x+2+w+5, pos.y+offset.y+8+2*LINESPACE, cnv->get_line()->get_name(), ALIGN_LEFT, cnv->get_line()->get_state_color(), true );
 
81
                        sint16 w = display_proportional_clip( pos.x+offset.x+2, pos.y+offset.y+6+2*LINESPACE, translator::translate("Line"), ALIGN_LEFT, COL_BLACK, true );
 
82
                        w += display_proportional_clip( pos.x+offset.x+2+w+5, pos.y+offset.y+6+2*LINESPACE, cnv->get_line()->get_name(), ALIGN_LEFT, cnv->get_line()->get_state_color(), true );
83
83
                        max_x = max(max_x,w+5);
84
84
                }
85
85
 
89
89
 
90
90
                // we will use their images offests and width to shift them to their correct position
91
91
                // this should work with any vehicle size ...
92
 
                const int xoff = max(128, max_x);
 
92
                const int xoff = max(190, max_x);
93
93
                int left = pos.x+offset.x+xoff+4;
94
94
                for(unsigned i=0; i<cnv->get_vehikel_anzahl();i++) {
95
95
                        KOORD_VAL x, y, w, h;
100
100
                }
101
101
 
102
102
                // use the convoi status color for redraw: Possible colors are YELLOW (not moving) BLUE: obsolete in convoi, RED: minus income, BLACK: ok
103
 
                display_proportional_clip(pos.x+offset.x+2, pos.y+offset.y+8,cnv->get_name(),ALIGN_LEFT, cnv->get_status_color(), true);
 
103
                display_proportional_clip(pos.x+offset.x+2, pos.y+offset.y+6,cnv->get_name(),ALIGN_LEFT, cnv->get_status_color(), true);
104
104
 
105
105
                // since the only remaining object is the loading bar, we can alter its position this way ...
106
106
                filled_bar.zeichnen(pos+offset+koord(xoff,0));