forked from mirror/OpenTTD
This commit is contained in:
@@ -10,7 +10,10 @@
|
||||
#ifndef PICKER_FUNC_H
|
||||
#define PICKER_FUNC_H
|
||||
|
||||
#include "ini_type.h"
|
||||
|
||||
void PickerLoadConfig(const IniFile &ini);
|
||||
void PickerSaveConfig(IniFile &ini);
|
||||
void InvalidateAllPickerWindows();
|
||||
|
||||
#endif /* PICKER_FUNC_H */
|
||||
|
@@ -678,3 +678,13 @@ std::unique_ptr<NWidgetBase> MakePickerTypeWidgets()
|
||||
|
||||
return MakeNWidgets(picker_type_widgets, nullptr);
|
||||
}
|
||||
|
||||
void InvalidateAllPickerWindows()
|
||||
{
|
||||
InvalidateWindowClassesData(WC_BUS_STATION, PickerWindow::PICKER_INVALIDATION_ALL);
|
||||
InvalidateWindowClassesData(WC_TRUCK_STATION, PickerWindow::PICKER_INVALIDATION_ALL);
|
||||
InvalidateWindowClassesData(WC_SELECT_STATION, PickerWindow::PICKER_INVALIDATION_ALL);
|
||||
InvalidateWindowClassesData(WC_BUILD_WAYPOINT, PickerWindow::PICKER_INVALIDATION_ALL);
|
||||
InvalidateWindowClassesData(WC_BUILD_OBJECT, PickerWindow::PICKER_INVALIDATION_ALL);
|
||||
InvalidateWindowClassesData(WC_BUILD_HOUSE, PickerWindow::PICKER_INVALIDATION_ALL);
|
||||
}
|
||||
|
@@ -63,6 +63,7 @@
|
||||
#include "../timer/timer_game_calendar.h"
|
||||
#include "../timer/timer_game_economy.h"
|
||||
#include "../timer/timer_game_tick.h"
|
||||
#include "../picker_func.h"
|
||||
|
||||
#include "saveload_internal.h"
|
||||
|
||||
@@ -3418,6 +3419,7 @@ void ReloadNewGRFData()
|
||||
/* Update company infrastructure counts. */
|
||||
InvalidateWindowClassesData(WC_COMPANY_INFRASTRUCTURE);
|
||||
InvalidateWindowClassesData(WC_BUILD_TOOLBAR);
|
||||
InvalidateAllPickerWindows();
|
||||
/* redraw the whole screen */
|
||||
MarkWholeScreenDirty();
|
||||
CheckTrainsLengths();
|
||||
|
Reference in New Issue
Block a user