mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
UI: Actually offset text shadow.
It wasn't actually visible before, since it was strictly underneath text that was usually white.
This commit is contained in:
parent
c793da500a
commit
d4400b358a
2 changed files with 5 additions and 4 deletions
|
@ -62,11 +62,11 @@ private:
|
||||||
|
|
||||||
RatingChoice::RatingChoice(const char *captionKey, int *value, LayoutParams *layoutParams)
|
RatingChoice::RatingChoice(const char *captionKey, int *value, LayoutParams *layoutParams)
|
||||||
: LinearLayout(ORIENT_VERTICAL, layoutParams), value_(value) {
|
: LinearLayout(ORIENT_VERTICAL, layoutParams), value_(value) {
|
||||||
SetSpacing(-8.0f);
|
SetSpacing(0.0f);
|
||||||
|
|
||||||
I18NCategory *rp = GetI18NCategory("Reporting");
|
I18NCategory *rp = GetI18NCategory("Reporting");
|
||||||
group_ = new LinearLayout(ORIENT_HORIZONTAL);
|
group_ = new LinearLayout(ORIENT_HORIZONTAL);
|
||||||
Add(new InfoItem(rp->T(captionKey), ""));
|
Add(new TextView(rp->T(captionKey)))->SetShadow(true);
|
||||||
Add(group_);
|
Add(group_);
|
||||||
|
|
||||||
group_->SetSpacing(0.0f);
|
group_->SetSpacing(0.0f);
|
||||||
|
@ -223,7 +223,7 @@ void ReportScreen::CreateViews() {
|
||||||
ViewGroup *rightColumn = new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(300, FILL_PARENT, actionMenuMargins));
|
ViewGroup *rightColumn = new ScrollView(ORIENT_VERTICAL, new LinearLayoutParams(300, FILL_PARENT, actionMenuMargins));
|
||||||
LinearLayout *rightColumnItems = new LinearLayout(ORIENT_VERTICAL);
|
LinearLayout *rightColumnItems = new LinearLayout(ORIENT_VERTICAL);
|
||||||
|
|
||||||
leftColumnItems->Add(new TextView(rp->T("FeedbackDesc", "How's the emulation? Let us and the community know!"), new LinearLayoutParams(Margins(12, 5, 0, 5))));
|
leftColumnItems->Add(new TextView(rp->T("FeedbackDesc", "How's the emulation? Let us and the community know!"), new LinearLayoutParams(Margins(12, 5, 0, 5))))->SetShadow(true);
|
||||||
if (!Reporting::IsEnabled()) {
|
if (!Reporting::IsEnabled()) {
|
||||||
reportingNotice_ = leftColumnItems->Add(new TextView(rp->T("FeedbackDisabled", "Compatibility server reports must be enabled."), new LinearLayoutParams(Margins(12, 5, 0, 5))));
|
reportingNotice_ = leftColumnItems->Add(new TextView(rp->T("FeedbackDisabled", "Compatibility server reports must be enabled."), new LinearLayoutParams(Margins(12, 5, 0, 5))));
|
||||||
reportingNotice_->SetShadow(true);
|
reportingNotice_->SetShadow(true);
|
||||||
|
@ -258,6 +258,7 @@ void ReportScreen::CreateViews() {
|
||||||
|
|
||||||
leftColumnItems->Add(new CompatRatingChoice("Overall", (int *)&overall_))->SetEnabledPtr(&enableReporting_)->OnChoice.Handle(this, &ReportScreen::HandleChoice);
|
leftColumnItems->Add(new CompatRatingChoice("Overall", (int *)&overall_))->SetEnabledPtr(&enableReporting_)->OnChoice.Handle(this, &ReportScreen::HandleChoice);
|
||||||
overallDescription_ = leftColumnItems->Add(new TextView("", new LinearLayoutParams(Margins(10, 0))));
|
overallDescription_ = leftColumnItems->Add(new TextView("", new LinearLayoutParams(Margins(10, 0))));
|
||||||
|
overallDescription_->SetShadow(true);
|
||||||
leftColumnItems->Add(new RatingChoice("Graphics", &graphics_))->SetEnabledPtr(&ratingEnabled_)->OnChoice.Handle(this, &ReportScreen::HandleChoice);
|
leftColumnItems->Add(new RatingChoice("Graphics", &graphics_))->SetEnabledPtr(&ratingEnabled_)->OnChoice.Handle(this, &ReportScreen::HandleChoice);
|
||||||
leftColumnItems->Add(new RatingChoice("Speed", &speed_))->SetEnabledPtr(&ratingEnabled_)->OnChoice.Handle(this, &ReportScreen::HandleChoice);
|
leftColumnItems->Add(new RatingChoice("Speed", &speed_))->SetEnabledPtr(&ratingEnabled_)->OnChoice.Handle(this, &ReportScreen::HandleChoice);
|
||||||
leftColumnItems->Add(new RatingChoice("Gameplay", &gameplay_))->SetEnabledPtr(&ratingEnabled_)->OnChoice.Handle(this, &ReportScreen::HandleChoice);
|
leftColumnItems->Add(new RatingChoice("Gameplay", &gameplay_))->SetEnabledPtr(&ratingEnabled_)->OnChoice.Handle(this, &ReportScreen::HandleChoice);
|
||||||
|
|
|
@ -837,7 +837,7 @@ void TextView::Draw(UIContext &dc) {
|
||||||
dc.SetFontStyle(small_ ? dc.theme->uiFontSmall : dc.theme->uiFont);
|
dc.SetFontStyle(small_ ? dc.theme->uiFontSmall : dc.theme->uiFont);
|
||||||
if (shadow_) {
|
if (shadow_) {
|
||||||
uint32_t shadowColor = 0x80000000;
|
uint32_t shadowColor = 0x80000000;
|
||||||
dc.DrawTextRect(text_.c_str(), bounds_, shadowColor, textAlign_);
|
dc.DrawTextRect(text_.c_str(), bounds_.Offset(1.0f, 1.0f), shadowColor, textAlign_);
|
||||||
}
|
}
|
||||||
uint32_t textColor = hasTextColor_ ? textColor_ : dc.theme->infoStyle.fgColor;
|
uint32_t textColor = hasTextColor_ ? textColor_ : dc.theme->infoStyle.fgColor;
|
||||||
dc.DrawTextRect(text_.c_str(), bounds_, textColor, textAlign_);
|
dc.DrawTextRect(text_.c_str(), bounds_, textColor, textAlign_);
|
||||||
|
|
Loading…
Add table
Reference in a new issue