|
|
@ -998,12 +998,12 @@ public:
|
|
|
|
|
|
|
|
|
|
|
|
this->FinishInitNested(TRANSPORT_RAIL);
|
|
|
|
this->FinishInitNested(TRANSPORT_RAIL);
|
|
|
|
|
|
|
|
|
|
|
|
this->LowerWidget(_railstation.orientation + WID_BRAS_PLATFORM_DIR_X);
|
|
|
|
this->LowerWidget(WID_BRAS_PLATFORM_DIR_X + _railstation.orientation);
|
|
|
|
if (_settings_client.gui.station_dragdrop) {
|
|
|
|
if (_settings_client.gui.station_dragdrop) {
|
|
|
|
this->LowerWidget(WID_BRAS_PLATFORM_DRAG_N_DROP);
|
|
|
|
this->LowerWidget(WID_BRAS_PLATFORM_DRAG_N_DROP);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
this->LowerWidget(_settings_client.gui.station_numtracks + WID_BRAS_PLATFORM_NUM_BEGIN);
|
|
|
|
this->LowerWidget(WID_BRAS_PLATFORM_NUM_BEGIN + _settings_client.gui.station_numtracks);
|
|
|
|
this->LowerWidget(_settings_client.gui.station_platlength + WID_BRAS_PLATFORM_LEN_BEGIN);
|
|
|
|
this->LowerWidget(WID_BRAS_PLATFORM_LEN_BEGIN + _settings_client.gui.station_platlength);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this->SetWidgetLoweredState(WID_BRAS_HIGHLIGHT_OFF, !_settings_client.gui.station_show_coverage);
|
|
|
|
this->SetWidgetLoweredState(WID_BRAS_HIGHLIGHT_OFF, !_settings_client.gui.station_show_coverage);
|
|
|
|
this->SetWidgetLoweredState(WID_BRAS_HIGHLIGHT_ON, _settings_client.gui.station_show_coverage);
|
|
|
|
this->SetWidgetLoweredState(WID_BRAS_HIGHLIGHT_ON, _settings_client.gui.station_show_coverage);
|
|
|
@ -1328,9 +1328,9 @@ public:
|
|
|
|
switch (widget) {
|
|
|
|
switch (widget) {
|
|
|
|
case WID_BRAS_PLATFORM_DIR_X:
|
|
|
|
case WID_BRAS_PLATFORM_DIR_X:
|
|
|
|
case WID_BRAS_PLATFORM_DIR_Y:
|
|
|
|
case WID_BRAS_PLATFORM_DIR_Y:
|
|
|
|
this->RaiseWidget(_railstation.orientation + WID_BRAS_PLATFORM_DIR_X);
|
|
|
|
this->RaiseWidget(WID_BRAS_PLATFORM_DIR_X + _railstation.orientation);
|
|
|
|
_railstation.orientation = (Axis)(widget - WID_BRAS_PLATFORM_DIR_X);
|
|
|
|
_railstation.orientation = (Axis)(widget - WID_BRAS_PLATFORM_DIR_X);
|
|
|
|
this->LowerWidget(_railstation.orientation + WID_BRAS_PLATFORM_DIR_X);
|
|
|
|
this->LowerWidget(WID_BRAS_PLATFORM_DIR_X + _railstation.orientation);
|
|
|
|
if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP);
|
|
|
|
if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP);
|
|
|
|
this->SetDirty();
|
|
|
|
this->SetDirty();
|
|
|
|
CloseWindowById(WC_SELECT_STATION, 0);
|
|
|
|
CloseWindowById(WC_SELECT_STATION, 0);
|
|
|
@ -1343,7 +1343,7 @@ public:
|
|
|
|
case WID_BRAS_PLATFORM_NUM_5:
|
|
|
|
case WID_BRAS_PLATFORM_NUM_5:
|
|
|
|
case WID_BRAS_PLATFORM_NUM_6:
|
|
|
|
case WID_BRAS_PLATFORM_NUM_6:
|
|
|
|
case WID_BRAS_PLATFORM_NUM_7: {
|
|
|
|
case WID_BRAS_PLATFORM_NUM_7: {
|
|
|
|
this->RaiseWidget(_settings_client.gui.station_numtracks + WID_BRAS_PLATFORM_NUM_BEGIN);
|
|
|
|
this->RaiseWidget(WID_BRAS_PLATFORM_NUM_BEGIN + _settings_client.gui.station_numtracks);
|
|
|
|
this->RaiseWidget(WID_BRAS_PLATFORM_DRAG_N_DROP);
|
|
|
|
this->RaiseWidget(WID_BRAS_PLATFORM_DRAG_N_DROP);
|
|
|
|
|
|
|
|
|
|
|
|
_settings_client.gui.station_numtracks = widget - WID_BRAS_PLATFORM_NUM_BEGIN;
|
|
|
|
_settings_client.gui.station_numtracks = widget - WID_BRAS_PLATFORM_NUM_BEGIN;
|
|
|
@ -1894,7 +1894,7 @@ struct BuildRailDepotWindow : public PickerWindowBase {
|
|
|
|
BuildRailDepotWindow(WindowDesc *desc, Window *parent) : PickerWindowBase(desc, parent)
|
|
|
|
BuildRailDepotWindow(WindowDesc *desc, Window *parent) : PickerWindowBase(desc, parent)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
this->InitNested(TRANSPORT_RAIL);
|
|
|
|
this->InitNested(TRANSPORT_RAIL);
|
|
|
|
this->LowerWidget(_build_depot_direction + WID_BRAD_DEPOT_NE);
|
|
|
|
this->LowerWidget(WID_BRAD_DEPOT_NE + _build_depot_direction);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void UpdateWidgetSize(WidgetID widget, Dimension *size, [[maybe_unused]] const Dimension &padding, [[maybe_unused]] Dimension *fill, [[maybe_unused]] Dimension *resize) override
|
|
|
|
void UpdateWidgetSize(WidgetID widget, Dimension *size, [[maybe_unused]] const Dimension &padding, [[maybe_unused]] Dimension *fill, [[maybe_unused]] Dimension *resize) override
|
|
|
@ -1926,9 +1926,9 @@ struct BuildRailDepotWindow : public PickerWindowBase {
|
|
|
|
case WID_BRAD_DEPOT_SE:
|
|
|
|
case WID_BRAD_DEPOT_SE:
|
|
|
|
case WID_BRAD_DEPOT_SW:
|
|
|
|
case WID_BRAD_DEPOT_SW:
|
|
|
|
case WID_BRAD_DEPOT_NW:
|
|
|
|
case WID_BRAD_DEPOT_NW:
|
|
|
|
this->RaiseWidget(_build_depot_direction + WID_BRAD_DEPOT_NE);
|
|
|
|
this->RaiseWidget(WID_BRAD_DEPOT_NE + _build_depot_direction);
|
|
|
|
_build_depot_direction = (DiagDirection)(widget - WID_BRAD_DEPOT_NE);
|
|
|
|
_build_depot_direction = (DiagDirection)(widget - WID_BRAD_DEPOT_NE);
|
|
|
|
this->LowerWidget(_build_depot_direction + WID_BRAD_DEPOT_NE);
|
|
|
|
this->LowerWidget(WID_BRAD_DEPOT_NE + _build_depot_direction);
|
|
|
|
if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP);
|
|
|
|
if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP);
|
|
|
|
this->SetDirty();
|
|
|
|
this->SetDirty();
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|