Changeset - r22091:8b55bbc0c2cb
[Not reviewed]
master
0 1 0
frosch - 9 years ago 2015-04-26 11:07:41
frosch@openttd.org
(svn r27255) -Fix [FS#6270]: Combined button+dropdown widgets in order and autoreplace GUI had incorrect hitbox when using GUI zoom. (_dp_)
1 file changed with 2 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/widget.cpp
Show inline comments
 
@@ -2521,16 +2521,16 @@ void NWidgetLeaf::Draw(const Window *w)
 
 *
 
 * @note The magic constants are also used at #DrawButtonDropdown.
 
 */
 
bool NWidgetLeaf::ButtonHit(const Point &pt)
 
{
 
	if (_current_text_dir == TD_LTR) {
 
		int button_width = this->pos_x + this->current_x - 12;
 
		int button_width = this->pos_x + this->current_x - NWidgetLeaf::dropdown_dimension.width;
 
		return pt.x < button_width;
 
	} else {
 
		int button_left = this->pos_x + 12;
 
		int button_left = this->pos_x + NWidgetLeaf::dropdown_dimension.width;
 
		return pt.x >= button_left;
 
	}
 
}
 

	
 
/* == Conversion code from NWidgetPart array to NWidgetBase* tree == */
 

	
0 comments (0 inline, 0 general)