Changeset - r28445:cc3abc9b847d
[Not reviewed]
master
0 5 0
Peter Nelson - 11 months ago 2024-01-14 16:47:10
peter1138@openttd.org
Codechange: Missing some conversions to WidgetID. (#11773)
5 files changed with 5 insertions and 5 deletions:
0 comments (0 inline, 0 general)
src/build_vehicle_gui.cpp
Show inline comments
 
@@ -1092,13 +1092,13 @@ void DrawEngineList(VehicleType type, co
 
 * Display the dropdown for the vehicle sort criteria.
 
 * @param w Parent window (holds the dropdown button).
 
 * @param vehicle_type %Vehicle type being sorted.
 
 * @param selected Currently selected sort criterium.
 
 * @param button Widget button.
 
 */
 
void DisplayVehicleSortDropDown(Window *w, VehicleType vehicle_type, int selected, int button)
 
void DisplayVehicleSortDropDown(Window *w, VehicleType vehicle_type, int selected, WidgetID button)
 
{
 
	uint32_t hidden_mask = 0;
 
	/* Disable sorting by power or tractive effort when the original acceleration model for road vehicles is being used. */
 
	if (vehicle_type == VEH_ROAD && _settings_game.vehicle.roadveh_acceleration_model == AM_ORIGINAL) {
 
		SetBit(hidden_mask, 3); // power
 
		SetBit(hidden_mask, 4); // tractive effort
src/engine_gui.h
Show inline comments
 
@@ -48,9 +48,9 @@ extern byte _engine_sort_last_criteria[]
 
extern bool _engine_sort_last_order[];
 
extern bool _engine_sort_show_hidden_engines[];
 
extern const StringID _engine_sort_listing[][12];
 
extern EngList_SortTypeFunction * const _engine_sort_functions[][11];
 

	
 
uint GetEngineListHeight(VehicleType type);
 
void DisplayVehicleSortDropDown(Window *w, VehicleType vehicle_type, int selected, int button);
 
void DisplayVehicleSortDropDown(Window *w, VehicleType vehicle_type, int selected, WidgetID button);
 

	
 
#endif /* ENGINE_GUI_H */
src/help_gui.cpp
Show inline comments
 
@@ -157,13 +157,13 @@ struct HelpWindow : public Window {
 
				OpenBrowser(COMMUNITY_LINK);
 
				break;
 
		}
 
	}
 

	
 
private:
 
	void EnableTextfileButton(std::string_view filename, int button_widget)
 
	void EnableTextfileButton(std::string_view filename, WidgetID button_widget)
 
	{
 
		this->GetWidget<NWidgetLeaf>(button_widget)->SetDisabled(!FindGameManualFilePath(filename).has_value());
 
	}
 
};
 

	
 
static const NWidgetPart _nested_helpwin_widgets[] = {
src/osk_gui.cpp
Show inline comments
 
@@ -39,13 +39,13 @@ struct OskWindow : public Window {
 
	QueryString *qs;       ///< text-input
 
	WidgetID text_btn;     ///< widget number of parent's text field
 
	Textbuf *text;         ///< pointer to parent's textbuffer (to update caret position)
 
	std::string orig_str;  ///< Original string.
 
	bool shift;            ///< Is the shift effectively pressed?
 

	
 
	OskWindow(WindowDesc *desc, Window *parent, int button) : Window(desc)
 
	OskWindow(WindowDesc *desc, Window *parent, WidgetID button) : Window(desc)
 
	{
 
		this->parent = parent;
 
		assert(parent != nullptr);
 

	
 
		NWidgetCore *par_wid = parent->GetWidget<NWidgetCore>(button);
 
		assert(par_wid != nullptr);
src/window_gui.h
Show inline comments
 
@@ -255,13 +255,13 @@ public:
 
	ResizeInfo resize;  ///< Resize information
 

	
 
	Owner owner;        ///< The owner of the content shown in this window. Company colour is acquired from this variable.
 

	
 
	ViewportData *viewport;          ///< Pointer to viewport data, if present.
 
	const NWidgetCore *nested_focus; ///< Currently focused nested widget, or \c nullptr if no nested widget has focus.
 
	std::map<int, QueryString*> querystrings; ///< QueryString associated to WWT_EDITBOX widgets.
 
	std::map<WidgetID, QueryString*> querystrings; ///< QueryString associated to WWT_EDITBOX widgets.
 
	std::unique_ptr<NWidgetBase> nested_root; ///< Root of the nested tree.
 
	WidgetLookup widget_lookup; ///< Indexed access to the nested widget tree. Do not access directly, use #Window::GetWidget() instead.
 
	NWidgetStacked *shade_select;    ///< Selection widget (#NWID_SELECTION) to use for shading the window. If \c nullptr, window cannot shade.
 
	Dimension unshaded_size;         ///< Last known unshaded size (only valid while shaded).
 

	
 
	WidgetID mouse_capture_widget;   ///< ID of current mouse capture widget (e.g. dragged scrollbar). -1 if no widget has mouse capture.
0 comments (0 inline, 0 general)