mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-23 13:30:02 +00:00
Fix text wrapping on PromptScreen by improving the layout
This commit is contained in:
parent
ff887b0f11
commit
c07068f89b
@ -732,6 +732,7 @@ void SoftwareTransform::ExpandRectangles(int vertexCount, int &maxIndex, u16 *&i
|
||||
if (throughmode) {
|
||||
RotateUVThrough(trans);
|
||||
} else {
|
||||
// transVtxTL.z == transVtxBR.z actually, but the pos_w might be different.
|
||||
float tlz = transVtxTL.z / transVtxTL.pos_w;
|
||||
float brz = transVtxBR.z / transVtxBR.pos_w;
|
||||
if (!gstate.isDepthClampEnabled()) {
|
||||
|
@ -488,16 +488,13 @@ void PromptScreen::CreateViews() {
|
||||
|
||||
Margins actionMenuMargins(0, 100, 15, 0);
|
||||
|
||||
root_ = new LinearLayout(ORIENT_HORIZONTAL);
|
||||
root_ = new AnchorLayout();
|
||||
|
||||
ViewGroup *leftColumn = new AnchorLayout(new LinearLayoutParams(1.0f));
|
||||
root_->Add(leftColumn);
|
||||
root_->Add(new TextView(message_, ALIGN_LEFT | FLAG_WRAP_TEXT, false, new AnchorLayoutParams(WRAP_CONTENT, WRAP_CONTENT, 15, 15, 330, 10)))->SetClip(false);
|
||||
|
||||
float leftColumnWidth = dp_xres - actionMenuMargins.left - actionMenuMargins.right - 300.0f;
|
||||
leftColumn->Add(new TextView(message_, ALIGN_LEFT | FLAG_WRAP_TEXT, false, new AnchorLayoutParams(leftColumnWidth, WRAP_CONTENT, 10, 10, NONE, NONE)))->SetClip(false);
|
||||
|
||||
ViewGroup *rightColumnItems = new LinearLayout(ORIENT_VERTICAL, new LinearLayoutParams(300, FILL_PARENT, actionMenuMargins));
|
||||
ViewGroup *rightColumnItems = new LinearLayout(ORIENT_VERTICAL, new AnchorLayoutParams(300, WRAP_CONTENT, NONE, 15, 15, NONE));
|
||||
root_->Add(rightColumnItems);
|
||||
|
||||
Choice *yesButton = rightColumnItems->Add(new Choice(yesButtonText_));
|
||||
yesButton->OnClick.Handle(this, &PromptScreen::OnYes);
|
||||
root_->SetDefaultFocusView(yesButton);
|
||||
|
Loading…
Reference in New Issue
Block a user