|
|
@ -894,25 +894,29 @@ private:
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (statspec == NULL || _settings_client.gui.station_dragdrop) return;
|
|
|
|
if (statspec == NULL || _settings_client.gui.station_dragdrop) return;
|
|
|
|
|
|
|
|
|
|
|
|
/* If current number of tracks is not allowed, make it as big as possible (which is always less than currently selected) */
|
|
|
|
/* If current number of tracks is not allowed, make it as big as possible */
|
|
|
|
if (HasBit(statspec->disallowed_platforms, _settings_client.gui.station_numtracks - 1)) {
|
|
|
|
if (HasBit(statspec->disallowed_platforms, _settings_client.gui.station_numtracks - 1)) {
|
|
|
|
this->RaiseWidget(_settings_client.gui.station_numtracks + WID_BRAS_PLATFORM_NUM_BEGIN);
|
|
|
|
this->RaiseWidget(_settings_client.gui.station_numtracks + WID_BRAS_PLATFORM_NUM_BEGIN);
|
|
|
|
_settings_client.gui.station_numtracks = 1;
|
|
|
|
_settings_client.gui.station_numtracks = 1;
|
|
|
|
|
|
|
|
if (statspec->disallowed_platforms != UINT8_MAX) {
|
|
|
|
while (HasBit(statspec->disallowed_platforms, _settings_client.gui.station_numtracks - 1)) {
|
|
|
|
while (HasBit(statspec->disallowed_platforms, _settings_client.gui.station_numtracks - 1)) {
|
|
|
|
_settings_client.gui.station_numtracks++;
|
|
|
|
_settings_client.gui.station_numtracks++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this->LowerWidget(_settings_client.gui.station_numtracks + WID_BRAS_PLATFORM_NUM_BEGIN);
|
|
|
|
this->LowerWidget(_settings_client.gui.station_numtracks + WID_BRAS_PLATFORM_NUM_BEGIN);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (HasBit(statspec->disallowed_lengths, _settings_client.gui.station_platlength - 1)) {
|
|
|
|
if (HasBit(statspec->disallowed_lengths, _settings_client.gui.station_platlength - 1)) {
|
|
|
|
this->RaiseWidget(_settings_client.gui.station_platlength + WID_BRAS_PLATFORM_LEN_BEGIN);
|
|
|
|
this->RaiseWidget(_settings_client.gui.station_platlength + WID_BRAS_PLATFORM_LEN_BEGIN);
|
|
|
|
_settings_client.gui.station_platlength = 1;
|
|
|
|
_settings_client.gui.station_platlength = 1;
|
|
|
|
|
|
|
|
if (statspec->disallowed_lengths != UINT8_MAX) {
|
|
|
|
while (HasBit(statspec->disallowed_lengths, _settings_client.gui.station_platlength - 1)) {
|
|
|
|
while (HasBit(statspec->disallowed_lengths, _settings_client.gui.station_platlength - 1)) {
|
|
|
|
_settings_client.gui.station_platlength++;
|
|
|
|
_settings_client.gui.station_platlength++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this->LowerWidget(_settings_client.gui.station_platlength + WID_BRAS_PLATFORM_LEN_BEGIN);
|
|
|
|
this->LowerWidget(_settings_client.gui.station_platlength + WID_BRAS_PLATFORM_LEN_BEGIN);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
public:
|
|
|
|
BuildRailStationWindow(WindowDesc *desc, Window *parent, bool newstation) : PickerWindowBase(desc, parent)
|
|
|
|
BuildRailStationWindow(WindowDesc *desc, Window *parent, bool newstation) : PickerWindowBase(desc, parent)
|
|
|
|