equal
deleted
inserted
replaced
684 { |
684 { |
685 int y = NSSWND_START; |
685 int y = NSSWND_START; |
686 const FiosItem *item; |
686 const FiosItem *item; |
687 |
687 |
688 /* draw basic widgets */ |
688 /* draw basic widgets */ |
689 SetDParam(1, _connection_types_dropdown[_network_advertise]); |
689 SetDParam(1, _connection_types_dropdown[_settings_client.network.server_advertise]); |
690 SetDParam(2, _settings_client.network.max_clients); |
690 SetDParam(2, _settings_client.network.max_clients); |
691 SetDParam(3, _settings_client.network.max_companies); |
691 SetDParam(3, _settings_client.network.max_companies); |
692 SetDParam(4, _settings_client.network.max_spectators); |
692 SetDParam(4, _settings_client.network.max_spectators); |
693 SetDParam(5, STR_NETWORK_LANG_ANY + _settings_client.network.server_lang); |
693 SetDParam(5, STR_NETWORK_LANG_ANY + _settings_client.network.server_lang); |
694 this->DrawWidgets(); |
694 this->DrawWidgets(); |
746 this->map = (y == 0) ? NULL : _fios_items.Get(y - 1); |
746 this->map = (y == 0) ? NULL : _fios_items.Get(y - 1); |
747 this->SetDirty(); |
747 this->SetDirty(); |
748 } break; |
748 } break; |
749 |
749 |
750 case NSSW_CONNTYPE_BTN: // Connection type |
750 case NSSW_CONNTYPE_BTN: // Connection type |
751 ShowDropDownMenu(this, _connection_types_dropdown, _network_advertise, NSSW_CONNTYPE_BTN, 0, 0); // do it for widget NSSW_CONNTYPE_BTN |
751 ShowDropDownMenu(this, _connection_types_dropdown, _settings_client.network.server_advertise, NSSW_CONNTYPE_BTN, 0, 0); // do it for widget NSSW_CONNTYPE_BTN |
752 break; |
752 break; |
753 |
753 |
754 case NSSW_CLIENTS_BTND: case NSSW_CLIENTS_BTNU: // Click on up/down button for number of clients |
754 case NSSW_CLIENTS_BTND: case NSSW_CLIENTS_BTNU: // Click on up/down button for number of clients |
755 case NSSW_COMPANIES_BTND: case NSSW_COMPANIES_BTNU: // Click on up/down button for number of companies |
755 case NSSW_COMPANIES_BTND: case NSSW_COMPANIES_BTNU: // Click on up/down button for number of companies |
756 case NSSW_SPECTATORS_BTND: case NSSW_SPECTATORS_BTNU: // Click on up/down button for number of spectators |
756 case NSSW_SPECTATORS_BTND: case NSSW_SPECTATORS_BTNU: // Click on up/down button for number of spectators |
834 |
834 |
835 virtual void OnDropdownSelect(int widget, int index) |
835 virtual void OnDropdownSelect(int widget, int index) |
836 { |
836 { |
837 switch (widget) { |
837 switch (widget) { |
838 case NSSW_CONNTYPE_BTN: |
838 case NSSW_CONNTYPE_BTN: |
839 _network_advertise = (index != 0); |
839 _settings_client.network.server_advertise = (index != 0); |
840 break; |
840 break; |
841 case NSSW_LANGUAGE_BTN: |
841 case NSSW_LANGUAGE_BTN: |
842 _settings_client.network.server_lang = _language_dropdown[index] - STR_NETWORK_LANG_ANY; |
842 _settings_client.network.server_lang = _language_dropdown[index] - STR_NETWORK_LANG_ANY; |
843 break; |
843 break; |
844 default: |
844 default: |