~qcumber-some/widelands/spice-up-cmake

« back to all changes in this revision

Viewing changes to src/ui_fsmenu/options.cc

  • Committer: Jens Beyer (Qcumber-some)
  • Date: 2010-05-28 14:51:37 UTC
  • mfrom: (5149.1.226 trunk)
  • Revision ID: qcumber-some@buerotiger.de-20100528145137-0pyil9qw7szyztsw
MergeĀ fromĀ trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
47
47
 
48
48
// Buttons
49
49
        m_advanced_options
50
 
                (this,
 
50
                (this, "advanced_options",
51
51
                 m_xres * 9 / 80, m_yres * 19 / 20, m_butw, m_buth,
52
52
                 g_gr->get_picture(PicMod_UI, "pics/but2.png"),
53
53
                 &Fullscreen_Menu_Options::advanced_options, *this,
54
54
                 _("Advanced Options"), std::string(), true, false,
55
55
                 m_fn, m_fs),
56
56
        m_cancel
57
 
                (this,
 
57
                (this, "cancel",
58
58
                 m_xres * 51 / 80, m_yres * 19 / 20, m_butw, m_buth,
59
59
                 g_gr->get_picture(PicMod_UI, "pics/but0.png"),
60
60
                 &Fullscreen_Menu_Options::end_modal, *this, om_cancel,
61
61
                 _("Cancel"), std::string(), true, false,
62
62
                 m_fn, m_fs),
63
63
        m_apply
64
 
                (this,
 
64
                (this, "apply",
65
65
                 m_xres * 3 / 8, m_yres * 19 / 20, m_butw, m_buth,
66
66
                 g_gr->get_picture(PicMod_UI, "pics/but2.png"),
67
67
                 &Fullscreen_Menu_Options::end_modal, *this, om_ok,
231
231
        m_label_remove_replays           .set_font(m_fn, m_fs, UI_FONT_CLR_FG);
232
232
 
233
233
        //  GRAPHIC_TODO: this shouldn't be here List all resolutions
234
 
        SDL_PixelFormat & fmt = *SDL_GetVideoInfo()->vfmt;
 
234
        // take a copy to not change real video info structure
 
235
        SDL_PixelFormat  fmt = *SDL_GetVideoInfo()->vfmt;
235
236
        fmt.BitsPerPixel = 16;
236
237
        if
237
238
                (SDL_Rect const * const * const modes =
281
282
 
282
283
        // Fill language list
283
284
        m_language_list.add
284
 
                (_("System default language"), "",
 
285
                (_("Try system language"), "", // "try", as many translations are missing.
285
286
                 g_gr->get_no_picture(), "" == opt.language);
 
287
 
 
288
        m_language_list.add
 
289
                ("English", "en",
 
290
                 g_gr->get_no_picture(), "en" == opt.language);
286
291
                 
287
292
        filenameset_t files;
288
293
        Section * s = &g_options.pull_section("global");
289
294
        g_fs->FindFiles(s->get_string("localedir", INSTALL_LOCALEDIR), "*", &files);
290
295
        Profile ln("txts/languages");
291
296
        s = &ln.pull_section("languages");
292
 
        bool own_selected = false;
 
297
        bool own_selected = "" == opt.language || "en" == opt.language;
293
298
 
294
299
        // Add translation directories to the list
295
300
        for
372
377
 
373
378
// Buttons
374
379
        m_cancel
375
 
                (this,
 
380
                (this, "cancel",
376
381
                 m_xres * 41 / 80, m_yres * 19 / 20, m_butw, m_buth,
377
382
                 g_gr->get_picture(PicMod_UI, "pics/but0.png"),
378
383
                 &Fullscreen_Menu_Advanced_Options::end_modal, *this, om_cancel,
379
384
                 _("Cancel"), std::string(), true, false,
380
385
                 m_fn, m_fs),
381
386
        m_apply
382
 
                (this,
 
387
                (this, "apply",
383
388
                 m_xres / 4,   m_yres * 19 / 20, m_butw, m_buth,
384
389
                 g_gr->get_picture(PicMod_UI, "pics/but2.png"),
385
390
                 &Fullscreen_Menu_Advanced_Options::end_modal, *this, om_ok,