Fix bution action position when using textplacement TEXT_ONLY_RIGHT
This makes the touch target include both the text and the image for buttons masquerading as a check box. Change-Id: If8432c5863de136b1a215dabb3e06109ccce4410
This commit is contained in:
+4
-1
@@ -104,10 +104,13 @@ GUIButton::GUIButton(xml_node<>* node)
|
||||
mButtonLabel->SetRenderPos(mTextX, mTextY);
|
||||
} else {
|
||||
mTextX = mRenderW + mRenderX + 5;
|
||||
mRenderW += mTextW + 5;
|
||||
mButtonLabel->GetCurrentBounds(mTextW, mTextH);
|
||||
mRenderW += mTextW + 5;
|
||||
mTextY = mRenderY + (mRenderH / 2) - (mTextH / 2);
|
||||
mButtonLabel->SetRenderPos(mTextX, mTextY);
|
||||
if (mAction)
|
||||
mAction->SetActionPos(mRenderX, mRenderY, mRenderW, mRenderH);
|
||||
SetActionPos(mRenderX, mRenderY, mRenderW, mRenderH);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user