diff --git a/Common/UI/Context.cpp b/Common/UI/Context.cpp index 365f7ea4e..e94b9e76d 100644 --- a/Common/UI/Context.cpp +++ b/Common/UI/Context.cpp @@ -217,6 +217,13 @@ void UIContext::DrawTextRect(const char *str, const Bounds &bounds, uint32_t col } } +void UIContext::DrawTextShadowRect(const char *str, const Bounds &bounds, uint32_t color, int align) { + uint32_t alpha = (color >> 1) & 0xFF000000; + Bounds shadowBounds(bounds.x+2, bounds.y+2, bounds.w, bounds.h); + DrawTextRect(str, shadowBounds, alpha, align); + DrawTextRect(str, bounds, color, align); +} + void UIContext::FillRect(const UI::Drawable &drawable, const Bounds &bounds) { // Only draw if alpha is non-zero. if ((drawable.color & 0xFF000000) == 0) diff --git a/Common/UI/Context.h b/Common/UI/Context.h index 29635b74f..6514e87de 100644 --- a/Common/UI/Context.h +++ b/Common/UI/Context.h @@ -84,6 +84,7 @@ public: void DrawText(const char *str, float x, float y, uint32_t color, int align = 0); void DrawTextShadow(const char *str, float x, float y, uint32_t color, int align = 0); void DrawTextRect(const char *str, const Bounds &bounds, uint32_t color, int align = 0); + void DrawTextShadowRect(const char *str, const Bounds &bounds, uint32_t color, int align = 0); void FillRect(const UI::Drawable &drawable, const Bounds &bounds); void DrawImageVGradient(ImageID image, uint32_t color1, uint32_t color2, const Bounds &bounds); diff --git a/UI/ControlMappingScreen.cpp b/UI/ControlMappingScreen.cpp index a9edac12a..a9230e99a 100644 --- a/UI/ControlMappingScreen.cpp +++ b/UI/ControlMappingScreen.cpp @@ -99,7 +99,7 @@ void SingleControlMapper::Refresh() { using namespace UI; - float itemH = 45; + float itemH = 55.0f; float leftColumnWidth = 200; float rightColumnWidth = 250; // TODO: Should be flexible somehow. Maybe we need to implement Measure. @@ -478,7 +478,8 @@ void JoystickHistoryView::Draw(UIContext &dc) { } float minRadius = std::min(bounds_.w, bounds_.h) * 0.5f - image->w; dc.Begin(); - dc.DrawTextShadow(title_.c_str(), bounds_.centerX(), bounds_.centerY() + minRadius + 5.0, 0xFFFFFFFF, ALIGN_TOP | ALIGN_HCENTER); + Bounds textBounds(bounds_.x, bounds_.centerY() + minRadius + 5.0, bounds_.w, bounds_.h/2 - minRadius - 5.0); + dc.DrawTextShadowRect(title_.c_str(), textBounds, 0xFFFFFFFF, ALIGN_TOP | ALIGN_HCENTER | FLAG_WRAP_TEXT); dc.Flush(); dc.BeginNoTex(); dc.Draw()->RectOutline(bounds_.centerX() - minRadius, bounds_.centerY() - minRadius, minRadius * 2.0f, minRadius * 2.0f, 0x80FFFFFF); diff --git a/UI/GameSettingsScreen.cpp b/UI/GameSettingsScreen.cpp index 265509477..9f87340a4 100644 --- a/UI/GameSettingsScreen.cpp +++ b/UI/GameSettingsScreen.cpp @@ -2053,9 +2053,8 @@ void GestureMappingScreen::CreateViews() { auto mc = GetI18NCategory("MappableControls"); root_ = new AnchorLayout(new LayoutParams(FILL_PARENT, FILL_PARENT)); - Choice *back = new Choice(di->T("Back"), "", false, new AnchorLayoutParams(130, WRAP_CONTENT, 10, NONE, NONE, 10)); - root_->Add(back)->OnClick.Handle(this, &UIScreen::OnBack); - TabHolder *tabHolder = new TabHolder(ORIENT_VERTICAL, 140, new AnchorLayoutParams(10, 0, 10, 0, false)); + AddStandardBack(root_); + TabHolder *tabHolder = new TabHolder(ORIENT_VERTICAL, 200, new AnchorLayoutParams(10, 0, 10, 0, false)); root_->Add(tabHolder); ScrollView *rightPanel = new ScrollView(ORIENT_VERTICAL); tabHolder->AddTab(co->T("Gesture"), rightPanel); diff --git a/UI/TouchControlLayoutScreen.cpp b/UI/TouchControlLayoutScreen.cpp index 4cb21ea51..c27bfc3a0 100644 --- a/UI/TouchControlLayoutScreen.cpp +++ b/UI/TouchControlLayoutScreen.cpp @@ -610,7 +610,7 @@ void TouchControlLayoutScreen::CreateViews() { const Bounds &bounds = screenManager()->getUIContext()->GetBounds(); InitPadLayout(bounds.w, bounds.h); - const float leftColumnWidth = 140.0f; + const float leftColumnWidth = 170.0f; layoutAreaScale = 1.0-(leftColumnWidth+10)/bounds.w; using namespace UI; diff --git a/assets/lang/ja_JP.ini b/assets/lang/ja_JP.ini index 3ec1ae927..405b76959 100644 --- a/assets/lang/ja_JP.ini +++ b/assets/lang/ja_JP.ini @@ -40,7 +40,7 @@ Button Opacity = ボタンの透明度 Button style = ボタンのスタイル Calibrate Analog Stick = アナログスティックをキャリブレートする Calibrate D-Pad = 十字キーをキャリブレートする -Calibrated = キャリブレーション(調整)された動作 +Calibrated = キャリブレーション\n(調整)された動作 Calibration = キャリブレーション Circular stick input = 環状スティック入力 Classic = クラシック