mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-03 04:52:14 +01:00
Dialog screens (tabbed, two-pane, simple and the others built on UIBaseDialogScreen) center their content at up to 1400 wide, instead of stretching settings rows and buttons across very wide windows. On large screens, those screens and the main screen also get an inset on all sides, since controls right at the edge are hard to see there. It grows with the screen's smaller dimension, from nothing at 600 to the full inset at 1000, and is always full on TVs. The game, popups, and the screens that position things to match the game's screen (display layout, touch control layout and tests, custom button and visual mapping) are left as they were. The root's bounds are computed by UIScreen::GetContentBounds, since UI::Margins can't hold widths this large. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
36 lines
1.1 KiB
C++
36 lines
1.1 KiB
C++
#pragma once
|
|
|
|
#include "Common/File/Path.h"
|
|
#include "Common/UI/UIScreen.h"
|
|
|
|
// This doesn't have anything to do with the background anymore. It's just a PPSSPP UIScreen
|
|
// that knows how handle sendMessage properly. Same for all the below.
|
|
class UIBaseScreen : public UIScreen {
|
|
public:
|
|
UIBaseScreen() : UIScreen() {}
|
|
ViewLayoutMode LayoutMode() const override {
|
|
return ViewLayoutMode::IgnoreBottomInset;
|
|
}
|
|
bool UseImmersiveMode() const override;
|
|
bool LimitContentArea() const override { return true; }
|
|
protected:
|
|
void sendMessage(UIMessage message, const char *value) override;
|
|
};
|
|
|
|
class UIBaseDialogScreen : public UIDialogScreen {
|
|
public:
|
|
UIBaseDialogScreen() : UIDialogScreen(), gamePath_() {}
|
|
explicit UIBaseDialogScreen(const Path &gamePath) : UIDialogScreen(), gamePath_(gamePath) {}
|
|
|
|
bool LimitContentArea() const override { return true; }
|
|
float MaxContentWidth() const override { return 1400.0f; }
|
|
|
|
protected:
|
|
ViewLayoutMode LayoutMode() const override;
|
|
bool UseImmersiveMode() const override;
|
|
|
|
void sendMessage(UIMessage message, const char *value) override;
|
|
void AddStandardBack(UI::ViewGroup *parent);
|
|
Path gamePath_;
|
|
};
|