Merge branch 'master' into jgrpp

# Conflicts:
#	.github/workflows/ci-build.yml
#	.github/workflows/release-linux.yml
#	.github/workflows/release-macos.yml
#	.github/workflows/release-windows.yml
#	.gitignore
#	COMPILING.md
#	src/company_gui.cpp
#	src/date_gui.cpp
#	src/engine.cpp
#	src/engine_func.h
#	src/fileio.cpp
#	src/linkgraph/linkgraph_gui.h
#	src/newgrf_debug_gui.cpp
#	src/newgrf_gui.cpp
#	src/order_gui.cpp
#	src/osk_gui.cpp
#	src/rail_gui.cpp
#	src/road_gui.cpp
#	src/script/api/script_event_types.hpp
#	src/sl/oldloader_sl.cpp
#	src/smallmap_gui.cpp
#	src/station_cmd.cpp
#	src/toolbar_gui.cpp
#	src/town_gui.cpp
#	src/transparency_gui.cpp
#	src/vehicle_gui.cpp
#	src/widget.cpp
#	src/widget_type.h
#	src/widgets/dropdown.cpp
#	src/widgets/dropdown_func.h
#	src/widgets/dropdown_type.h
#	src/widgets/group_widget.h
#	src/widgets/vehicle_widget.h
#	src/window.cpp
#	src/window_gui.h
#	src/window_type.h
This commit is contained in:
Jonathan G Rennison
2024-01-02 14:31:56 +00:00
179 changed files with 2191 additions and 1827 deletions

View File

@@ -450,7 +450,7 @@ public:
this->Window::Close();
}
void UpdateWidgetSize(int 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
{
switch (widget) {
case WID_GL_LIST_GROUP:
@@ -533,7 +533,7 @@ public:
this->SetDirty();
}
void SetStringParameters(int widget) const override
void SetStringParameters(WidgetID widget) const override
{
switch (widget) {
@@ -622,7 +622,7 @@ public:
this->DrawWidgets();
}
void DrawWidget(const Rect &r, int widget) const override
void DrawWidget(const Rect &r, WidgetID widget) const override
{
switch (widget) {
case WID_GL_ALL_VEHICLES:
@@ -707,7 +707,7 @@ public:
}
}
void OnClick([[maybe_unused]] Point pt, int widget, [[maybe_unused]] int click_count) override
void OnClick([[maybe_unused]] Point pt, WidgetID widget, [[maybe_unused]] int click_count) override
{
switch (widget) {
case WID_GL_SORT_BY_ORDER: // Flip sorting method ascending/descending
@@ -899,7 +899,7 @@ public:
}
}
void OnDragDrop_Group(Point pt, int widget)
void OnDragDrop_Group(Point pt, WidgetID widget)
{
const Group *g = Group::GetIfValid(this->group_sel);
if (g == nullptr) {
@@ -937,7 +937,7 @@ public:
}
}
void OnDragDrop_Vehicle(Point pt, int widget)
void OnDragDrop_Vehicle(Point pt, WidgetID widget)
{
switch (widget) {
case WID_GL_DEFAULT_VEHICLES: // Ungrouped vehicles
@@ -1016,7 +1016,7 @@ public:
}
}
void OnDragDrop(Point pt, int widget) override
void OnDragDrop(Point pt, WidgetID widget) override
{
if (this->vehicle_sel != INVALID_VEHICLE) OnDragDrop_Vehicle(pt, widget);
if (this->group_sel != INVALID_GROUP) OnDragDrop_Group(pt, widget);
@@ -1036,7 +1036,7 @@ public:
this->vscroll->SetCapacityFromWidget(this, WID_GL_LIST_VEHICLE);
}
void OnDropdownSelect(int widget, int index) override
void OnDropdownSelect(WidgetID widget, int index) override
{
switch (widget) {
case WID_GL_GROUP_BY_DROPDOWN:
@@ -1142,7 +1142,7 @@ public:
}
}
void OnMouseDrag(Point pt, int widget) override
void OnMouseDrag(Point pt, WidgetID widget) override
{
if (this->vehicle_sel == INVALID_VEHICLE && this->group_sel == INVALID_GROUP) return;