|
@@ -178,13 +178,13 @@ struct BuildDocksToolbarWindow : Window
|
|
|
virtual void OnPaint()
|
|
|
{
|
|
|
this->SetWidgetsDisabledState(!CanBuildVehicleInfrastructure(VEH_SHIP), DTW_DEPOT, DTW_STATION, DTW_BUOY, WIDGET_LIST_END);
|
|
|
this->DrawWidgets();
|
|
|
}
|
|
|
|
|
|
virtual void OnClick(Point pt, int widget)
|
|
|
virtual void OnClick(Point pt, int widget, int click_count)
|
|
|
{
|
|
|
if (widget >= DTW_BUTTONS_BEGIN) _build_docks_button_proc[widget - DTW_BUTTONS_BEGIN](this);
|
|
|
}
|
|
|
|
|
|
virtual EventState OnKeyPress(uint16 key, uint16 keycode)
|
|
|
{
|
|
@@ -369,13 +369,13 @@ public:
|
|
|
/* Resize background if the text is not equally long as the window. */
|
|
|
if (top > bottom || (top < bottom && back_nwi->current_y > back_nwi->smallest_y)) {
|
|
|
ResizeWindow(this, 0, top - bottom);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
virtual void OnClick(Point pt, int widget)
|
|
|
virtual void OnClick(Point pt, int widget, int click_count)
|
|
|
{
|
|
|
switch (widget) {
|
|
|
case BDSW_LT_OFF:
|
|
|
case BDSW_LT_ON:
|
|
|
this->RaiseWidget(_settings_client.gui.station_show_coverage + BDSW_LT_OFF);
|
|
|
_settings_client.gui.station_show_coverage = (widget != BDSW_LT_OFF);
|
|
@@ -454,13 +454,13 @@ public:
|
|
|
DrawShipDepotSprite(this->GetWidget<NWidgetBase>(BDDW_X)->pos_x + 64, this->GetWidget<NWidgetBase>(BDDW_X)->pos_y + 18, 0);
|
|
|
DrawShipDepotSprite(this->GetWidget<NWidgetBase>(BDDW_X)->pos_x + 32, this->GetWidget<NWidgetBase>(BDDW_X)->pos_y + 34, 1);
|
|
|
DrawShipDepotSprite(this->GetWidget<NWidgetBase>(BDDW_Y)->pos_x + 32, this->GetWidget<NWidgetBase>(BDDW_Y)->pos_y + 18, 2);
|
|
|
DrawShipDepotSprite(this->GetWidget<NWidgetBase>(BDDW_Y)->pos_x + 64, this->GetWidget<NWidgetBase>(BDDW_Y)->pos_y + 34, 3);
|
|
|
}
|
|
|
|
|
|
virtual void OnClick(Point pt, int widget)
|
|
|
virtual void OnClick(Point pt, int widget, int click_count)
|
|
|
{
|
|
|
switch (widget) {
|
|
|
case BDDW_X:
|
|
|
case BDDW_Y:
|
|
|
this->RaiseWidget(_ship_depot_direction + BDDW_X);
|
|
|
_ship_depot_direction = (widget == BDDW_X ? AXIS_X : AXIS_Y);
|