mirror of https://github.com/OpenTTD/OpenTTD.git
(svn r18067) -Codechange: Eliminate a constant representing a widget top edge in vehicle windows.
This commit is contained in:
parent
e016fa0fac
commit
fb0158c8ce
|
@ -1030,7 +1030,7 @@ public:
|
||||||
return;
|
return;
|
||||||
|
|
||||||
case VLW_WIDGET_LIST: { // Matrix to show vehicles
|
case VLW_WIDGET_LIST: { // Matrix to show vehicles
|
||||||
uint32 id_v = (pt.y - PLY_WND_PRC__OFFSET_TOP_WIDGET) / this->resize.step_height;
|
uint32 id_v = (pt.y - this->GetWidget<NWidgetBase>(VLW_WIDGET_LIST)->pos_y) / this->resize.step_height;
|
||||||
const Vehicle *v;
|
const Vehicle *v;
|
||||||
|
|
||||||
if (id_v >= this->vscroll.GetCapacity()) return; // click out of bounds
|
if (id_v >= this->vscroll.GetCapacity()) return; // click out of bounds
|
||||||
|
|
|
@ -16,7 +16,6 @@
|
||||||
|
|
||||||
/** Start of functions regarding vehicle list windows */
|
/** Start of functions regarding vehicle list windows */
|
||||||
enum {
|
enum {
|
||||||
PLY_WND_PRC__OFFSET_TOP_WIDGET = 26,
|
|
||||||
PLY_WND_PRC__SIZE_OF_ROW_TINY = 13, ///< Height of rows in group list
|
PLY_WND_PRC__SIZE_OF_ROW_TINY = 13, ///< Height of rows in group list
|
||||||
PLY_WND_PRC__SIZE_OF_ROW_SMALL = 26, ///< Height of rows in train/roadvehicle list
|
PLY_WND_PRC__SIZE_OF_ROW_SMALL = 26, ///< Height of rows in train/roadvehicle list
|
||||||
PLY_WND_PRC__SIZE_OF_ROW_BIG = 39, ///< Height of rows in ship/aircraft list
|
PLY_WND_PRC__SIZE_OF_ROW_BIG = 39, ///< Height of rows in ship/aircraft list
|
||||||
|
|
Loading…
Reference in New Issue