Rework the reporting screen a bit

This commit is contained in:
Henrik Rydgård
2025-11-23 01:01:52 +01:00
parent 217e7c94a4
commit 6cc945e57a
9 changed files with 122 additions and 107 deletions
+1 -1
View File
@@ -480,7 +480,7 @@ void KeyMappingNewMouseKeyDialog::axis(const AxisInput &axis) {
}
}
AnalogCalibrationScreen::AnalogCalibrationScreen(const Path &gamePath) : UITwoPaneBaseDialogScreen(gamePath, TwoPaneFlags::Default) {
AnalogCalibrationScreen::AnalogCalibrationScreen(const Path &gamePath) : UITwoPaneBaseDialogScreen(gamePath, TwoPaneFlags::SettingsCanScroll) {
mapper_.SetCallbacks(
[](int vkey, bool down) {},
[](int vkey, float analogValue) {},
+1 -1
View File
@@ -56,7 +56,7 @@
constexpr GameInfoFlags g_desiredFlags = GameInfoFlags::PARAM_SFO | GameInfoFlags::ICON | GameInfoFlags::PIC0 | GameInfoFlags::PIC1 | GameInfoFlags::UNCOMPRESSED_SIZE | GameInfoFlags::SIZE;
GameScreen::GameScreen(const Path &gamePath, bool inGame) : UITwoPaneBaseDialogScreen(gamePath, TwoPaneFlags::SettingsToTheRight | TwoPaneFlags::SettingsInContextMenu), inGame_(inGame) {
GameScreen::GameScreen(const Path &gamePath, bool inGame) : UITwoPaneBaseDialogScreen(gamePath, TwoPaneFlags::SettingsToTheRight | TwoPaneFlags::SettingsInContextMenu | TwoPaneFlags::SettingsCanScroll), inGame_(inGame) {
g_BackgroundAudio.SetGame(gamePath);
System_PostUIMessage(UIMessage::GAME_SELECTED, gamePath.ToString());
+2 -2
View File
@@ -953,7 +953,7 @@ public:
MacAddressChooser(RequesterToken token, Path gamePath, std::string *value, std::string_view title, ScreenManager *screenManager, UI::LayoutParams *layoutParams = nullptr);
};
MacAddressChooser::MacAddressChooser(RequesterToken token, Path gamePath_, std::string *value, std::string_view title, ScreenManager *screenManager, UI::LayoutParams *layoutParams) : UI::LinearLayout(ORIENT_HORIZONTAL, layoutParams) {
MacAddressChooser::MacAddressChooser(RequesterToken token, Path gamePath, std::string *value, std::string_view title, ScreenManager *screenManager, UI::LayoutParams *layoutParams) : UI::LinearLayout(ORIENT_HORIZONTAL, layoutParams) {
using namespace UI;
SetSpacing(5.0f);
if (!layoutParams) {
@@ -979,7 +979,7 @@ MacAddressChooser::MacAddressChooser(RequesterToken token, Path gamePath_, std::
std::string combined = g_Config.sMACAddress + "\n\n" + std::string(confirmMessage) + "\n\n" + std::string(warningMessage);
auto confirmScreen = new PromptScreen(
gamePath_,
gamePath,
combined, di->T("Yes"), di->T("No"),
[&](bool success) {
if (success) {
+87 -80
View File
@@ -37,11 +37,9 @@
#include "UI/PauseScreen.h"
#include "UI/ReportScreen.h"
using namespace UI;
class RatingChoice : public LinearLayout {
class RatingChoice : public UI::LinearLayout {
public:
RatingChoice(std::string_view captionKey, int *value, LayoutParams *layoutParams = 0);
RatingChoice(std::string_view captionKey, int *value, UI::LayoutParams *layoutParams = 0);
RatingChoice *SetEnabledPtrs(bool *enabled);
@@ -55,25 +53,25 @@ protected:
return 3;
}
void AddChoice(int i, std::string_view title);
StickyChoice *GetChoice(int i) {
return static_cast<StickyChoice *>(group_->GetViewByIndex(i));
UI::StickyChoice *GetChoice(int i) {
return static_cast<UI::StickyChoice *>(group_->GetViewByIndex(i));
}
LinearLayout *group_;
private:
void OnChoiceClick(EventParams &e);
void OnChoiceClick(UI::EventParams &e);
int *value_;
};
RatingChoice::RatingChoice(std::string_view captionKey, int *value, LayoutParams *layoutParams)
RatingChoice::RatingChoice(std::string_view captionKey, int *value, UI::LayoutParams *layoutParams)
: LinearLayout(ORIENT_VERTICAL, layoutParams), value_(value) {
SetSpacing(0.0f);
auto rp = GetI18NCategory(I18NCat::REPORTING);
group_ = new LinearLayout(ORIENT_HORIZONTAL);
Add(new TextView(rp->T(captionKey), FLAG_WRAP_TEXT, false))->SetShadow(true);
Add(new UI::TextView(rp->T(captionKey), FLAG_WRAP_TEXT, false))->SetShadow(true);
Add(group_);
group_->SetSpacing(0.0f);
@@ -84,7 +82,7 @@ void RatingChoice::Update() {
LinearLayout::Update();
for (int i = 0; i < TotalChoices(); i++) {
StickyChoice *chosen = GetChoice(i);
UI::StickyChoice *chosen = GetChoice(i);
bool down = chosen->IsDown();
if (down && *value_ != i) {
chosen->Release();
@@ -110,15 +108,15 @@ void RatingChoice::SetupChoices() {
}
void RatingChoice::AddChoice(int i, std::string_view title) {
auto c = group_->Add(new StickyChoice(title, ""));
auto c = group_->Add(new UI::StickyChoice(title, ""));
c->OnClick.Handle(this, &RatingChoice::OnChoiceClick);
}
void RatingChoice::OnChoiceClick(EventParams &e) {
void RatingChoice::OnChoiceClick(UI::EventParams &e) {
// Unstick the other choices that weren't clicked.
int total = TotalChoices();
for (int i = 0; i < total; i++) {
StickyChoice *v = GetChoice(i);
UI::StickyChoice *v = GetChoice(i);
if (v != e.v) {
v->Release();
} else {
@@ -126,7 +124,7 @@ void RatingChoice::OnChoiceClick(EventParams &e) {
}
}
EventParams e2{};
UI::EventParams e2{};
e2.v = e.v;
e2.a = *value_;
// Dispatch immediately (we're already on the UI thread as we're in an event handler).
@@ -135,7 +133,7 @@ void RatingChoice::OnChoiceClick(EventParams &e) {
class CompatRatingChoice : public RatingChoice {
public:
CompatRatingChoice(const char *captionKey, int *value, LayoutParams *layoutParams = 0);
CompatRatingChoice(const char *captionKey, int *value, UI::LayoutParams *layoutParams = 0);
protected:
void SetupChoices() override;
@@ -144,7 +142,7 @@ protected:
}
};
CompatRatingChoice::CompatRatingChoice(const char *captionKey, int *value, LayoutParams *layoutParams)
CompatRatingChoice::CompatRatingChoice(const char *captionKey, int *value, UI::LayoutParams *layoutParams)
: RatingChoice(captionKey, value, layoutParams) {
CompatRatingChoice::SetupChoices();
}
@@ -160,7 +158,7 @@ void CompatRatingChoice::SetupChoices() {
}
ReportScreen::ReportScreen(const Path &gamePath)
: UIDialogScreen(), gamePath_(gamePath) {
: UITwoPaneBaseDialogScreen(gamePath, TwoPaneFlags::SettingsToTheRight) {
enableReporting_ = Reporting::IsEnabled();
ratingEnabled_ = enableReporting_;
// Start computing a CRC immediately, we'll need it on submit.
@@ -196,20 +194,28 @@ ScreenRenderFlags ReportScreen::render(ScreenRenderMode mode) {
// We take the screenshot first, then we start rendering.
// We are the only screen visible so this avoid starting and then trying to resume a backbuffer render pass.
const ScreenRenderFlags flags = UIScreen::render(mode);
return flags;
return UITwoPaneBaseDialogScreen::render(mode);
}
// For the screenshotting functionality to work.
ScreenRenderRole ReportScreen::renderRole(bool isTop) const {
// if (tookScreenshot_) {
// return ScreenRenderRole::NONE;
// }
return ScreenRenderRole::MUST_BE_FIRST | ScreenRenderRole::CAN_BE_BACKGROUND;
}
void ReportScreen::update() {
if (screenshot_) {
if (includeScreenshot_) {
screenshot_->SetVisibility(V_VISIBLE);
screenshot_->SetVisibility(UI::V_VISIBLE);
} else {
screenshot_->SetVisibility(V_GONE);
screenshot_->SetVisibility(UI::V_GONE);
}
}
UIDialogScreen::update();
UpdateCRCInfo();
UpdateSubmit();
}
void ReportScreen::resized() {
@@ -217,7 +223,7 @@ void ReportScreen::resized() {
RecreateViews();
}
void ReportScreen::HandleChoice(EventParams &e) {
void ReportScreen::HandleChoice(UI::EventParams &e) {
if (overall_ == ReportingOverallScore::NONE) {
graphics_ = 0;
speed_ = 0;
@@ -244,7 +250,7 @@ void ReportScreen::HandleChoice(EventParams &e) {
UpdateOverallDescription();
}
void ReportScreen::HandleReportingChange(EventParams &e) {
void ReportScreen::HandleReportingChange(UI::EventParams &e) {
if (overall_ == ReportingOverallScore::NONE) {
ratingEnabled_ = false;
} else {
@@ -256,19 +262,35 @@ void ReportScreen::HandleReportingChange(EventParams &e) {
UpdateSubmit();
}
void ReportScreen::CreateViews() {
void ReportScreen::CreateSettingsViews(UI::ViewGroup *rightColumnItems) {
using namespace UI;
auto rp = GetI18NCategory(I18NCat::REPORTING);
auto di = GetI18NCategory(I18NCat::DIALOG);
Margins actionMenuMargins(0, 20, 15, 0);
Margins contentMargins(0, 20, 5, 5);
float leftColumnWidth = g_display.dp_xres - actionMenuMargins.horiz() - contentMargins.horiz() - 300.0f;
ViewGroup *leftColumn = new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(WRAP_CONTENT, FILL_PARENT, 0.4f, contentMargins));
LinearLayout *leftColumnItems = new LinearLayout(ORIENT_VERTICAL, new LayoutParams(WRAP_CONTENT, FILL_PARENT));
ViewGroup *rightColumn = new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(300, FILL_PARENT, actionMenuMargins));
LinearLayout *rightColumnItems = new LinearLayout(ORIENT_VERTICAL);
rightColumnItems->Add(new Choice(rp->T("Open Browser"), ImageID("I_LINK_OUT")))->OnClick.Handle(this, &ReportScreen::HandleBrowser);
submit_ = new Choice(rp->T("Submit Feedback"), ImageID("I_CHECKMARK"));
rightColumnItems->Add(submit_)->OnClick.Handle(this, &ReportScreen::HandleSubmit);
submit_->SetEnabled(false); // Waiting for CRC
leftColumnItems->Add(new TextView(rp->T("FeedbackDesc", "How's the emulation? Let us and the community know!"), FLAG_WRAP_TEXT, false, new LinearLayoutParams(Margins(12, 5, 0, 5))))->SetShadow(true);
UpdateSubmit();
}
void ReportScreen::CreateContentViews(UI::ViewGroup *parent) {
using namespace UI;
UI::ScrollView *scroll = new UI::ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(1.0f));
UI::LinearLayout *leftColumnItems = new UI::LinearLayout(ORIENT_VERTICAL, new UI::LinearLayoutParams(WRAP_CONTENT, WRAP_CONTENT));
scroll->Add(leftColumnItems);
parent->Add(scroll);
auto rp = GetI18NCategory(I18NCat::REPORTING);
auto di = GetI18NCategory(I18NCat::DIALOG);
bool portrait = GetDeviceOrientation() == DeviceOrientation::Portrait;
leftColumnItems->Add(new TextView(rp->T("FeedbackDesc", "How's the emulation? Let us and the community know!"), FLAG_WRAP_TEXT, false, new LinearLayoutParams(Margins(12, 5, 0, 5))))->SetShadow(true);
if (!Reporting::IsEnabled()) {
auto sy = GetI18NCategory(I18NCat::SYSTEM);
reportingNotice_ = leftColumnItems->Add(new TextView(rp->T("FeedbackDisabled", "Compatibility server reports must be enabled."), FLAG_WRAP_TEXT, false, new LinearLayoutParams(Margins(12, 5, 0, 5))));
@@ -309,36 +331,29 @@ void ReportScreen::CreateViews() {
overallDescription_ = leftColumnItems->Add(new TextView("", FLAG_WRAP_TEXT, false, new LinearLayoutParams(Margins(10, 0))));
overallDescription_->SetShadow(true);
Orientation ratingsOrient = leftColumnWidth >= 750.0f ? ORIENT_HORIZONTAL : ORIENT_VERTICAL;
LinearLayout *ratingsHolder = new LinearLayoutList(ratingsOrient, new LinearLayoutParams(WRAP_CONTENT, WRAP_CONTENT));
LinearLayout *ratingsHolder = new LinearLayoutList(ORIENT_VERTICAL, new LinearLayoutParams(WRAP_CONTENT, WRAP_CONTENT));
leftColumnItems->Add(ratingsHolder);
ratingsHolder->Add(new RatingChoice("Graphics", &graphics_))->SetEnabledPtrs(&ratingEnabled_)->OnChoice.Handle(this, &ReportScreen::HandleChoice);
ratingsHolder->Add(new RatingChoice("Speed", &speed_))->SetEnabledPtrs(&ratingEnabled_)->OnChoice.Handle(this, &ReportScreen::HandleChoice);
ratingsHolder->Add(new RatingChoice("Gameplay", &gameplay_))->SetEnabledPtrs(&ratingEnabled_)->OnChoice.Handle(this, &ReportScreen::HandleChoice);
rightColumnItems->SetSpacing(0.0f);
rightColumnItems->Add(new Choice(rp->T("Open Browser")))->OnClick.Handle(this, &ReportScreen::HandleBrowser);
submit_ = new Choice(rp->T("Submit Feedback"));
rightColumnItems->Add(submit_)->OnClick.Handle(this, &ReportScreen::HandleSubmit);
submit_->SetEnabled(false); // Waiting for CRC
UpdateSubmit();
UpdateOverallDescription();
rightColumnItems->Add(new Spacer(25.0));
rightColumnItems->Add(new Choice(di->T("Back"), ImageID("I_NAVIGATE_BACK"), new AnchorLayoutParams(150, WRAP_CONTENT, 10, NONE, NONE, 10)))->OnClick.Handle<UIScreen>(this, &UIScreen::OnBack);
root_ = new LinearLayout(ORIENT_HORIZONTAL, new LinearLayoutParams(FILL_PARENT, FILL_PARENT, 1.0f));
root_->Add(leftColumn);
root_->Add(rightColumn);
leftColumn->Add(leftColumnItems);
rightColumn->Add(rightColumnItems);
UpdateCRCInfo();
UpdateOverallDescription();
}
void ReportScreen::UpdateSubmit() {
submit_->SetEnabled(enableReporting_ && overall_ != ReportingOverallScore::INVALID && graphics_ >= 0 && speed_ >= 0 && gameplay_ >= 0);
submit_->SetEnabled(Reporting::HasCRC(gamePath_) && enableReporting_ && overall_ != ReportingOverallScore::INVALID && graphics_ >= 0 && speed_ >= 0 && gameplay_ >= 0);
}
std::string_view ReportScreen::GetTitle() const {
if (titleCache_.empty()) {
titleCache_ = g_paramSFO.GetValueString("TITLE");
if (titleCache_.empty()) {
auto rp = GetI18NCategory(I18NCat::REPORTING);
titleCache_ = rp->T("Submit Feedback");
}
}
return titleCache_;
}
void ReportScreen::UpdateCRCInfo() {
@@ -348,14 +363,13 @@ void ReportScreen::UpdateCRCInfo() {
if (Reporting::HasCRC(gamePath_)) {
std::string crc = StringFromFormat("%08X", Reporting::RetrieveCRC(gamePath_));
updated = ApplySafeSubstitutions(rp->T("FeedbackCRCValue", "Disc CRC: %1"), crc);
submit_->SetEnabled(true);
} else {
updated = rp->T("FeedbackCRCCalculating", "Disc CRC: Calculating...");
}
if (!updated.empty()) {
crcInfo_->SetText(updated);
crcInfo_->SetVisibility(V_VISIBLE);
crcInfo_->SetVisibility(UI::V_VISIBLE);
}
}
@@ -376,7 +390,7 @@ void ReportScreen::UpdateOverallDescription() {
overallDescription_->SetTextColor(c);
}
void ReportScreen::HandleSubmit(EventParams &e) {
void ReportScreen::HandleSubmit(UI::EventParams &e) {
const char *compat;
switch (overall_) {
case ReportingOverallScore::PERFECT: compat = "perfect"; break;
@@ -398,48 +412,39 @@ void ReportScreen::HandleSubmit(EventParams &e) {
screenManager()->push(new ReportFinishScreen(gamePath_, overall_));
}
void ReportScreen::HandleBrowser(EventParams &e) {
void ReportScreen::HandleBrowser(UI::EventParams &e) {
const std::string url = "https://" + Reporting::ServerHost() + "/";
System_LaunchUrl(LaunchUrlType::BROWSER_URL, url.c_str());
}
ReportFinishScreen::ReportFinishScreen(const Path &gamePath, ReportingOverallScore score)
: UIDialogScreen(), gamePath_(gamePath), score_(score) {
: UISimpleBaseDialogScreen(), gamePath_(gamePath), score_(score) {
}
void ReportFinishScreen::CreateViews() {
std::string_view ReportFinishScreen::GetTitle() const {
auto rp = GetI18NCategory(I18NCat::REPORTING);
return rp->T("Submit Feedback");
}
void ReportFinishScreen::CreateDialogViews(UI::ViewGroup *parent) {
auto rp = GetI18NCategory(I18NCat::REPORTING);
auto di = GetI18NCategory(I18NCat::DIALOG);
Margins actionMenuMargins(0, 20, 15, 0);
Margins contentMargins(0, 20, 5, 5);
ViewGroup *leftColumn = new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(WRAP_CONTENT, FILL_PARENT, 0.4f, contentMargins));
LinearLayout *leftColumnItems = new LinearLayout(ORIENT_VERTICAL, new LayoutParams(WRAP_CONTENT, FILL_PARENT));
ViewGroup *rightColumn = new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(300, FILL_PARENT, actionMenuMargins));
LinearLayout *rightColumnItems = new LinearLayout(ORIENT_VERTICAL);
using namespace UI;
leftColumnItems->Add(new TextView(rp->T("FeedbackThanks", "Thanks for your feedback."), FLAG_WRAP_TEXT, false, new LinearLayoutParams(Margins(12, 5, 0, 5))))->SetShadow(true);
parent->Add(new TextView(rp->T("FeedbackThanks", "Thanks for your feedback."), FLAG_WRAP_TEXT, false, new LinearLayoutParams(Margins(12, 5, 0, 5))))->SetShadow(true);
if (score_ == ReportingOverallScore::PERFECT || score_ == ReportingOverallScore::PLAYABLE) {
resultNotice_ = leftColumnItems->Add(new TextView(rp->T("FeedbackDelayInfo", "Your data is being submitted in the background."), FLAG_WRAP_TEXT, false, new LinearLayoutParams(Margins(12, 5, 0, 5))));
resultNotice_ = parent->Add(new TextView(rp->T("FeedbackDelayInfo", "Your data is being submitted in the background."), FLAG_WRAP_TEXT, false, new LinearLayoutParams(Margins(12, 5, 0, 5))));
} else {
resultNotice_ = leftColumnItems->Add(new TextView(rp->T("SuggestionsWaiting", "Submitting and checking other user feedback.."), FLAG_WRAP_TEXT, false, new LinearLayoutParams(Margins(12, 5, 0, 5))));
resultNotice_ = parent->Add(new TextView(rp->T("SuggestionsWaiting", "Submitting and checking other user feedback.."), FLAG_WRAP_TEXT, false, new LinearLayoutParams(Margins(12, 5, 0, 5))));
}
resultNotice_->SetShadow(true);
resultItems_ = new LinearLayout(ORIENT_VERTICAL, new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT, Margins(12, 5, 0, 5)));
leftColumnItems->Add(resultItems_);
parent->Add(resultItems_);
rightColumnItems->SetSpacing(0.0f);
rightColumnItems->Add(new Choice(rp->T("View Feedback")))->OnClick.Handle(this, &ReportFinishScreen::HandleViewFeedback);
parent->Add(new Spacer(20.0f));
rightColumnItems->Add(new Spacer(25.0));
rightColumnItems->Add(new Choice(di->T("Back"), ImageID("I_NAVIGATE_BACK"), new AnchorLayoutParams(150, WRAP_CONTENT, 10, NONE, NONE, 10)))->OnClick.Handle<UIScreen>(this, &UIScreen::OnBack);
root_ = new LinearLayout(ORIENT_HORIZONTAL, new LinearLayoutParams(FILL_PARENT, FILL_PARENT, 1.0f));
root_->Add(leftColumn);
root_->Add(rightColumn);
leftColumn->Add(leftColumnItems);
rightColumn->Add(rightColumnItems);
parent->Add(new Choice(rp->T("View Feedback"), ImageID("I_LINK_OUT")))->OnClick.Handle(this, &ReportFinishScreen::HandleViewFeedback);
}
void ReportFinishScreen::update() {
@@ -469,6 +474,8 @@ void ReportFinishScreen::update() {
}
void ReportFinishScreen::ShowSuggestions() {
using namespace UI;
auto rp = GetI18NCategory(I18NCat::REPORTING);
auto suggestions = Reporting::CompatibilitySuggestions();
+13 -8
View File
@@ -21,8 +21,9 @@
#include "Common/UI/UIScreen.h"
#include "Common/UI/ViewGroup.h"
#include "UI/BaseScreens.h"
#include "Common/File/Path.h"
#include "UI/BaseScreens.h"
#include "UI/SimpleDialogScreen.h"
enum class ReportingOverallScore : int {
PERFECT = 0,
@@ -33,23 +34,25 @@ enum class ReportingOverallScore : int {
INVALID = -1,
};
class ReportScreen : public UIDialogScreen {
class ReportScreen : public UITwoPaneBaseDialogScreen {
public:
ReportScreen(const Path &gamePath);
const char *tag() const override { return "Report"; }
// For the screenshotting functionality to work.
ScreenRenderRole renderRole(bool isTop) const override { return ScreenRenderRole::MUST_BE_FIRST | ScreenRenderRole::CAN_BE_BACKGROUND; }
ScreenRenderRole renderRole(bool isTop) const override;
protected:
ScreenRenderFlags render(ScreenRenderMode mode) override;
void update() override;
void resized() override;
void CreateViews() override;
void CreateSettingsViews(UI::ViewGroup *parent) override;
void CreateContentViews(UI::ViewGroup *parent) override;
void UpdateSubmit();
void UpdateCRCInfo();
void UpdateOverallDescription();
std::string_view GetTitle() const override;
void HandleChoice(UI::EventParams &e);
void HandleSubmit(UI::EventParams &e);
@@ -61,7 +64,6 @@ protected:
UI::TextView *reportingNotice_ = nullptr;
UI::TextView *overallDescription_ = nullptr;
UI::TextView *crcInfo_ = nullptr;
Path gamePath_;
Path screenshotFilename_;
ReportingOverallScore overall_ = ReportingOverallScore::INVALID;
@@ -72,17 +74,20 @@ protected:
bool ratingEnabled_;
bool tookScreenshot_ = false;
bool includeScreenshot_ = true;
mutable std::string titleCache_;
};
class ReportFinishScreen : public UIDialogScreen {
class ReportFinishScreen : public UISimpleBaseDialogScreen {
public:
ReportFinishScreen(const Path &gamePath, ReportingOverallScore score);
const char *tag() const override { return "ReportFinish"; }
protected:
std::string_view GetTitle() const override;
void update() override;
void CreateViews() override;
void CreateDialogViews(UI::ViewGroup *parent) override;
void ShowSuggestions();
void HandleViewFeedback(UI::EventParams &e);
@@ -90,6 +95,6 @@ protected:
UI::TextView *resultNotice_ = nullptr;
UI::LinearLayout *resultItems_ = nullptr;
Path gamePath_;
ReportingOverallScore score_;
ReportingOverallScore score_{};
bool setStatus_ = false;
};
+8 -4
View File
@@ -54,11 +54,15 @@ void UITwoPaneBaseDialogScreen::CreateViews() {
}, nullptr));
});
} else {
ScrollView *settingsScroll = new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(FILL_PARENT, FILL_PARENT, 1.0f, Margins(8)));
LinearLayout *settingsPane = new LinearLayout(ORIENT_VERTICAL);
settingsScroll->Add(settingsPane);
LinearLayout *settingsPane = new LinearLayout(ORIENT_VERTICAL, new LinearLayoutParams(FILL_PARENT, WRAP_CONTENT));
if (flags_ & TwoPaneFlags::SettingsCanScroll) {
ScrollView *settingsScroll = new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(FILL_PARENT, FILL_PARENT, 1.0f, Margins(8)));
settingsScroll->Add(settingsPane);
root->Add(settingsScroll);
} else {
root->Add(settingsPane);
}
CreateSettingsViews(settingsPane);
root->Add(settingsScroll);
}
root_ = root;
} else {
+1
View File
@@ -28,6 +28,7 @@ enum class TwoPaneFlags {
Default = 0,
SettingsToTheRight = 1,
SettingsInContextMenu = 2,
SettingsCanScroll = 4,
};
ENUM_CLASS_BITOPS(TwoPaneFlags);
+1 -1
View File
@@ -26,7 +26,7 @@ class GamepadView;
class TiltAnalogSettingsScreen : public UITwoPaneBaseDialogScreen {
public:
TiltAnalogSettingsScreen(const Path &gamePath) : UITwoPaneBaseDialogScreen(gamePath, TwoPaneFlags::Default) {}
TiltAnalogSettingsScreen(const Path &gamePath) : UITwoPaneBaseDialogScreen(gamePath, TwoPaneFlags::SettingsCanScroll) {}
void CreateSettingsViews(UI::ViewGroup *parent) override;
void CreateContentViews(UI::ViewGroup*parent) override;
+8 -10
View File
@@ -24,15 +24,15 @@
inkscape:pagecheckerboard="true"
inkscape:deskcolor="#d1d1d1"
inkscape:document-units="px"
inkscape:zoom="5.6568546"
inkscape:cx="19.091882"
inkscape:cy="534.4843"
inkscape:zoom="1.0000001"
inkscape:cx="-560.99996"
inkscape:cy="-89.499994"
inkscape:window-width="3840"
inkscape:window-height="2071"
inkscape:window-x="-9"
inkscape:window-y="-9"
inkscape:window-maximized="1"
inkscape:current-layer="g115"
inkscape:current-layer="layer1"
showgrid="false" /><defs
id="defs1"><inkscape:path-effect
effect="fillet_chamfer"
@@ -3182,11 +3182,9 @@
inkscape:export-xdpi="135"
inkscape:export-filename="C:\dev\ppsspp\source_assets\image\checkedbox.png"
id="I_CHECKMARK"><path
style="fill:none;stroke:#ffffff;stroke-width:3.3789;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m -148.64821,-171.05542 7.07819,10.316 12.12151,-18.9453"
id="path1353"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccc" /></g><g
style="color:#000000;fill:#ffffff;-inkscape-stroke:none"
d="m -130.87109,-180.5957 -10.74805,16.79883 -5.63672,-8.21485 -2.78516,1.91211 8.51954,12.41797 13.49609,-21.0918 z"
id="path1353" /></g><g
id="I_SPEAKER_MAX"
transform="matrix(0.44009307,0,0,0.44009307,-79.67507,-7.6036111)"
inkscape:export-xdpi="135"
@@ -4306,7 +4304,7 @@
style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:3"
id="I_EXIT"
transform="matrix(0.16780779,0,0,0.16780779,40.523958,144.13668)"><path
id="exitpath"
id="asdf"
style="color:#000000;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:3.49782;-inkscape-stroke:none"
d="M 8.5630832,3.4509903 C 5.808118,3.4114746 3.50815,5.6543991 3.4789128,8.409493 v 0.010771 46.913683 c -2.832e-4,2.775449 2.3090041,5.0556 5.0841704,5.015949 H 37.908371 c 2.752855,0.0073 5.026739,-2.262539 5.026721,-5.015949 V 39.223301 H 38.46131 v 14.96168 c 0,0.860175 -0.662202,1.518788 -1.522378,1.518788 H 36.93534 9.4463499 9.4319878 c -0.8672443,0 -1.5368289,-0.651488 -1.5367403,-1.518788 V 9.1383681 C 7.9043418,8.2781405 8.5717112,7.6375317 9.4319878,7.6375317 h 0.014362 27.4889902 0.0036 c 0.853184,0 1.513243,0.6477012 1.522378,1.5008364 V 23.855892 H 42.9351 V 8.420264 8.409493 C 42.905739,5.6771648 40.64003,3.4448758 37.908371,3.4509903 Z M 49.441108,19.062553 46.967242,21.532829 55.537804,30.10339 H 17.388572 v 3.497163 h 38.149232 l -8.570562,8.570562 2.473866,2.473865 12.789418,-12.793008 z" /></g></g><path
id="I_GEAR"

Before

Width:  |  Height:  |  Size: 214 KiB

After

Width:  |  Height:  |  Size: 214 KiB