mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-09-11 07:03:33 +02:00
Refactor: Call GetLayoutBounds on the screen instead of the context where possible.
This will allow screens to influence the layout bounds in a unified way
This commit is contained in:
@@ -900,7 +900,8 @@ void VisualMappingScreen::CreateViews() {
|
||||
leftColumn->Add(new Spacer(new LinearLayoutParams(1.0f)));
|
||||
AddStandardBack(leftColumn);
|
||||
|
||||
Bounds bounds = screenManager()->getUIContext()->GetLayoutBounds();
|
||||
// TODO: Properly use layout instead of querying bounds.
|
||||
Bounds bounds = GetLayoutBounds(*screenManager()->getUIContext());
|
||||
// Account for left side.
|
||||
bounds.w -= leftColumnWidth + 10.0f;
|
||||
|
||||
@@ -1024,7 +1025,7 @@ void VisualMappingScreen::MapNext(bool successive) {
|
||||
HandleKeyMapping(mapping);
|
||||
}, I18NCat::KEYMAPPING);
|
||||
|
||||
Bounds bounds = screenManager()->getUIContext()->GetLayoutBounds();
|
||||
Bounds bounds = screenManager()->getUIContext()->GetLayoutBounds(false);
|
||||
dialog->SetPopupOffset(psp_->GetPopupOffset() * bounds.h);
|
||||
dialog->SetDelay(successive ? 0.5f : 0.1f);
|
||||
screenManager()->push(dialog);
|
||||
|
||||
Reference in New Issue
Block a user