summaryrefslogtreecommitdiffstats
path: root/gui/keyboard.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--gui/keyboard.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/gui/keyboard.cpp b/gui/keyboard.cpp
index 3b8fdc9ae..4a78ad798 100644
--- a/gui/keyboard.cpp
+++ b/gui/keyboard.cpp
@@ -25,9 +25,9 @@
extern "C" {
#include "../twcommon.h"
-#include "../minuitwrp/minui.h"
#include "gui.h"
}
+#include "../minuitwrp/minui.h"
#include "rapidxml.hpp"
#include "objects.hpp"
@@ -333,7 +333,7 @@ void GUIKeyboard::DrawKey(Key& key, int keyX, int keyY, int keyW, int keyH)
else if (!labelText.empty())
{
void* fontResource = labelFont->GetResource();
- int textW = gr_measureEx(labelText.c_str(), fontResource);
+ int textW = gr_ttf_measureEx(labelText.c_str(), fontResource);
int textH = labelFont->GetHeight();
int textX = keyX + (keyW - textW) / 2;
int textY = keyY + (keyH - textH) / 2;
@@ -347,7 +347,7 @@ void GUIKeyboard::DrawKey(Key& key, int keyX, int keyY, int keyW, int keyH)
gr_color(mLongpressFontColor.red, mLongpressFontColor.green, mLongpressFontColor.blue, mLongpressFontColor.alpha);
string text(1, keychar);
int textH = mLongpressFont->GetHeight();
- int textW = gr_measureEx(text.c_str(), fontResource);
+ int textW = gr_ttf_measureEx(text.c_str(), fontResource);
int textX = keyX + keyW - longpressOffsetX - textW;
int textY = keyY + longpressOffsetY;
gr_textEx_scaleW(textX, textY, text.c_str(), fontResource, keyW, TOP_LEFT, 0);