Fix: Indent production in industry window and resolve button issues. (#10184)

Industry production used to be indented, although a different amount than
the industry accepts list. This is now added back, with the standard indent
width.

Additionally the cheat-mode production modifier buttons now support RTL and
the list height now takes account of the button height.
This commit is contained in:
PeterN
2022-11-19 21:18:53 +00:00
committed by GitHub
parent a942028803
commit a7adadcf9b
2 changed files with 45 additions and 20 deletions

View File

@@ -208,6 +208,17 @@ struct Rect {
? Rect {this->left, this->bottom - height + 1, this->right, this->bottom}
: Rect {this->left, this->top, this->right, this->top + height - 1};
}
/**
* Test if a point falls inside this Rect.
* @param pt the point to test.
* @return true iif the point falls inside the Rect.
*/
inline bool Contains(const Point &pt) const
{
/* This is a local version of IsInsideMM, to avoid including math_func everywhere. */
return (uint)(pt.x - this->left) < (uint)(this->right - this->left) && (uint)(pt.y - this->top) < (uint)(this->bottom - this->top);
}
};
/**