mirror of
https://github.com/libretro/ppsspp.git
synced 2025-02-25 11:20:55 +00:00
Merge pull request #269 from zhykzhykzhyk/master
Add UIContext::DrawTextShadow for drawing text correctly under Qt
This commit is contained in:
commit
dfa3a93d02
@ -152,6 +152,12 @@ void UIContext::DrawText(const char *str, float x, float y, uint32_t color, int
|
||||
}
|
||||
}
|
||||
|
||||
void UIContext::DrawTextShadow(const char *str, float x, float y, uint32_t color, int align) {
|
||||
uint32_t alpha = (color >> 1) & 0xFF000000;
|
||||
DrawText(str, x + 2, y + 2, alpha, align);
|
||||
DrawText(str, x, y, color, align);
|
||||
}
|
||||
|
||||
void UIContext::DrawTextRect(const char *str, const Bounds &bounds, uint32_t color, int align) {
|
||||
if (!textDrawer_ || (align & FLAG_DYNAMIC_ASCII)) {
|
||||
float sizeFactor = (float)fontStyle_->sizePts / 24.0f;
|
||||
|
@ -61,6 +61,7 @@ public:
|
||||
void MeasureTextCount(const UI::FontStyle &style, const char *str, int count, float *x, float *y, int align = 0) const;
|
||||
void MeasureText(const UI::FontStyle &style, const char *str, float *x, float *y, int align = 0) const;
|
||||
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 FillRect(const UI::Drawable &drawable, const Bounds &bounds);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user