Merge branch 'master' into jgrpp

# Conflicts:
#	cmake/CompileFlags.cmake
#	src/cargomonitor.cpp
#	src/core/CMakeLists.txt
#	src/economy.cpp
#	src/landscape.cpp
#	src/linkgraph/flowmapper.cpp
#	src/linkgraph/linkgraph_gui.cpp
#	src/linkgraph/linkgraphschedule.cpp
#	src/misc_gui.cpp
#	src/newgrf_generic.cpp
#	src/newgrf_storage.cpp
#	src/rail_gui.cpp
#	src/saveload/afterload.cpp
#	src/saveload/station_sl.cpp
#	src/script/script_gui.cpp
#	src/station_cmd.cpp
#	src/station_gui.cpp
#	src/string_func.h
#	src/terraform_cmd.cpp
This commit is contained in:
Jonathan G Rennison
2023-06-07 21:28:46 +01:00
129 changed files with 2080 additions and 2061 deletions

View File

@@ -2039,11 +2039,11 @@ NWidgetCore *NWidgetMatrix::GetWidgetFromPos(int x, int y)
bool rtl = _current_text_dir == TD_RTL;
int widget_col = (rtl ?
-x + (int)this->pip_post + (int)this->pos_x + base_offs_x + (int)this->widget_w - 1 - (int)this->pip_inter :
x - (int)this->pip_pre - (int)this->pos_x - base_offs_x
-x + (int)this->pip_post + this->pos_x + base_offs_x + this->widget_w - 1 - (int)this->pip_inter :
x - (int)this->pip_pre - this->pos_x - base_offs_x
) / this->widget_w;
int widget_row = (y - base_offs_y - (int)this->pip_pre - (int)this->pos_y) / this->widget_h;
int widget_row = (y - base_offs_y - (int)this->pip_pre - this->pos_y) / this->widget_h;
int sub_wid = (widget_row + start_y) * this->widgets_x + start_x + widget_col;
if (sub_wid >= this->count) return nullptr;