mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-26 19:58:36 +01: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:
1 parent
c5e0403ffd
commit
160e2c4f9b
15 files changed
+33
-26
No files matched your search
@@ -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