~widelands-dev/widelands/localizeable_shipnames

« back to all changes in this revision

Viewing changes to src/ui_fsmenu/options.cc

  • Committer: GunChleoc
  • Date: 2017-04-22 08:40:21 UTC
  • mfrom: (8298.1.40 trunk)
  • Revision ID: fios@foramnagaidhlig.net-20170422084021-4u3vp59d9jkdfx63
Merged trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
95
95
     padding_(10),
96
96
 
97
97
     // Title
98
 
     title_(this, 0, 0, _("Options"), UI::Align::kHCenter),
 
98
     title_(this, 0, 0, _("Options"), UI::Align::kCenter),
99
99
 
100
100
     // Buttons
101
101
     button_box_(this, 0, 0, UI::Box::Horizontal),
138
138
                        0,
139
139
                        100,  // 100 is arbitrary, will be resized in layout().
140
140
                        100,  // 100 is arbitrary, will be resized in layout().
 
141
                        24,
141
142
                        _("Language")),
142
143
     resolution_dropdown_(&box_interface_,
143
144
                          0,
144
145
                          0,
145
146
                          100,  // 100 is arbitrary, will be resized in layout().
146
147
                          100,  // 100 is arbitrary, will be resized in layout().
 
148
                          24,
147
149
                          _("In-game resolution")),
148
150
 
149
151
     fullscreen_(&box_interface_, Vector2i(0, 0), _("Fullscreen"), "", 0),
236
238
        title_.set_fontsize(UI_FONT_SIZE_BIG);
237
239
 
238
240
        // Buttons
239
 
        button_box_.add(UI::g_fh1->fontset()->is_rtl() ? &ok_ : &cancel_, UI::Align::kHCenter);
240
 
        button_box_.add_inf_space();
241
 
        button_box_.add(&apply_, UI::Align::kHCenter);
242
 
        button_box_.add_inf_space();
243
 
        button_box_.add(UI::g_fh1->fontset()->is_rtl() ? &cancel_ : &ok_, UI::Align::kHCenter);
 
241
        button_box_.add(UI::g_fh1->fontset()->is_rtl() ? &ok_ : &cancel_);
 
242
        button_box_.add_inf_space();
 
243
        button_box_.add(&apply_);
 
244
        button_box_.add_inf_space();
 
245
        button_box_.add(UI::g_fh1->fontset()->is_rtl() ? &cancel_ : &ok_);
244
246
 
245
247
        // Tabs
246
248
        tabs_.add("options_interface", _("Interface"), &box_interface_, "");
261
263
        box_game_.set_size(tabs_.get_inner_w(), tabs_.get_inner_h());
262
264
 
263
265
        // Interface
264
 
        box_interface_.add(&language_dropdown_, UI::Align::kLeft);
265
 
        box_interface_.add(&resolution_dropdown_, UI::Align::kLeft);
266
 
        box_interface_.add(&fullscreen_, UI::Align::kLeft);
267
 
        box_interface_.add(&inputgrab_, UI::Align::kLeft);
268
 
        box_interface_.add(&sb_maxfps_, UI::Align::kLeft);
 
266
        box_interface_.add(&language_dropdown_);
 
267
        box_interface_.add(&resolution_dropdown_);
 
268
        box_interface_.add(&fullscreen_);
 
269
        box_interface_.add(&inputgrab_);
 
270
        box_interface_.add(&sb_maxfps_);
269
271
 
270
272
        // Windows
271
 
        box_windows_.add(&snap_win_overlap_only_, UI::Align::kLeft);
272
 
        box_windows_.add(&dock_windows_to_edges_, UI::Align::kLeft);
273
 
        box_windows_.add(&sb_dis_panel_, UI::Align::kLeft);
274
 
        box_windows_.add(&sb_dis_border_, UI::Align::kLeft);
 
273
        box_windows_.add(&snap_win_overlap_only_);
 
274
        box_windows_.add(&dock_windows_to_edges_);
 
275
        box_windows_.add(&sb_dis_panel_);
 
276
        box_windows_.add(&sb_dis_border_);
275
277
 
276
278
        // Sound
277
 
        box_sound_.add(&music_, UI::Align::kLeft);
278
 
        box_sound_.add(&fx_, UI::Align::kLeft);
279
 
        box_sound_.add(&message_sound_, UI::Align::kLeft);
 
279
        box_sound_.add(&music_);
 
280
        box_sound_.add(&fx_);
 
281
        box_sound_.add(&message_sound_);
280
282
 
281
283
        // Saving
282
 
        box_saving_.add(&sb_autosave_, UI::Align::kLeft);
283
 
        box_saving_.add(&sb_rolling_autosave_, UI::Align::kLeft);
284
 
        box_saving_.add(&zip_, UI::Align::kLeft);
285
 
        box_saving_.add(&write_syncstreams_, UI::Align::kLeft);
 
284
        box_saving_.add(&sb_autosave_);
 
285
        box_saving_.add(&sb_rolling_autosave_);
 
286
        box_saving_.add(&zip_);
 
287
        box_saving_.add(&write_syncstreams_);
286
288
 
287
289
        // Game
288
 
        box_game_.add(&auto_roadbuild_mode_, UI::Align::kLeft);
289
 
        box_game_.add(&show_workarea_preview_, UI::Align::kLeft);
290
 
        box_game_.add(&transparent_chat_, UI::Align::kLeft);
291
 
        box_game_.add(&single_watchwin_, UI::Align::kLeft);
 
290
        box_game_.add(&auto_roadbuild_mode_);
 
291
        box_game_.add(&show_workarea_preview_);
 
292
        box_game_.add(&transparent_chat_);
 
293
        box_game_.add(&single_watchwin_);
292
294
 
293
295
        // Bind actions
294
296
        cancel_.sigclicked.connect(boost::bind(&FullscreenMenuOptions::clicked_back, this));
631
633
 
632
634
        WLApplication::get()->set_input_grab(opt.inputgrab);
633
635
        i18n::set_locale(opt.language);
634
 
        UI::g_fh1->reinitialize_fontset();
 
636
        UI::g_fh1->reinitialize_fontset(i18n::get_locale());
635
637
        g_sound_handler.set_disable_music(!opt.music);
636
638
        g_sound_handler.set_disable_fx(!opt.fx);
637
639
}