mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-23 13:30:02 +00:00
Remove the title from the "Rotation" popup button. Fixes #17201
This commit is contained in:
parent
7c817f3ecd
commit
d7d37e58d4
@ -635,7 +635,7 @@ void AbstractChoiceWithValueDisplay::Draw(UIContext &dc) {
|
||||
|
||||
// If there is a label, assume we want at least 20% of the size for it, at a minimum.
|
||||
|
||||
if (!text_.empty()) {
|
||||
if (!text_.empty() && !hideTitle_) {
|
||||
float availWidth = (bounds_.w - paddingX * 2) * 0.8f;
|
||||
float scale = CalculateValueScale(dc, valueText, availWidth);
|
||||
|
||||
|
@ -506,7 +506,7 @@ void Choice::Draw(UIContext &dc) {
|
||||
|
||||
if (image_.isValid() && text_.empty()) {
|
||||
dc.Draw()->DrawImageRotated(image_, bounds_.centerX(), bounds_.centerY(), imgScale_, imgRot_, style.fgColor, imgFlipH_);
|
||||
} else if (!text_.empty()) {
|
||||
} else if (!text_.empty() && !hideTitle_) {
|
||||
dc.SetFontStyle(dc.theme->uiFont);
|
||||
|
||||
int paddingX = 12;
|
||||
|
@ -732,6 +732,10 @@ public:
|
||||
rightIconFlipH_ = flipH;
|
||||
rightIconImage_ = iconImage;
|
||||
}
|
||||
// Only useful for things that extend Choice.
|
||||
void SetHideTitle(bool hide) {
|
||||
hideTitle_ = hide;
|
||||
}
|
||||
|
||||
protected:
|
||||
// hackery
|
||||
@ -751,6 +755,7 @@ protected:
|
||||
float imgRot_ = 0.0f;
|
||||
bool imgFlipH_ = false;
|
||||
u32 drawTextFlags_ = 0;
|
||||
bool hideTitle_ = false;
|
||||
|
||||
private:
|
||||
bool selected_ = false;
|
||||
@ -822,7 +827,6 @@ public:
|
||||
void SetPasswordDisplay() {
|
||||
passwordDisplay_ = true;
|
||||
}
|
||||
|
||||
protected:
|
||||
virtual std::string ValueText() const = 0;
|
||||
|
||||
|
@ -274,6 +274,7 @@ void DisplayLayoutScreen::CreateViews() {
|
||||
rotation->SetEnabledFunc([] {
|
||||
return !g_Config.bSkipBufferEffects || g_Config.bSoftwareRendering;
|
||||
});
|
||||
rotation->SetHideTitle(true);
|
||||
rightColumn->Add(rotation);
|
||||
|
||||
Choice *center = new Choice(di->T("Reset"));
|
||||
|
Loading…
Reference in New Issue
Block a user