~widelands-dev/widelands/trunk

« back to all changes in this revision

Viewing changes to src/ui_fsmenu/multiplayersetupgroup.cc

  • Committer: The Widelands Bunnybot
  • Date: 2024-10-19 13:45:54 UTC
  • Revision ID: bunnybot@widelands.org-20241019134554-kz2gcbecf0y7bd7n
170 files were automatically formatted.

(by bunnybot)
5a9087b08ab9bbc48795ff0f7f1f370f60108b1a

Show diffs side-by-side

added added

removed removed

Lines of Context:
394
394
        /// Whether the client who is running the UI is allowed to change the tribe for this player slot.
395
395
        bool has_tribe_access() const {
396
396
                return settings_->settings().players[id_].state == PlayerSettings::State::kShared ?
397
 
                settings_->can_change_player_init(id_) :
398
 
                settings_->can_change_player_tribe(id_);
 
397
                          settings_->can_change_player_init(id_) :
 
398
                          settings_->can_change_player_tribe(id_);
399
399
        }
400
400
 
401
401
        /// This will update the game settings for the tribe or shared_in with the value
407
407
                const PlayerSettings& player_settings = settings_->settings().players[id_];
408
408
                tribe_selection_locked_ = true;
409
409
                tribes_dropdown_.set_disable_style(player_settings.state == PlayerSettings::State::kShared ?
410
 
                                            UI::ButtonDisableStyle::kPermpressed :
411
 
                                            UI::ButtonDisableStyle::kFlat);
 
410
                                                      UI::ButtonDisableStyle::kPermpressed :
 
411
                                                      UI::ButtonDisableStyle::kFlat);
412
412
                if (tribes_dropdown_.has_selection()) {
413
413
                        if (player_settings.state == PlayerSettings::State::kShared) {
414
414
                                n->set_player_shared(id_, stoul(tribes_dropdown_.get_selected()));