ref: fcf16607c728e2ea2129f541cfbf6fd73d30761e
parent: 06dd83218590d383bba29acb6bbeaddc380bc6ae
author: Simon Howard <[email protected]>
date: Sat Jan 21 11:22:53 EST 2017
setup: Use UTF-8 for textscreen strings. This shouldn't make a huge difference but is consistent with the other changes in libtextscreen.
--- a/src/setup/txt_joyaxis.c
+++ b/src/setup/txt_joyaxis.c
@@ -28,6 +28,7 @@
#include "txt_gui.h"
#include "txt_io.h"
#include "txt_joyaxis.h"
+#include "txt_utf8.h"
#define JOYSTICK_AXIS_WIDTH 20
@@ -458,9 +459,9 @@
TXT_SetWidgetBG(joystick_axis);
TXT_FGColor(TXT_COLOR_BRIGHT_WHITE);
- TXT_DrawString(buf);
+ TXT_DrawUTF8String(buf);
- for (i = strlen(buf); i < joystick_axis->widget.w; ++i)
+ for (i = TXT_UTF8_Strlen(buf); i < joystick_axis->widget.w; ++i)
{
TXT_DrawString(" ");
}
--- a/src/setup/txt_joybinput.c
+++ b/src/setup/txt_joybinput.c
@@ -30,6 +30,7 @@
#include "txt_io.h"
#include "txt_label.h"
#include "txt_sdl.h"
+#include "txt_utf8.h"
#include "txt_window.h"
#define JOYSTICK_INPUT_WIDTH 10
@@ -264,9 +265,9 @@
TXT_SetWidgetBG(joystick_input);
TXT_FGColor(TXT_COLOR_BRIGHT_WHITE);
- TXT_DrawString(buf);
+ TXT_DrawUTF8String(buf);
- for (i=strlen(buf); i<JOYSTICK_INPUT_WIDTH; ++i)
+ for (i = TXT_UTF8_Strlen(buf); i < JOYSTICK_INPUT_WIDTH; ++i)
{
TXT_DrawString(" ");
}
--- a/src/setup/txt_mouseinput.c
+++ b/src/setup/txt_mouseinput.c
@@ -23,6 +23,7 @@
#include "txt_gui.h"
#include "txt_io.h"
#include "txt_label.h"
+#include "txt_utf8.h"
#include "txt_window.h"
#define MOUSE_INPUT_WIDTH 8
@@ -106,9 +107,9 @@
TXT_SetWidgetBG(mouse_input);
TXT_FGColor(TXT_COLOR_BRIGHT_WHITE);
- TXT_DrawString(buf);
+ TXT_DrawUTF8String(buf);
- for (i=strlen(buf); i<MOUSE_INPUT_WIDTH; ++i)
+ for (i = TXT_UTF8_Strlen(buf); i < MOUSE_INPUT_WIDTH; ++i)
{
TXT_DrawString(" ");
}