~ubuntu-branches/ubuntu/raring/simutrans/raring-proposed

« back to all changes in this revision

Viewing changes to gui/stadt_info.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:
36
36
 
37
37
const int hist_type_color[MAX_CITY_HISTORY] =
38
38
{
39
 
        COL_WHITE, COL_DARK_GREEN, COL_LIGHT_PURPLE, COL_POWERLINES,
 
39
        COL_WHITE, COL_DARK_GREEN, COL_LIGHT_PURPLE, 110,
40
40
        COL_LIGHT_BLUE, COL_BLUE, COL_LIGHT_YELLOW, COL_YELLOW,
41
 
        COL_LIGHT_BROWN, COL_BROWN
 
41
        COL_LIGHT_BROWN, COL_BROWN, 87
42
42
};
43
43
 
44
44
 
45
45
stadt_info_t::stadt_info_t(stadt_t* stadt_) :
46
 
        gui_frame_t("Stadtinformation"),
 
46
        gui_frame_t( name, NULL ),
47
47
        stadt(stadt_)
48
48
{
49
49
        reset_city_name();
117
117
        rename_city();
118
118
}
119
119
 
 
120
// returns position of depot on the map
 
121
koord3d stadt_info_t::get_weltpos()
 
122
{
 
123
        return koord3d( stadt->get_pos(), 0 );
 
124
}
 
125
 
 
126
 
120
127
/**
121
128
 * send rename command if necessary
122
129
 */
128
135
                // otherwise some unintended undo if renaming would occur
129
136
                if(  t  &&  t[0]  &&  strcmp(t, stadt->get_name())  &&  strcmp(old_name, stadt->get_name())==0) {
130
137
                        // text changed => call tool
131
 
                        cbuffer_t buf(300);
 
138
                        cbuffer_t buf;
132
139
                        buf.printf( "t%u,%s", stadt->get_welt()->get_staedte().index_of(stadt), name );
133
140
                        werkzeug_t *w = create_tool( WKZ_RENAME_TOOL | SIMPLE_TOOL );
134
141
                        w->set_default_param( buf );
189
196
 
190
197
        gui_frame_t::zeichnen(pos, gr);
191
198
 
192
 
        static cbuffer_t buf(1024);
 
199
        static cbuffer_t buf;
193
200
        buf.clear();
194
201
 
195
202
        buf.append( translator::translate("City size") );